callstack / callstack/react-native-paper
refactor(segmented-buttons): improve state model and rendering performance
- Ngôn ngữ chính
- TypeScript
- Star
- 14.5k
- Fork
- 2.2k
- Merge trung bình
- 5 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 12
Mô tả
Refactor SegmentedButton to improve Material Design 3 compliance, remove problematic children patterns, improve performance characteristics, and modernize the public API.
**Problems**
- Current API relies heavily on children composition in ways that are difficult to optimize
- Internal layout logic is tightly coupled to arbitrary child structures
- MD3 behaviors and visuals are not fully aligned with current Material guidelines
- Rendering performance can degrade in large lists or frequently updated screens
- Type safety and discoverability of the API can be improved
- The component has inconsistent behavior between platforms and edge cases
**Focus Areas**
- Improve selection APIs
- Improve density and layout handling
- Improve MD3 shape and state layers
- Simplify internal selection logic
**Performance Opportunities**
- Improve rendering in dynamic lists
- Memoize button state calculations
- Reduce unnecessary prop spreading
Hướng dẫn đóng góp
Hướng nghiên cứu
Issue xác định SegmentedButton là điểm bắt đầu, nhưng không nêu tên tệp, bài kiểm thử hay thiết kế API cụ thể nào. Trước tiên, hãy lập bản đồ phần triển khai hiện tại và các bài kiểm thử của component, sau đó giải quyết các yêu cầu về lựa chọn, mật độ, bố cục, hình dạng, state-layer và hiệu năng; hoàn thành khi đạt được sự thống nhất về API được hiện đại hóa và có độ bao phủ cho các hành vi được liệt kê.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react-native, typescript
- Lĩnh vực
- design, frontend, mobile-dev
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100