Conversation
Contributor
Web DemoAPK 下载 |
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
无关联 Issue;该问题由 #1060 的 TCascader 对齐 Review 在检查共享文字解析时发现,本 PR 独立修复 TText 根因。
💡 需求背景和解决方案
调用方显式设置 Material
TextTheme后,Material 仍会为子树自动注入bodyMedium的DefaultTextStyle。原实现把该自动样式误判成调用方显式覆盖,导致TText已解析出的 TDesignbodyLarge再次被bodyMedium压小。本 PR 统一过滤与 Material
TextTheme相同的自动DefaultTextStyle及框架诊断 fallback,同时保留真正的局部DefaultTextStyle覆盖。公开 API 签名和主题优先级不变。全量扫描还发现 Popover 自定义内容写死的 146 高度无法容纳恢复后的正确行高,因此改为按内容自适应,并同步示例代码片段。本修复先完整扫描集中式组件测试与 Flutter 3.32 Linux 全部 Golden,确认共享影响范围后再落地根因修复。首次扫描的 41 个视觉套件中有 37 个报告预期排版差异;逐项审查并更新 256 张受影响 Golden 后,41 个套件已全部严格比对通过。该范围较广,因此 PR 保持
pedding标签,等待维护者结合视觉差异决定合入时机。Spec:
specs/027-ttext-default-style-resolution/验证结果:
flutter analyze均为 0 error、0 warning。📝 更新日志
fix(TText): 修复显式 Material TextTheme 下自动 DefaultTextStyle 覆盖 TDesign 默认文字层级的问题
fix(TPopover): 修复自定义内容在 TText 正确行高下因固定高度产生的溢出
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单
type(<scope>?): 修改描述。示例:
fix(TBottomTabBar): 修复 iconText 模式底部溢出