callstack / callstack/react-native-paper
feat: modernize BottomNavigationBar
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
Modernize the existing BottomNavigationBar to reuse theme tokens (color, shape, motion, typography etc) and make sure the MD3 specs are respected. See the expressive update too: https://m3.material.io/components/navigation-bar/overview
# Current State
## Bottom Navigation
**MD3 spec:** Navigation bar
**Specs link:** https://m3.material.io/components/navigation-bar/specs
### Notes
- `BottomNavigation` is a router-aware wrapper around `BottomNavigation.Bar` that handles scene management and tab transitions. MD3 compliance is governed by `BottomNavigation.Bar` below.
---
## Bottom Navigation Bar
**MD3 spec:** Navigation bar
**Specs link:** https://m3.material.io/components/navigation-bar/specs
### Color tokens
- Container `surfaceContainer` ✅
- Active icon `onSecondaryContainer` ✅
- Active indicator `secondaryContainer` ✅
- Inactive icon `onSurfaceVariant` ✅
- Inactive label `onSurfaceVariant` ✅
- [ ] Active label uses `onSurface`. Spec token `Nav bar item active label text color` maps to `secondary`
### Spacing / sizing
- Active indicator 64x32dp with 16dp corner radius ✅
- Icon-to-label gap 4dp (`marginBottom: 4` on icon container) ✅
- [ ] `v3NoLabelContainer` height is hardcoded to 80dp. Spec requires 64dp
- [ ] `BAR_HEIGHT = 56` constant is used for label height styling. Spec bar height is 64dp
### Behavior
- [ ] `shifting` mode (inactive tabs hide labels) is an MD2 pattern not present in MD3
- `labeled={false}` hides all labels (not in MD3 spec, but a deliberate extension used by Google’s own products e.g. Gmail) ✅
- [ ] `rippleColor: 'transparent'` suppresses state layer feedback. MD3 requires visible state layers (8% hovered, 10% focused/pressed)
- [ ] Flexible navigation bar (horizontal items for medium windows) not implemented. M3 Expressive requires horizontal layout support
- [ ] Baseline navigation bar is not recommended in M3 Expressive; flexible variant should replace it
### Notes
- Rename to match MD3: **`NavigationBar`**
贡献指南
调研方向
从现有的 BottomNavigation 和 BottomNavigation.Bar 入口点开始,然后将它们当前的行为与链接的 Material 3 navigation bar 和 expressive 规范进行比较。检查列出的颜色、尺寸和行为差异,包括重命名为 NavigationBar;当清单中的项目都已处理且 MD3 行为已一致实现时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- design, mobile
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100