Repository navigation
fix: size the contents map's first box from its toggle's face, and list lf-age's first-paint change - #7189
Merged
Conversation
lf-toc:empty reserved the closed toggle's height with the label face's old 1.3 leading. #7156 merged --lf-font-label into --lf-font-heading, whose leading is 1.45, so the upgraded toggle stood 1-2px taller than its first paint. The empty element now takes the toggle's face and reserves 1lh plus the toggle's padding, so the two boxes read one token. The same test also reported lf-age, which first paints the author's words and then the age the runtime computes. That is the content-derived change lf-age's registry entry already tells authors to plan for, so it joins the known findings. Closes #7179
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.
test_bundled_widgets_meet_the_widget_quality_checkshas failed in the nightly journeys since #7156. The[default]case failed onlf-tocand the[browser]case onlf-age. Both cases pass with this change.lf-toc(the cause test_bundled_widgets_meet_the_widget_quality_checks: lf-toc's box grows 1-2px at upgrade since #7156 #7179 tracks). Before its outline arrives,lf-toc:emptyreserves the closed toggle's height. That reservation hard-coded the label face's leading asvar(--lf-t-6) * 1.3 + 14px. Merge 21 theme tokens into the roles they alias or nearly copy #7156 merged--lf-font-labelinto--lf-font-heading, whose leading is 1.45, so the upgraded toggle (.lf-label) grew taller than its first paint: 29px → 31px in a column page and 28px → 29px in a workspace page. The empty element now takes--lf-font-headingand reserves1lh + 14px, which is the toggle's line plus its padding. The first box and the toggle now read one token, so a later change to the face can't pull them apart again. On screen, the closed contents toggle's first-paint box is about 2px taller, the height the toggle already has once upgraded. Nothing else moves.lf-age. This failure was also in scheduled run 45598918111, and no cause issue owned it. An age first paints the words its author wrote, such as "24 Nov, 02:10 UTC", until the runtime defines the element and draws the computed age, such as "1d ago". Its registry entry already tells authors that an age changes width and how to reserve its room. So this is the kind of content-derived startup changeknown_widget_findings.pyexists to list, and it joins that list underbrowser.Verification: at
32dc564a8,uv run pytest tests/journeys/test_widget_quality.py --run-nightlyfails on both findings. On this branch the file's 19 tests pass.tests/browser/widgets/test_contents_and_glosses.pyand the theme and font model tests also pass.Closes #7179 — automated triage