breaking(TNavBar): 收敛导航栏设计与公开契约 - #1082
Open
RSS1102 wants to merge 7 commits into
Open
Conversation
Open
Contributor
Web DemoAPK 下载 |
_getTitleStyle 中 fontSize 原先取 materialStyle?.fontSize ?? titleFont?.size, 在同时设置 Material AppBarTheme.titleTextStyle.fontSize 与显式 titleFont 时, Material 会反向覆盖构造器/Theme 的 titleFont,违背 spec 声明的 「构造器 > TNavBarThemeData > Material AppBarTheme > Token」优先级。 现按与 titleHeight 相同的 usesDesignDefaultFont 区分:仅当未显式设置 titleFont (回退默认 Token)时 Material 才插在 Token 之前;显式 titleFont 时由其 size 决定。 并补充两条回归测试。
NavBar 默认样式(返回图标 24、Title Large 默认字号/字重、默认高度 48)变化后, 导航组件组合矩阵 golden 中 NavBar 区域渲染随之改变,同步更新 navigation_components_light/dark.png 视觉基线,修复 visual regression。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🤔 这个 PR 的性质是?
🔗 相关 Issue
关联 #1027 中“导航 / Navbar 导航栏”组件任务。
💡 需求背景和解决方案
现有 NavBar 默认返回、标题语义、内容高度和边框模式存在重复默认来源,公开 Demo 的组合与尺寸也未完全符合当前移动端设计。
useDefaultBack默认改为false,返回图标收敛为 24;标题默认使用 Title Large 语义 Token(18/26/600)。height收敛为非空实例参数并默认 48,继续作为PreferredSizeWidget.preferredSize和内容高度的唯一来源。useBorderStyle收敛为非空实例结构状态并从TNavBarThemeData移除;Theme 只保存可继承视觉值。87 × 24图片、标题对齐/尺寸与品牌色;公共 ExamplePage 显式保留既有返回和标题视觉,避免组件默认值污染其他 Demo。本地验证:组件 55 项与 Demo 3 项通过;生产覆盖率 174/178 = 97.75%;Flutter 3.32 Linux 的 Navbar 组件 2、Demo 2 及共享 ActionSheet 12 个严格 Golden 更新后无更新参数复跑通过并逐张核对;Flutter 3.32.0 / 3.47.0 的组件包与 Example analyze 零诊断,功能测试及 Web/Android 构建通过;Android 16 真机完成 uppercase Hot Restart、可见操作、integration 1/1、普通 APK 安装
Success与冷启动。📝 更新日志
breaking(TNavBar): 默认不再显示返回按钮,
height与useBorderStyle收敛为非空实例参数,并移除 Theme 中的边框结构状态入口breaking(TNavBar): 默认标题调整为 Title Large 语义样式,返回图标调整为 24
fix(TNavBar): 公开 Demo 补齐搜索、图片和标题样式组合,并隔离公共 Demo 页面壳视觉
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单
type(<scope>?): 修改描述。示例:
fix(TBottomTabBar): 修复 iconText 模式底部溢出