[Suggestion]: Cap the height of the artificially-slow example output (useDeferredValue / useTransition)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 11.8k
- Forks
- 7.9k
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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.
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den Beispielen auf den Referenzseiten zu useDeferredValue und useTransition und prüfe, wie SlowList und SlowPost ihre Ausgabe rendern. Begrenze die Höhe der sichtbaren Ausgabe durch Scrollen, wobei die vorhandenen Elementanzahlen und die beabsichtigte Verlangsamung erhalten bleiben, und überprüfe anschließend, dass sich beide Seiten nicht mehr übermäßig ausdehnen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- documentation
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 72/100