feat: modernize Searchbar to Material Design 3
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 45/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- react-native, typescript
研究方向
首先定位 Searchbar 的實作,並將其目前的 tokens、色彩、尺寸與模式與連結的 Material 3 Search 規格進行比較。檢視 TextInput/TextField、Switch、Checkbox 與 FAB 中的現代化模式。完成的標準是 checklist 已處理、元件專用 tokens 與目錄結構已更新,且焦點行為與術語符合所選規格。
由索引模型根據 Issue 內容生成。
描述
- Modernize the Searchbar to the latest specs: https://m3.material.io/components/search/
- Reuse newly introduced tokens (shape, motion, typography, color etc)
- Extract component specific tokens for easier maintenance.
- Get inspired from TextInput/TextField, Switch, Checkbox, FAB components which have gone through modernization.
Current State
Searchbar
MD3 spec: Search
Specs link: https://m3.material.io/components/search/specs
Color tokens
- Container background:
surfaceContainerHigh✅ - Leading icon:
onSurfaceVariant✅ - Clear / trailing icons:
onSurfaceVariant✅ - Cursor:
primary✅ - Input text color:
onSurfaceVariant; should beonSurface - Placeholder text color:
onSurface; should beonSurfaceVariant– these two are swapped ❌
Spacing / sizing
- Bar height:
minHeight: 56✅ - Bar border radius:
7 * roundness= 28dp (corner.extra-large) ✅ for baseline style - View mode border radius: 0 (
corner.none) ✅ for divided style - Input font:
bodyLarge(16sp, overridesfontSize: 18inStyleSheet) ✅
Behavior
- Leading icon, clear icon, trailing icon, custom
rightrender prop ✅ mode="bar"maps to divided/baseline style with elevation ✅mode="view"maps to divided search view with bottomDivider✅- State layers on icons via
IconButton+TouchableRipple✅ - No focus animation: M3 Expressive (Feb 2025) requires the bar container margins to change from 24dp (unfocused) to 12dp (focused), creating a grow-wider effect; not implemented
-
modevalues ("bar"/"view") do not align with M3 spec terminology ("contained"/"divided (baseline)") - M3 Expressive contained style is now the recommended style; the component partially implements the shape but missing the focus margin transition
- No results/suggestions container component: spec anatomy includes a “container for search suggestions or results” as element 6; consumers must build this themselves with no provided primitive
Notes
- Should be moved to its own directory
- The
dividedstyle is deprecated in M3 Expressive in favor ofcontained;mode="view"implements the divided style - Result grouping with gaps (M3 Expressive) is a consumer-level concern and does not need to be part of the component itself
- 主要語言
- TypeScript
- 星號
- 14.5k
- 分支
- 2.3k
- 平均合併
- 3 天 14 小時
- 30 天內合併 PR
- 12
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
callstack/react-native-paper 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
callstack/react-native-paper#5146 · 2 則留言 ·
維護者通常 1 天內回覆
-
Menu ignores the keyboard when it mounts while the keyboard is already open可能已有人在做 @manchoudhary 於 50 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
callstack/react-native-paper#5096 ·
維護者通常 1 天內回覆
-
Tooltip: onPress event object is not propagated to parent component on native可能已有人在做 @aliyilmaztech 於 83 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 74/100
callstack/react-native-paper#5003 ·
維護者通常 1 天內回覆
-
Snackbar stays mounted after `visible=false` under new architecture (iOS + Android)可能重新可做 關聯的 PR 已關閉且未合併。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
callstack/react-native-paper#4951 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
callstack/react-native-paper#4881 ·
維護者通常 1 天內回覆
查看 callstack/react-native-paper 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 88/100
-
bug needs triage
難度 2/5 1-3 小時 新手友好度 72/100
DSpace/dspace-angular#6511 ·
維護者通常 1 天內回覆
-
area: frontend area:byok bug severity:low
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
Phone app shows Unknown for a remote machine whose key changed可能已有人在做 @janicduplessis 今天認領。 未關閉area: mobile priority: P3 type: bug
難度 1/5 1 小時以內 新手友好度 78/100
appandflow/stim#5006 · 1 則留言 ·
維護者通常 1 天內回覆
-
Area - Local to Cloud Bug
難度 2/5 1-3 小時 新手友好度 66/100
microsoft/vscode-mssql#23209 ·
維護者通常 1 天內回覆