fix: Keep the usage breakdown from starving its label column - #196
Open
nagasrinath wants to merge 1 commit into
Open
nagasrinath wants to merge 1 commit into
nagasrinath wants to merge 1 commit into
Conversation
The day and model tables lead with a flexible label column followed by numeric cells pinned at a fixed width. The numeric cells cannot shrink, so a narrow window left the label column as the only thing able to give, and `min_w_0` let it collapse below one glyph — at which point the dates wrapped one character per line and read vertically. Give that column a floor and let it elide, and reflow the section: the cost-quality panel now stacks under the breakdown table when the content column is too narrow to seat both, which is what actually starved the days. The wider day table sets the threshold for both breakdowns, so the MODEL/DAY toggle never reflows the page around itself. The settings shell now reports the width it paints a page into, since the page can no longer assume it gets its maximum width.
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.
Problem
On the Usage settings page, the day and model breakdown tables render their
first column as vertical text when the window is narrow — "Aug 28" wraps to
one character per line.
The label column is
flex_1().min_w_0()next to numeric cells fixed at 84pxthat cannot shrink, so it is the only thing left to give and collapses below
the width of one glyph. The row also seats a fixed 240px cost-quality panel
beside a table that needs 396px of numeric columns before any label.
Before / after
Solution
truncate(), so it elides insteadof wrapping.
seat both. The wider day table sets the threshold, so the MODEL/DAY toggle
does not reflow the page.
settings_content_width()so the page knows the width it is paintedinto, and share the column widths as constants between the tables and the
threshold.
Checks
cargo fmt --package waku -- --checkcargo checkcargo testbun run protocol:check