Sheet: allow controlling the enter/exit speed (opens ~2x slower than a CSS sheet)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 16k
- Fork
- 1.6k
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 41
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của adobe/react-spectrum
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 88/100
adobe/react-spectrum#10909 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValueCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
adobe/react-spectrum#10900 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Separator adds a redundant role="separator" to its default <hr>Có thể đã có người làm @Janani-bn đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
adobe/react-spectrum#10894 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is openCó thể đã có người làm @mangeshraut712 đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
adobe/react-spectrum#10866 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Có thể đã có người làm @mangeshraut712 đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
adobe/react-spectrum#10856 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của adobe/react-spectrum
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
unocss/unocss#5421 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Azure/typespec-azure#5936 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
vercel-labs/scriptc#2910 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation missing-model model-sync provider:fireworks-ai
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/models.dev#12458 ·
Maintainer thường phản hồi trong vòng 1 ngày