callstack / callstack/react-native-paper
refactor(dialog): improve composition model and accessibility
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
Refactor Dialog 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**
- Simplify Dialog.Title / Dialog.Content / Dialog.Actions hierarchy
- Improve keyboard and accessibility handling
- Improve MD3 spacing and tonal elevation
- Reduce excessive wrappers
**Proposed API Direction**
``
**Performance Opportunities**
- Reduce nested layout complexity
- Improve portal interaction handling
- Reduce unnecessary rerenders during visibility updates
贡献指南
调研方向
首先定位 Dialog 组件,并检查其当前基于 children 的组合方式、portal 行为和可见性更新。将现有公共 API 与提议的 title、content 和 actions props 进行比较,然后评估键盘、可访问性、MD3 间距、色调提升以及 wrapper 方面的更改。当在所述平台和边缘情况下都具备一致的 API 和一致的行为,并改善渲染特性时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- accessibility, design, frontend, mobile, performance
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100