Repository navigation
Conversation
Contributor
Web DemoAPK 下载 |
Contributor
Author
|
CI 失败分诊(与同仓库同基线的 PR #1247 对照): 本 PR 引入(需处理)
非本 PR 引入(基线固有,#1247 同样失败)
|
Contributor
Author
|
基线已按仓库惯例从 Linux CI 产物刷新(b16eaf3)。当前 CI 状态: ✅ 本 PR 相关全部通过:
❌ 剩余失败与基线一致(PR #1247 同样失败,非本 PR 引入):
|
lnuxe
force-pushed
the
fix/ttabsbar-scrollable-width
branch
from
November 16, 2026 02:51
b16eaf3 to
46c2402
Compare
isScrollable=true switched the label strip to MainAxisSize.min, so the outer Container shrank to content width inside horizontally-unbounded parents: the bar background and divider only covered the first tab (issue Tencent#1246). Pin the outer container to double.infinity so the bar keeps occupying the available width while the labels themselves stay content-sized and scrollable.
…h bar The previous baselines captured the shrunken 272px bar from the Tencent#1246 regression; regenerate them from the Linux CI golden-failures artifacts rendered with the fix in place (375px full-width bar).
lnuxe
force-pushed
the
fix/ttabsbar-scrollable-width
branch
from
November 17, 2026 02:03
46c2402 to
5a0d968
Compare
This branch has not been deployed
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
修复 #1246
💡 需求背景和解决方案
问题:
TTabsBar设置isScrollable: true后不再占满可用宽度——在横向无界父级(Column、Scaffold.body等)中宽度收缩到内容宽,条形背景与底部分割线只覆盖首个标签附近区域,视觉上「不能自适应屏幕宽度」。根因:
isScrollable=true时标签条走MainAxisSize.min(_TabLabelBar),而TTabsBar.build的外层Container未声明宽度,在无界父级中被子内容收缩。修复:外层
Container补width: double.infinity——条形背景/分割线恢复占满可用宽度;标签本身保持内容宽度并可滚动,超长标签串仍可左右滑动。验证(widget 测试量化,390pt 屏):
isScrollable: true,3 个标签isScrollable: true,12 个长标签isScrollable: false(默认)新增两条回归测试到
t_tab_bar_test.dart(全宽断言 + 长标签滚动断言),套件 14/14 通过,dart analyze相关文件零告警。📝 更新日志
fix(TTabsBar): 修复 isScrollable 时选项栏不再占满可用宽度、背景与分割线只覆盖首个标签的问题
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单