Enhance component API with responsive props, color propagation, and typography utilities
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
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- react, typescript
Hướng nghiên cứu
Bắt đầu bằng cách đọc các API hiện có của layout, visual component, Text, Headline và Button để xác định các pattern prop và màu hiện tại. Lập danh sách các component bị ảnh hưởng và xác định tiêu chí hoàn thành dựa trên các prop responsive được yêu cầu, các shorthand về spacing, việc truyền màu, behavior của contrast, các utility về typography và các biến thể kích thước của Section; issue không nêu file hoặc test cụ thể nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Enhance Apsara's component-level APIs to improve developer experience, reduce boilerplate, and provide consistent patterns across the library.
1. Responsive Props on Layout Components
Add responsive object syntax to all layout prop values (gap, direction, padding, etc.):
<Flex gap={{ initial: "3", md: "5" }} direction={{ initial: "column", sm: "row" }}>
Support breakpoints: initial, sm, md, lg, xl.
2. Inline Spacing Props
Add shorthand padding/margin props (p, px, py, pt, pr, pb, pl, m, mx, my, mt, mr, mb, ml) to layout components that map to the space scale:
<Box p="4" mx="auto" mt="6">
3. Systematic color Prop
Extend the color prop to all visual components (Badge, Callout, Text, Avatar, Chip, etc.), not just Button. Color should propagate to children through nesting, automatically adjusting internal tokens.
4. highContrast Prop
Add a highContrast boolean to all components that accept a color prop. This shifts colors to steps 9–12 of the scale for better contrast against the page background.
5. Typography Utility Props
Add the following props to Text and Headline:
trim— remove leading/trailing whitespace for precise vertical alignmenttruncate— single-line ellipsis truncationwrap— control text wrapping (wrap,nowrap,balance,pretty)align— text alignment (left,center,right)- Expand font weight options to 4 levels: light (300), regular (400), medium (500), bold (700)
6. Section Layout Component
Add a Section component for consistent vertical spacing between major page sections, with predefined size variants (small, medium, large).
- 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 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mksglu/context-mode#1200 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/claude-code#96687 ·
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
AOSSIE-Org/DebateAI#582 · 2 bình luận ·