Repository navigation
feat(visuals): component visual recipe format and SVG renderer (1/6, merge commit not squash) - #1575
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds switch anatomy, color relationships, nested box layout, ring around a part, and handle-only press target to the renderers (Rust + JS runtime). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow a single conditional entry per prop (when, relativeTo), add the trackColor prop, and validate every recipe in design-data:validate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…EC-060..063) Add Layer 2 rules that check visuals/*.json against component and relationship data, and a --visuals-path option on design-data validate. Add the progress anatomy part to action-button and drop xs from the button sizeScale.
… candidates Rank candidates against the requested size instead of dropping those pinned to another size, and cover it with a gap-by-size test.
…eout root:ai-check failed because sdk/plugins/site and its assets package were not in the inventory. sdk-wasm:test timed out because the visual parity test builds the site with the debug CLI at import time.
🦋 Changeset detectedLatest commit: 9f1de95 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 9f1de955Total time: 8m 11s | Comparison time: 15m 49s | Estimated savings: 7m 38s (48.3% 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, 4 updated)Original Branch: ✅ No Breaking ChangesThis PR contains only non-breaking changes to component schemas. 🔄 Non-Breaking Updatesaction-button badge button switch This diff was generated automatically and contains only backward-compatible changes. This comment was automatically generated by the component schema diff tool. 🤖 |
…mment Also say in the changeset that the badge isDisabled option is removed.
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.
Description
Merge with a merge commit, not squash, so the stacked slices keep their commit identities.
Part 1 of 6 of the visual recipes work from draft #1569, targeting the long-lived integration branch
next/visual-recipes(notmain).This slice adds the recipe format and everything needed to render one:
spec/component-visuals.md(draft RFC), thecomponent-visualschema, and avisual-schemaenforcement script wired intodesign-data:validate.sdk/core/src/visual.rs: compiles a recipe against the token graph and builds a scene (box, text, icon, nested flow layout, per-corner radius, pressed scale), then emits SVG. Scene token refs carry the alias chain.design-data render(SVG),Dataset.renderSceneandDataset.renderSvgin the browser.design-data site --out <dir>writes a static explorer (sdk/plugins/site). It starts here because the first site commit is bundled with the renderer in feat: component visual recipes, renderer, and static explorer site #1569.visuals/{action-button,button,badge,switch}.json, with their anatomy incomponents/and 15 switch color relationships.validate --visuals-path).Not in this slice: more recipes (checkbox), option constraints and recipe lints (slice 2a), relationship-bound recipes (2b), site UI polish and WASM parity tests (3), anatomy standard (4), platform-aware rendering (5).
Review guide for this slice, in order:
packages/design-data-spec/spec/component-visuals.mdandpackages/design-data-spec/schemas/component-visual.schema.json: the format.sdk/core/src/visual.rs: compile and scene building (largest file, 2.2k lines).packages/design-data/visuals/*.json: pilot recipes (large JSON; read one, skim the rest).sdk/core/src/validate/rules/spec06*.rs: SPEC-060 to 063.sdk/plugins/site,sdk/cli/src,sdk/wasm: consumers.Related Issue
Epic spectrum-design-data-p6ga (component visual recipes); slicing tracked in p6ga.9; split from #1569.
Motivation and Context
#1569 is about 100 commits and cannot be merged to
mainuntil the recipes are complete. The owner wants the normal workflow of small reviewable PRs, so the work is cut into six slices that land onnext/visual-recipesand reachmainin one final merge.How the slice was made: the 14 commits of #1569 up to the AI inventory fix, cherry-picked in order onto
next/visual-recipes(which ismainat the #1574 release). Commits already onmainwere skipped. One conflict, SPEC-072 sitting next to SPEC-060 to 063 inrules.yamlandrules/mod.rs, was resolved by keeping both.How Has This Been Tested?
On the slice head, in a clean worktree:
cargo fmt --checkandcargo clippy --workspace --all-targets -- -D warningsmoon run sdk:test sdk-wasm:test design-data:validate design-data:validate-dataset tokens:verifyLegacyOutput: all pass; legacy output unchangednode tools/changeset-linter/src/cli.js check --fail-on-warnings: 1 validnode .github/scripts/check-ci-coverage.mjs: 0 uncoveredpnpm ai:checkvalid;git diff pnpm-lock.yamlemptyThe slice boundary after this one (2a) was also verified by stacking 2a and 2b on this branch and running the same checks.
Screenshots (if appropriate):
N/A (SVG output is covered by the tests above; the site is reviewed in slice 3).
Types of changes
Changeset:
component-visual-recipes(minor for@adobe/spectrum-design-data,@adobe/design-data-spec,@adobe/design-data-wasm). It accumulates on the integration branch and is not released until the final merge tomain.Checklist: