fix(page-header): pin the inline title width and drop a class wind ignores - #97
Conversation
…nores Two findings from driving the header on an iPhone. The inline layout collapsed its title. With a leading control, a long title and a titleSuffix, the title measured ZERO width at 402pt while 140pt of the row sat blank after the status badge. The cause was in wind, not here: a `justify-between` Row wrapped every child in `Flexible`, so the icon-sized actions column reserved an equal 185pt share it never painted and the `flex-1` title row had nothing left to take (fluttersdk/wind#175). This adds the regression test at the component level, asserted on the two wrappers rather than on the text: a widget test lays text out in a placeholder font roughly one em per glyph, so comparing a title against a badge measures the harness. `-ml-1` on the back control never did anything. wind supports a negative value only in the position family, and it reports `unknown className '-ml-1' was ignored` for a margin. Removed from the default, the derived theme, and the docblock rather than left in as a class that reads like it is doing work.
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. The Critical
Major
TestsThe inline layout is now covered at 402pt by assertions on the actions column and the title row rather than on text width, which is the right thing to measure. The Checks I ran
|
|
@kodizm review |
1 similar comment
|
@kodizm review |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. What changed since my last review: no new commits - the upstream dependency landed instead, which clears the Critical. The TestsThe new inline case is non-vacuous and its selectors are sound: Checks I ran
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What
inlineActions: true) layout: with a leading control, a long title and atitleSuffix, the actions column must stay icon-sized and the title row must span the header.-ml-1frombackControlClassName(the default, theuseWindThemederivation, and the docblock).Why
Driving the header on an iPhone at 402pt showed the title collapsing to a couple of glyphs while roughly 140pt of the row sat blank after the status badge. The cause is in wind rather than here: a
justify-betweenRow wrapped every child inFlexible, so the icon-sized actions column reserved an equal 185pt share it never painted, and theflex-1title row had no leftover to take. Fixed in fluttersdk/wind#175; this pins the component-level behaviour so the regression cannot come back silently.-ml-1was inert. wind accepts a negative value only in the position family and logsunknown className '-ml-1' was ignoredfor a margin, so the class read like it was pulling the chevron toward the gutter while doing nothing.Testing
test/ui/components/page_header/page_header_test.dart, asserted on the two wrappers rather than on the text: a widget test lays text out in a placeholder font at roughly one em per glyph, so comparing a title width against a badge width measures the harness. Verified non-vacuous against unfixed wind (title row 185pt instead of 346pt).Note
Needs fluttersdk/wind#175 to land first; the new test fails against a wind without it.