Repository navigation
Keep an embedded lf-parts in its final box from first paint - #3270
Merged
Merged
Conversation
A page of parts placed anywhere but the page's own `main`, such as inside a pane, drew every part stacked under its label until the module upgraded it, then collapsed to a row of names over the open part. The widget quality report caught it as a `keeps-first-box` finding for `lf-parts` and `lf-part` in both of its wrappers (workspace pane: 1150x105 first, 1150x67 presented). Before upgrade, the theme now shows every placement only the part the module will open, unlabelled and unpadded, with one empty strip row over it. The page's own `main` keeps its layout from layouts.css and drops that row except on a phone, as before. Probed at desktop and phone widths: the embedded case matches its presented box exactly, and code-comparison's root page paints the same first box as on main. lf-tabs.js now treats parts as the page's navigation only in a `main` that is no Layout's box, reading `--lf-layout-box` as layouts.css and the prepaint do. It used to treat parts in any `body > main` as root, so in a Layout `main` (which `page check` refuses, and the report's column wrapper uses) it drew a vertical list with summaries that the theme laid out as a row. The defect dates from #3198, which added lf-parts. The test lives in the journeys tier, which runs only in the daily run, and the last daily run predates #3198. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 20, 2026
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_checks[default]fails on main withkeeps-first-boxfindings forlf-partsandlf-part: an embedded page of parts drew every part stacked under its label until the module upgraded it, then collapsed to a row of names over the open part (workspace pane: 1150x105 first, 1150x67 presented). The failure is deterministic and dates from #3198, which addedlf-parts. The test is intests/journeys/, which only the daily run reaches, and the last daily run predates #3198, so no CI run has hit it yet.What changes
styles/tabs.css, generatedtheme.css). Before upgrade, every placement shows only the part the module will open, unlabelled and unpadded, with one empty strip row over it, so an embeddedlf-partspaints its final box. The page's ownmainkeeps its layout from layouts.css and drops that row except on a phone, as before.lf-tabs.js. Parts are the page's navigation only in amainthat is no Layout's box, read from--lf-layout-boxas layouts.css and the prepaint read it. Before, parts in anybody > maincounted as root, so in a Layoutmain(whichpage checkrefuses, and the report's column wrapper uses) the module drew a vertical list with summaries that the theme laid out as a row. Valid pages are unaffected.Checks
browser/widgets/test_tabs.py,browser/controls/test_rings.pyandbrowser/test_render_pages.py.leaf-dev probewithleaf.jsheld: embedded parts in a column section and in a workspace pane, at desktop and at phone width with touch, paint the same box before and after upgrade.code-comparison's root page of parts paints the same first box as on main, at desktop and phone width.Left open
The reserved row is
--lf-tabstrip-h, which resolves on:root. A page that overrides--aim-flooron an ancestor of the parts would get a taller strip than the reserve. Thelf-tabsreserve has the same limit, and no shipped CSS overrides--aim-floorbelow:root.