reactjs / reactjs/react.dev

[Suggestion]: Cap the height of the artificially-slow example output (useDeferredValue / useTransition)

Aberta Para iniciantes
#8,486 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

type: documentation
Linguagem predominante
JavaScript
Estrelas
11.8k
Forks
7.9k
Merge médio
1d 11h
PRs com merge (30d)
11

Descrição

Summary

When you view the example's rendered output in full, the SlowList/SlowPost demos expand into hundreds of identical rows, which is more than anyone needs to scroll through. The output height should be capped (e.g. max-height + scroll) while keeping the item counts that create the intentional slowdown.

Image Image
Page

https://react.dev/reference/react/useDeferredValue
https://react.dev/reference/react/useTransition

Details

The point of these demos is felt within the first few rows — you just need to see the list "lag behind" the input. But the rendered output shows the full list, so viewing it expands the example to hundreds of identical "Text:" rows and pushes the rest of the docs far down. The number of rows differs across pages (250 / 500 / 50), so the problem shows up unevenly.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece pelos exemplos nas páginas de referência de useDeferredValue e useTransition e inspecione como SlowList e SlowPost renderizam sua saída. Limite a altura visível da saída com rolagem, preservando as contagens de itens existentes e a lentidão intencional; em seguida, verifique se ambas as páginas não se expandem mais excessivamente.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
javascript, react
Domínio
documentation
Tipo de issue
Funcionalidade
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
72/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.