Repository navigation
fix: keep a playground's page buttons and outputs when a script moves them into a generated element - #6384
Merged
Conversation
… 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
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.
#6375 made a playground ignore every control inside a
data-lf-genelement, so that a preview widget's own generated controls (lf-motion'stimeandspeed) stop counting as the page's fields. It put that test inmember, 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 withgeneratedElementnow 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_controlscovers exactly that page, and it failed on main in push run 44269587200 with two.lf-playground-rail, .lf-playground-actionselements where it expected none.output[for]slots were exposed to the same exclusion, because the view itself marks each slot withgeneratedElement.The generated-control exclusion now applies only where the view collects named
input/select/textareafields. 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_controlsfails on main (the CI run above) and passes on this branch.pnpm run test:runtimepasses (1020), including the generated range and select fixture fix: read no playground field from a control a preview widget generated #6375 added totests/runtime/playground-view.test.mjs.test_page_fixture_renders(--run-nightly) formotion-playground,alert-thresholds,data-explorerandplaygroundpasses, so motion-playground still posts nothing at rest.tests/browser/widgets/test_playgrounds.pypass.Refs #3985 — automated triage