Skip to content

fix(sdk): draw a ring part inside a repeated copy - #2225

Merged
GarthDB merged 3 commits into
mainfrom
fix/ring-in-repeated-copy
Nov 27, 2026
Merged

GarthDB merged 3 commits into
mainfrom
fix/ring-in-repeated-copy

Conversation

@GarthDB

@GarthDB GarthDB commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes a ring part listed in children of a repeated copy (a collection item or a nested repeat). The solver treated the ring as a flowed child and read color on it, which trips the READ_PROPS debug assertion in rp (sdk/core/src/visual.rs).

  • compile_parts moves a ring out of its parent's children and sets the ring's host to that parent, so the solver never flows a ring (native-only code, not in the wasm solver).
  • The ring pass draws a ring only in the scene its host roots. An orphan ring (no host, the shape every shipped recipe uses) is drawn by the recipe's own root only, so a repeat no longer draws it around every copy as well.
  • Limit: a floating part whose only child is a ring is no longer a subtree; give it another child.
  • No component recipe or token changes. No wasm API change.

wasm-visual size, same toolchain, BASE vs PR: raw 523,911 -> 524,004 (+93), gzip 199,905 -> 199,952 (+47). CI (Linux): 527,285 raw / 200,313 gz. The budget (528,000 / 201,100) is unchanged.

Related Issue

Ask A743 (Garth). Unblocks the list-view focus outline (a ring on the row) as a follow-up PR; this PR changes no recipe data.

Motivation and Context

The list-view recipe draws its focus outline as a conditional stroke on the row because a ring in a repeated copy panicked a debug build, and so leaves the focus-indicator gap relationship unbound. With this fix a copy draws a ring exactly as a plain root does.

How Has This Been Tested?

  • New sdk/core/tests/ring_in_repeat.rs (10 tests) with fixtures in tests/fixtures/ring-repeat/: collection and nested repeat goldens (SVG), equivalence of the copy's ring to a ring on a plain root, ring in a repeat in a repeat, gap 0, rounded and square box, ring + conditions (visibleWhen, option-conditional stroke), inside ring around a part of the copy, floating part, slot fill, orphan ring, ring deeper than the scene root, ring in a row box. They fail on the old code (debug assertion).
  • Mutation: not moving rings at compile fails 9 of 10; ignoring host fails 5; orphans never drawn or drawn in every scene fails the orphan test.
  • cargo test --workspace --no-fail-fast: 2792 passed, 0 failed. cargo fmt --check, cargo clippy --workspace --all-targets -D warnings clean. After merging main: cargo test -p design-data-core 1684 passed, 0 failed.
  • node tools/render-compare/render-compare.mjs --sample 10 (BASE = merge base eb91d48): 6449 of 65272 cases, all byte-identical, 818 collection cases, png sample 20 identical, spec-sheet --all 92 components, 0 rows lost, gained or regrouped. PASS.
  • design-data behavior test --all: 605 passed, 0 failed. design-data validate output identical to BASE as a sorted set.
  • Not green locally on either side: sdk/wasm-visual/test/budget.test.mjs latency assertion (0.32 ms vs 0.2 ms) fails identically on BASE and PR on this machine (debug CLI, loaded host); the size assertions pass.

Screenshots (if appropriate):

Goldens: sdk/core/tests/fixtures/ring-repeat/collection.svg and nested.svg.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 08b4428

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@adobe/design-data-wasm Patch
@adobe/design-data-visual Patch
s2-tokens-viewer Patch
@adobe/design-data-agent-mcp Patch
@adobe/design-data-mcp Patch
@adobe/design-data Patch
@adobe/spectrum-design-data-mcp Patch
@adobe/token-naming-audit Patch
@adobe/design-data-skill Patch

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

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Run report for 08b4428a

Total time: 15m 26s | Comparison time: 37m 6s | Estimated savings: 21m 40s (58.4% faster)

Action Time Status Info
⬛️ SetupProto(0.57.4) 0.1ms Skipped
🟩 SyncWorkspace 12.9ms Passed
🟩 SyncProject(sdk-wasm-visual) 1.3ms Passed
🟩 SyncProject(sdk) 0.5ms Passed
🟩 SyncProject(design-data-mcp) 3.6ms Passed
🟩 SyncProject(sdk-wasm) 1.1ms Passed
⬛️ SetupToolchain(node:20.17.0) 249.8ms Skipped
⬛️ SetupToolchain(rust:1.88.0) 361.7ms Skipped
⬛️ SetupToolchain(pnpm:10.17.1) 199ms Skipped
⬛️ SetupToolchain(javascript) 0ms Skipped
🟩 SetupEnvironment(javascript) 1.1ms Passed
⬛️ InstallDependencies(javascript) 0.1ms Skipped
⬛️ SetupEnvironment(javascript, sdk) 0.4ms Skipped
🟩 SetupEnvironment(rust, sdk) 239.2ms Passed
⬛️ InstallDependencies(rust, sdk) 0.1ms Skipped
🟩 RunTask(sdk:fmt-check) 4.9s Passed
🟩 InstallDependencies(javascript, sdk) 5.4s Passed
🟩 RunTask(sdk:codegen-check) 187.3ms Passed
🟩 RunTask(sdk:lint) 34.2s Passed
🟩 RunTask(sdk:test-doc) 1m Passed
And 11 more...
Expanded report
Action Time Status Info
🟩 RunTask(sdk-wasm-visual:build) 1m 33s Passed
🟩 RunTask(sdk:build) 1m 55s Passed
🟩 RunTask(sdk-wasm:cache-build) 2m 14s Passed SLOW
🟩 RunTask(sdk-wasm:build) 2m 13s Passed SLOW
🟩 RunTask(design-data-mcp:stage) 6.2s Passed
🟩 RunTask(design-data-mcp-eval:test) 1m 13s Passed
🟩 RunTask(design-data-mcp:bundle) 13s Passed
🟩 RunTask(figma-spec-plugin:test) 5m 25s Passed SLOW
🟩 RunTask(sdk-wasm-visual:test) 8m 5s Passed SLOW
🟩 RunTask(design-data-mcp:test) 3m 30s Passed SLOW
🟩 RunTask(sdk:test) 15m 19s Passed SLOW
Changed files
.changeset/ring-in-repeated-copy.md
sdk/core/src/visual.rs
sdk/core/tests/fixtures/ring-repeat/collection.json
sdk/core/tests/fixtures/ring-repeat/collection.svg
sdk/core/tests/fixtures/ring-repeat/nested.json
sdk/core/tests/fixtures/ring-repeat/nested.svg
sdk/core/tests/fixtures/ring-repeat/plain.json
sdk/core/tests/ring_in_repeat.rs
tools/design-data-mcp/src/cli.js

@github-actions

Copy link
Copy Markdown
Contributor

🎨 Token Changes Report

Tokens Changed (0)

Original Branch: main


This comment was automatically generated by the token diff tool. 🤖

@github-actions

Copy link
Copy Markdown
Contributor

🧩 Component Schema Changes Report

No component schema changes detected.

This comment was automatically generated by the component schema diff tool. 🤖

@GarthDB
GarthDB merged commit 523e156 into main Nov 27, 2026
13 of 14 checks passed
@GarthDB
GarthDB deleted the fix/ring-in-repeated-copy branch November 27, 2026 13:14
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