Skip to content

Fix two tests the playground's native form left failing - #6233

Merged
max-sixty merged 1 commit into
mainfrom
playground-merge-fixes
Nov 17, 2026
Merged

max-sixty merged 1 commit into
mainfrom
playground-merge-fixes

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Fixes the two tests #6231 (the playground's native form) left failing on main: the alert-thresholds example read Leaf's private --lf-choice-pad, which test_theme_tokens refuses, and now uses --lf-sp-1, the value that pad resolves to; the prepared-install journey looked for input[type=text] on a field that writes no type, and now finds it by name. I merged #6231 with its test job red (my merge gate's exit status was swallowed by a pipe); both failures are its own. Both tests pass by node id.

This was written by Claude Code on behalf of max-sixty

The alert-thresholds example pulled its choice labels back by Leaf's private
--lf-choice-pad, which a page may not read (test_theme_tokens); it now uses
--lf-sp-1, the value that pad resolves to. The prepared-install journey looked
for input[type=text], but its native field writes no type attribute; it now
finds the field by its name.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--lf-sp-1 isn't the value the choice pad resolves to. A page's label around a radio or checkbox gets --lf-choice-pad: max(var(--lf-sp-1), var(--lf-focus-ring-room)) (controls.css, "Face: Choice"), and the ring room is --lf-focus-ring-w (2px) plus --lf-focus-ring-gap (3px), so the pad is 5px while --lf-sp-1 is 4px. With this change each radio in the threshold and route fieldsets sits 1px in from its legend's edge, and the hang no longer follows the pad if the ring tokens change.

This is the use the controls.css header describes for the token: "A list that sets its marks on a heading's edge hangs each face out by that padding, --lf-choice-pad", and it lists the token beside --lf-choice-gap as something a page or package changes. package-themes.md's Controls row names only --lf-choice-gap. The test's own message gives the other fix: "name the property in the reference that owns it". So the example was right, and the gap is in the reference. I kept the original line and added --lf-choice-pad to the Controls row in skills/leaf/references/package-themes.md ("…; --lf-choice-pad, the padding around a radio's or checkbox's face, by which a list that sets its marks on a heading's edge hangs each face out"), and tests/model/test_theme_tokens.py passes 3/3 with that change. Adding a token to a shipped reference is a contract call, so I've left it to you rather than pushing it.

The journey's locator change is correct: the field is <input name="label">, written with no type.

.alert-settings fieldset > label {
justify-self: stretch;
margin-inline-start: calc(-1 * var(--lf-choice-pad));
margin-inline-start: calc(-1 * var(--lf-sp-1));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This keeps the hang equal to the face's pad. It needs --lf-choice-pad named in package-themes.md, as the review body says:

Suggested change
margin-inline-start: calc(-1 * var(--lf-sp-1));
margin-inline-start: calc(-1 * var(--lf-choice-pad));

@max-sixty
max-sixty merged commit f24e014 into main Nov 17, 2026
5 checks passed
@max-sixty
max-sixty deleted the playground-merge-fixes branch November 17, 2026 01:29
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.

2 participants