Repository navigation
Hide a quoted playground's boxes that hold only controls - #3276
Merged
Merged
Conversation
A playground quoted in a static sample hides its controls, those written beside items in its preview included (#2711), but the box the page wrote around an item's controls kept its border, padding and height and stood empty beside the item. The playground's initial drawing now marks, in a quoted playground, each element of the preview that holds nothing but controls, blank text and other such boxes, at any depth, and the theme hides it with the controls. A box that also holds words or another element keeps them. The rule is important because the page's own stylesheet outranks the package layer and usually sets that box's display, as `.alert-settings` does; a settled option's collapse uses `!important` for the same reason. A live playground marks nothing and is unchanged. `tests/fixtures/pages/quoted-playground.html` quotes an alert playground with a settings box beside each alert: one with a sentence before its control, one with each control in a field of its own. It joins the corpus and backs the `quoted-playground` stills state, and the new browser test fails on the base with the latency box visible. A page whose grid gives the settings box a fixed track, as `examples/alert-thresholds.html` does, keeps that track empty when quoted; the fixture's flex row lets the evidence take the width. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 20, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 20, 2026
A quoted playground's stage kept the live stage's 18rem minimum height, so below its artifacts it stood empty. The corpus's "Alert settings page, as first proposed" (`tests/fixtures/pages/quoted-playground.html`) showed 111px of empty stage under its last alert at 1400x900, after #3276 had removed the empty settings boxes beside each alert. A quoted stage shows what was authored and never changes, so it now takes its artifacts' height. A live stage keeps the minimum. The quoted-playground test now also checks that the stage ends below its last artifact, and fails without the rule. Found by the overnight UI sweep. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 28, 2026
The quoted-playground test now checks rendered text with `use_inner_text=True`. #4545 moved initial delivery and live updates onto a shared Lit view; it retains option labels beneath hidden controls, so the old `textContent` assertion reads words that occupy no visible box. This preserves that renderer and the quotation behavior introduced by #3276. The original assertion reproduces the reported failure locally. Browser inspection confirms the control has `display: none`, a zero-sized rectangle, and no contribution to the settings box's `innerText`; the CI failure screenshot also shows only the expected sentence. With the corrected reading, the reported test and the related static-preview test pass (2 passed). All control-visibility, empty-box and stage-spacing assertions remain. Closes #4567 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
A playground quoted in a static sample hides its controls, those written beside items in its preview included (#2711), but the box the page wrote around an item's controls kept its border, padding and height and stood empty beside the item.
The playground's initial drawing (
initial/lf-playground.js) now marks, in a quoted playground only, each preview element that holds nothing but controls, blank text and other such boxes, at any depth, andtheme.csshides it with the controls. A box that also holds words or another element keeps them. The rule is!importantbecause the page's own stylesheet outranks the package layer and usually sets that box's display, as.alert-settingsdoes; a settled option's collapse uses!importantfor the same reason. A live playground marks nothing and is unchanged (theplayground-controlsstill is identical).tests/fixtures/pages/quoted-playground.htmlquotes an alert playground with a settings box beside each alert: one with a sentence before its control, one with each control in a field of its own. It joins the corpus and backs a newquoted-playgroundstills state. The new browser test fails on the base with the latency box visible.A page whose grid gives the settings box a fixed track, as
examples/alert-thresholds.htmldoes, keeps that track empty when quoted; Leaf can't know the page's grid, and the fixture's flex row lets the evidence take the width.Reviewed by Codex in two rounds: the first, of a pure-CSS
:has()version, found that bare text beside a control was hidden with its box and that a box nesting control wrappers stayed empty; this version fixes both, and the second round found nothing.