Allow styling the item wrappers that `Virtualizer` renders
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/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
Start by reading Virtualizer's renderWrapper, VirtualizerItem, and VirtualizerProps, then review the earlier change in #6998 and the TableLayout sizing behavior described here. Decide how wrapper styling should be exposed without disrupting measurement or layout styles. Done when a layout can center short cells in variable-height rows without relying on a global selector, with tests covering the behavior.
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
Virtualizer wraps every item in a VirtualizerItem div, but there is no way to give that div a className or style. Layout-level CSS that has to target the wrapper, such as vertical alignment in a variable-height TableLayout row, can only be written as a global selector on markup the library owns.
🤔 Expected Behavior?
Some way to style the wrappers, for example a className/style (or a render-prop form taking the LayoutInfo) on Virtualizer, or a layout option that sets them per item.
😯 Current Behavior
renderWrapper in Virtualizer creates VirtualizerItem with only key, layoutInfo, virtualizer, parent and shouldObserveItemSize. VirtualizerItem has accepted className and style since #6998, but Virtualizer passes neither, and VirtualizerProps has no option for them. Its inline style sets position, top/left, width, height, overflow and contain: size layout style. The LayoutInfo fields a layout can set (zIndex, opacity, transform, allowOverflow, isSticky) cannot express alignment.
💁 Possible Solution
Either forward an optional className/style from Virtualizer to each VirtualizerItem, or, as suggested in #6998, let a layout attach style information to a node's LayoutInfo, the way sticky items are handled, for example a vertical alignment option on TableLayout for cells shorter than their row.
🔦 Context
We use TableLayout with estimatedRowHeight and shouldObserveItemSize. Each cell has to stay as tall as its content: the ResizeObserver watches the wrapper's direct children, and getSize clears the wrapper's height and reads its scrollHeight. That means a short cell sits at the top of its row-tall wrapper, while we want it centred.
The cell cannot centre itself. Under contain: size, the wrapper measures as 0px tall while its height is cleared, so any offset on the cell (top: 50% with a translate, or absolute positioning with auto margins) shifts it up during measurement and the row comes out at half its height. The only working option is a global rule that makes the wrapper display: grid; align-items: center, selected as the row's children.
💻 Examples
/* What we have to write today, against markup we don't own */
.variableRowHeights .tableRow > * {
display: grid;
align-items: center;
}
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 16k
- Fork
- 1.6k
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 39
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
-
@internationalized/number: NumberParser misparses Arabic-digit numbers that use . , or ، (sd parses ١٬٢٣٤.٥ as 12345)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
adobe/react-spectrum#10936 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PreviewTrigger: the preview dialog has no accessible nameCó thể đã có người làm @therealemmanueloppong đã nhận 2 ngày trước. Đang mởaccessibility bug PreviewTrigger
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
adobe/react-spectrum#10917 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unitCó thể đã có người làm @darshpatel1052 đã nhận 5 ngày trước. Đang mởwaiting on author
Độ 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 · 3 bình luận ·
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 @mrlexcoder đã nhận 5 ngày trước. Đ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 6 ngày trước. Đ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
Tất cả issue của adobe/react-spectrum
Issue tương tự
-
documentation good first issue roadmap
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
resend/react-email#3876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
siyuan-note/siyuan#21324 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
dmno-dev/varlock#1279 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
himynameisdave/bsky-profanity-counter#59 ·
Maintainer thường phản hồi trong vòng 1 ngày