Repository navigation
feat(visuals): checkbox recipe, option constraints and recipe lints (2a/6) - #1576
Merged
GarthDB merged 16 commits intoOct 31, 2026
Merged
Conversation
added 16 commits
October 31, 2026 14:41
Add fuchsia-subtle background relationships, trim the non-semantic background context string, default variant and style, and rename the info variant to informative to match the registry, tokens, and Figma.
…kens The badge relationships and recipe referenced the white and black palette tokens deprecated in 15.6.0. Repoint them to transparent-static-white-1000 and transparent-static-black-1000, which have identical values.
The size M, L, and XL icon-only relationships pointed at accessory-item padding (5, 7, 9px). Figma resolves 7, 10, and 13px, which is base-padding-vertical, as size S already did.
Add the checkbox anatomy, the box and dash anatomy terms, and a recipe covering size, selected, indeterminate, emphasized, disabled, and error. The renderers draw checkmark and dash glyphs through a new recipe glyph field, and size conditions now match the requested size instead of the default.
Read component constraints in sdk/core. SPEC-064 (error) checks that constraint option names and values are declared. SPEC-065 (warning) flags recipes and relationships that match only combinations excluded by an error constraint. Closes hb15.4, hb15.5.
… explain them Evaluate component constraints in the browser (constraints.js, mirroring constraints.rs), drop excluded matrix rows and columns, footnote advisory cells, mark unsupported picker values, and explain unsupported selections with one-click fixes. A shared fixture keeps the Rust and JS evaluations in lockstep.
…ption conditions Button static black/white now renders correctly (qkj5.43-.48): variant and style conditions on static label, icon, fill and border rules, plus static focus ring, disabled and outline hover/down rules. The recipe renderers (sdk/core, site runtime) now match array values in when.options, as the spec already described (qkj5.49).
SPEC-061 compared the whole array to the option's declared values, so button.json's variant [primary, secondary] failed with 14 errors. Check each element, for both the declared-values and boolean checks.
Describe the recipe lints from the component-visuals table and the Rust rules. Keep the ids in order: SPEC-072 now follows SPEC-071.
🦋 Changeset detectedLatest commit: 5e2f478 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Run report for 5e2f4783Total time: 8m 58s | Comparison time: 16m 49s | Estimated savings: 7m 51s (46.7% faster)
Expanded report
Changed files |
Contributor
🎨 Token Changes ReportTokens Changed (0)Original Branch: This comment was automatically generated by the token diff tool. 🤖 |
Contributor
🧩 Component Schema Changes ReportComponent Schemas Changed (0 added, 0 deleted, 6 updated)Original Branch: ✅ No Breaking ChangesThis PR contains only non-breaking changes to component schemas. 🔄 Non-Breaking Updatesaction-button badge button checkbox radio-button switch This diff was generated automatically and contains only backward-compatible changes. This comment was automatically generated by the component schema diff tool. 🤖 |
This was referenced Oct 31, 2026
Merged
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.
Squash merge is fine; the next slice is rebased onto the result.
Part 2a of 6 of the visual recipes work from draft #1569, targeting the long-lived integration branch
next/visual-recipes(notmain). Based on #1575 (slice 1).Description
This slice adds the checkbox recipe, option constraints, and the recipe lints. It does not bind recipes through relationships; that is slice 2b.
visuals/checkbox.json, its anatomy, relationship contexts (theS2prefix is stripped; error and disabled bindings), andisSelected-scoped selected relationships.constraintson the component format (spec/option-constraints.md,component.schema.json) with first constraints on button, action-button and checkbox, taken from react-spectrum S2. SPEC-064 and SPEC-065 validate them. The site matrix skips combinations anerrorconstraint excludes and explains why.recipe_lint_baselineholds each recipe at its current warning count, so a new warning fails and an improvement must lower the baseline.pressTarget).isReadOnlyhas no distinct visual.Catalog: a separate
docs(spec)commit adds SPEC-066 to 071 torules/rules.yaml(they had Rust rules and spec text but no catalog entries, as in #1569), written from the component-visuals table and the Rust rules, and puts SPEC-072 after them so the ids run in order. A test that keeps the code and the catalog in step is filed separately (not in this PR).Review guide, in order:
spec/option-constraints.md,component.schema.json,sdk/core/src/constraints.rs: the constraints format and its checks.sdk/core/src/validate/rules/spec06[4-9].rs,spec07[01].rs,recipe_lint_baseline.rsand the newrules.yamlentries: the rules.packages/design-data/visuals/checkbox.jsonand the checkbox relationships and component data.visual.rspress scaling, site matrix).Related Issue
Epic spectrum-design-data-p6ga (component visual recipes); slicing tracked in p6ga.9; split from #1569. Part 2a of 6, after #1575.
Motivation and Context
Slice 1 landed the format, the renderer and the four pilot recipes. This slice adds the fifth recipe (checkbox) and the guard rails that keep recipes honest: constraints so the matrix renders only valid combinations, and lints with a baseline so recipe quality cannot regress silently.
How the slice was made: the 15 commits of #1569 (plus one
docs(spec)commit for the catalog) between the end of slice 1 and the first relationship-binding commit, cherry-picked in order ontonext/visual-recipes. Commits already onmainwere skipped. Conflicts were only SPEC-072 sitting next to the new rules inrules.yamlandrules/mod.rs; both were kept. The recipe lint baseline needed no edit.How Has This Been Tested?
On the slice head, in a clean worktree, rebased onto the merged slice 1:
cargo fmt --checkandcargo clippy --workspace --all-targets -- -D warningsmoon run sdk:test sdk-wasm:test design-data:validate design-data:validate-dataset tokens:verifyLegacyOutput --force(uncached): all 11 tasks pass; legacy output unchangednode tools/changeset-linter/src/cli.js check --fail-on-warnings: 7 validnode .github/scripts/check-ci-coverage.mjs: 0 uncoveredrules.yamlparses with 72 rules, each withintroduced_in, and every rule id implemented insdk/corehas an entry (ad hoc check)pnpm ai:checkvalid;git diff pnpm-lock.yamlemptySlice 2b was also stacked on this one and passes the same checks.
Screenshots (if appropriate):
N/A
Types of changes
Changesets:
option-constraints,option-constraints-rules,option-constraints-matrix,visual-recipe-array-conditions,button-static-color-recipe,checkbox-relationship-context-prefix(new), and an addition tocomponent-visual-recipes. They accumulate on the integration branch and are not released until the final merge tomain.Checklist: