[Calendar] Support ref as prop and fix date handling edge cases
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
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với các entry point của các component Calendar, DatePicker và RangePicker, đồng thời kiểm tra prop types và các luồng xử lý ngày tháng của chúng. Xem xét việc hỗ trợ ref, validation đối với ngày trong tương lai, cleanup mouseup listener, giá trị mặc định của single mode trong Calendar và việc phát hiện input format theo các cải tiến đã nêu. Được xem là hoàn thành khi behavior bị ảnh hưởng có thể cấu hình hoặc đã được sửa trong cả ba component, đồng thời vẫn giữ nguyên các pattern hiện có của design system.
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 Calendar, DatePicker, and RangePicker components to fix patterns and improve flexibility.
Improvements
1. No ref prop support on Calendar, DatePicker, or RangePicker
None of the three exported components accept ref as a prop, inconsistent with the rest of the design system.
2. Hardcoded future date restriction in DatePicker
DatePicker input validation has dayjs(date).isSameOrBefore(dayjs()) hardcoded, preventing selection of future dates. This should be configurable or removed.
4. Manual event listener management in DatePicker
DatePicker manually manages mouseup event listeners via document.addEventListener/removeEventListener. This could be simplified using the Popover's own onOpenChange interaction model or a useEffect cleanup pattern.
5. mode='single' hardcoded in Calendar
The Calendar component sets mode='single' by default but also spreads ...props after, which allows override. The default should be documented or the prop should be explicit in the type.
6. DatePicker input format detection is fragile
handleInputChange guesses the date format based on separator character (/ or -). This can conflict with the dateFormat prop if the user specifies a different format.
Moved to Cross-Cutting Issues
The following items have been moved to cross-cutting issues that address them across all components:
- Remove !important declarations (#678)
- Ngôn ngữ chính
- TypeScript
- Star
- 70
- Fork
- 13
- Merge trung bình
- 4 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 10
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 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
-
Docs: hand-duplicated props tables drift risk, missing a11y sections, no per-component changelog Đang mởenhancement global
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
bug global
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của raystack/apsara
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
bcgov/bc-wallet-mobile#4761 · 1 bình luận ·
-
external-issue to-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100