[Avatar] Fix AvatarGroup sizing, wire up disabled prop, and forward Base UI props
Maintainer thường phản hồi trong vòng 5 ngày
@rohanchkrabrty đang làm issue này rồi.
Từ ngày 29/9/2026.
Đá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
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
Hướng nghiên cứu
Bắt đầu từ các triển khai của Avatar và AvatarGroup, bao gồm cấu hình CVA và logic getAvatarProps đệ quy của chúng. Theo dõi cách các prop image và fallback của Base UI được cung cấp, sau đó xác minh rằng việc định cỡ, kiểu hiển thị khi bị vô hiệu hóa, chuyển tiếp prop, trích xuất children một cách mạnh mẽ và việc reconciliation avatar ổn định đều hoạt động như mô tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Improvements to the Avatar component to fix bugs, forward missing Base UI props, and improve AvatarGroup reliability.
API Differences from Base UI
| Base UI | Apsara | Change |
|---|---|---|
Avatar.Root |
Avatar |
Flattened — root is the default |
Avatar.Image |
(none) | Hidden inside Avatar, exposed via src/alt props |
Avatar.Fallback |
(none) | Hidden inside Avatar, exposed via fallback prop |
| (none) | AvatarGroup |
Custom addition |
| (none) | getAvatarColor |
Custom utility |
Props not forwarded from Base UI
- Image:
onLoadingStatusChange— callback for tracking image load/error state - Fallback:
delay— delay before showing fallback (avoids flash for fast-loading images)
Improvements
1. Fix AvatarGroup overlap CSS (size selectors don't match)
The CSS defines .avatar-size-N .avatarWrapper selectors, but AvatarGroup renders a plain <div> — the size classes are on individual avatars inside .avatarWrapper, not on a parent, so the overlap selectors never match.
2. Wire up disabled prop to CVA
The CVA config has disabled: { true: styles['avatar-disabled'] } but AvatarProps doesn't include disabled as a prop — it's never passed to the CVA call.
3. Forward onLoadingStatusChange from Image
Base UI's Avatar.Image supports onLoadingStatusChange for tracking image load/error state. Currently not exposed.
4. Forward delay from Fallback
Base UI supports a delay prop on Avatar.Fallback to avoid a flash when the image loads quickly. Currently not exposed.
5. Improve getAvatarProps robustness
The recursive prop extraction only works if the direct child is an Avatar or has a single children prop. Wrapping in Tooltip or other components with different prop structures may fail silently.
6. Fix array index key in AvatarGroup
avatars.map((avatar, index) => <div key={index}> — if the avatar list changes order, React won't reconcile correctly.
- Ngôn ngữ chính
- TypeScript
- Star
- 69
- Fork
- 13
- Merge trung bình
- 4 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 27
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 raystack/apsara
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của raystack/apsara
Issue tương tự
-
ai-driven-qa bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
linagora/twake-contacts-frontend#241 ·
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 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result countĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
priority:high
Độ 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ó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ahmedkhaleel2004/gitdiagram#228 ·