Skip to content

fix: keep a playground's page buttons and outputs when a script moves them into a generated element - #6384

Merged
leaf-agent merged 1 commit into
mainfrom
fix/playground-generated-buttons
Nov 18, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/playground-generated-buttons

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#6375 made a playground ignore every control inside a data-lf-gen element, so that a preview widget's own generated controls (lf-motion's time and speed) stop counting as the page's fields. It put that test in member, which the view also uses to find the page's own submit and reset buttons and its <output for> slots. A page script that moves its authored submit button into a container it built with generatedElement now loses that button, so Leaf draws its own rail and action bar beside the page's. test_a_page_draws_the_actions_of_a_playground_without_controls covers exactly that page, and it failed on main in push run 44269587200 with two .lf-playground-rail, .lf-playground-actions elements where it expected none. output[for] slots were exposed to the same exclusion, because the view itself marks each slot with generatedElement.

The generated-control exclusion now applies only where the view collects named input/select/textarea fields. Page buttons and outputs follow the membership rule they had before #6375. #6375's case is unchanged: a widget's generated field control is still no field.

Verification:

  • test_a_page_draws_the_actions_of_a_playground_without_controls fails on main (the CI run above) and passes on this branch.
  • pnpm run test:runtime passes (1020), including the generated range and select fixture fix: read no playground field from a control a preview widget generated #6375 added to tests/runtime/playground-view.test.mjs.
  • test_page_fixture_renders (--run-nightly) for motion-playground, alert-thresholds, data-explorer and playground passes, so motion-playground still posts nothing at rest.
  • 13 field, submit, output, reset and page tests in tests/browser/widgets/test_playgrounds.py pass.

Refs #3985 — automated triage

… them into a generated element

#6375 excluded every control under data-lf-gen from the playground's
membership, which also hid an authored submit button a page script moved
into a generatedElement container, so Leaf drew its own rail and actions
beside the page's. The exclusion now applies only to field controls.

Refs #3985
@leaf-agent
leaf-agent merged commit 5dffed7 into main Nov 18, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/playground-generated-buttons branch November 18, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant