Repository navigation
Fit the analysis panel's text inside its own cards - #689
Merged
Merged
Conversation
The seven metadata cards size their text in fixed pixels while the row they sit in is a seven column grid that tracks the window. Below about 1250px the text is wider than the card holding it, and flex-shrink:0 on the value meant it did not stop at the card edge: "Natural Minor" at 17px is 133px of monospace in a 135px card, painted over the Dynamic Range value next to it. The long labels had the same problem in the other direction. "DYNAMIC RANGE" and "TEMPO STABILITY" wrapped to a second line, and because the card centres its content the second line landed on top of the value rather than below it. Values, labels, qualifiers, padding and gaps now scale with the viewport through clamp(), the way the top bar does since #665. Labels are pinned to one line, and both they and the values clip with an ellipsis as a last resort rather than escaping the card. The qualifier shrinks four times as fast as the value beside it, so "Peak -0.3 dB" gives up its width before the number does. The presence row below gets the same treatment, which is what stops "BASS DEPTH" reading as "BA..." at the width where the row above was already broken. Measured rather than eyeballed: rendering the panel's real markup against both stylesheets and checking every span for overflow, wrapping and clipping shows the old CSS overflowing at 920px and 1000px and clipping five labels, and the new CSS clean at 420, 600, 880, 920, 1000, 1100, 1250, 1440, 1600 and 1920px. Closes #688
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.
Closes #688
The seven metadata cards size their text in fixed pixels while the row they sit in is a seven column grid that tracks the window. Below about 1250px the text is wider than the card holding it, and
flex-shrink: 0on the value meant it did not stop at the card edge. "Natural Minor" at 17px is 133px of monospace in a 135px card, painted over the Dynamic Range value beside it.The long labels failed the other way. "DYNAMIC RANGE" and "TEMPO STABILITY" wrapped to a second line, and because the card centres its content that line landed on top of the value instead of below it.
What changed
Values, labels, qualifiers, padding and gaps scale with the viewport through
clamp(), the way the top bar has since #665. Labels are pinned to one line. Labels and values clip with an ellipsis as a last resort rather than escaping the card. The qualifier shrinks four times as fast as the value beside it, so "Peak -0.3 dB" gives up its width before the number does.The presence row below gets the same treatment, which is what stops "BASS DEPTH" reading as "BA..." at the width where the row above was already broken.
CSS only. No markup, no script, no strings.
How it was checked
The panel's real markup, rendered against both the old and the new stylesheet, with every span measured for overflow past its card, for wrapping to a second line, and for clipping.
Local gate: Playwright 259 passed,
test:js48 passed, ruff, ruff format, bandit, i18n coverage anduv.lockall clean.pytesthas two pre-existing failures intest_stems_api.py, both from this machine's ffmpeg being built without libvorbis, which no stylesheet can reach.