Sheet: allow controlling the enter/exit speed (opens ~2x slower than a CSS sheet)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 18/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
The payload points at the onEnter handler, which smooth-scrolls the scroller by enteredScroll / 100 * vp, so start by reading how Sheet computes that scroll distance and where its scroll behaviour is set. Three possible approaches are listed (sheet-sized travel, a JS scroll animation, or a duration prop), and the thread does not choose one, so a maintainer decision on the API is needed first. Done would mean a chosen approach that makes the sheet start moving on the first frame and is covered by a browser test, with the related issues #10854 and #10877 checked for overlap.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Provide a general summary of the feature here
A way to control how fast a Sheet slides in and out. Right now it uses scrollTo({ behavior: 'smooth' }) over a full viewport of scroll, so the browser picks the speed and a regular-size sheet takes about twice as long to open as a typical CSS sheet animation.
🤔 Expected Behavior?
Apps can make a sheet open about as fast as their other overlays, for example around 250 to 300ms, and it starts moving right away.
😯 Current Behavior
onEnter smooth-scrolls the scroller a whole viewport (enteredScroll / 100 * vp), not the sheet's size. The first part of that scroll moves through empty space, so a sheet smaller than the viewport doesn't show up until partway through, and the total time is up to the browser.
Measured in Chromium (Vitest browser mode, rAF sampling of the sheet's position after pressing the trigger):
| Sheet | Viewport | First visible | Fully open |
|---|---|---|---|
| right, 400px wide | 1024×768 | ~190ms | ~540ms |
| bottom, 500px tall | 390×844 | ~150ms | ~490ms |
| bottom, 500px tall | 1024×1300 | ~200ms | ~590ms |
The CSS drawer we replaced with Sheet used a 250ms transition and moved from the first frame. Moving to Sheet made it feel noticeably slower to our team.
💁 Possible Solution
Some options, from least to most API:
- Start the enter scroll from the sheet's own edge instead of a full viewport out, so it moves from the first frame. This seems related to #10854, where the travel also depends on the viewport and not the sheet's size.
- Drive the enter and exit with a JS animation of
scrollTop/scrollLeft(rAF with an easing curve) instead of native smooth scroll, with a default duration. - Expose a prop like
animationDuration(or read a CSS custom property) so apps can match their motion tokens.
We'd rather not replace the scroll ourselves: changing the scroll position while Sheet's own smooth scroll runs is exactly what gets a sheet stuck in #10877.
🔦 Context
We build a Drawer component on Sheet in GoDaddy's design system (Antares) and want swipe-to-dismiss and stacking, but the slower open is the main thing people notice compared to our previous drawer.
💻 Examples
Native iOS sheets take about 500ms, so Sheet isn't far off on phones, but on desktop a side drawer is expected to be quicker, and the ~150–200ms with nothing on screen reads as lag.
🧢 Your Company/Team
GoDaddy
🕷 Tracking Issue
No response
- Lingua principale
- TypeScript
- Stelle
- 16k
- Fork
- 1.6k
- Merge medio
- 2g 17h
- PR unite (30g)
- 41
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di adobe/react-spectrum
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unitForse già presa @darshpatel1052 l’ha presa 1 giorno fa. Apertawaiting on author
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 88/100
adobe/react-spectrum#10909 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValueForse già presa @mrlexcoder l’ha presa 1 giorno fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
adobe/react-spectrum#10900 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Separator adds a redundant role="separator" to its default <hr>Forse già presa @Janani-bn l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
adobe/react-spectrum#10894 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is openForse già presa @mangeshraut712 l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
adobe/react-spectrum#10866 ·
I maintainer di solito rispondono entro 1 giorno
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Forse già presa @mangeshraut712 l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
adobe/react-spectrum#10856 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di adobe/react-spectrum
Issue simili
-
Add: Yichang TVApertacheck:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
vtselect: data race in Tempo search tags APIs for invalid TraceQL queriesForse già presa @Shubham19032004 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VictoriaMetrics/VictoriaTraces#304 ·
I maintainer di solito rispondono entro 1 giorno
-
test: claim-conflict drop leaves both facts active and is never re-proposed (untested review cell)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/vscode-pull-request-github#9159 ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Usage page should show API-equivalent cost and say when a connected plan shows info onlyApertaenhancement from-x
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
nightly-labs/openbot#4867 ·
I maintainer di solito rispondono entro 1 giorno