Repository navigation
fix(sdk): draw a ring part inside a repeated copy - #2225
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 08b4428 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 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 08b4428aTotal time: 15m 26s | Comparison time: 37m 6s | Estimated savings: 21m 40s (58.4% 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 ReportNo component schema changes detected.This comment was automatically generated by the component schema diff tool. 🤖 |
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
Fixes a
ringpart listed inchildrenof a repeated copy (a collection item or a nested repeat). The solver treated the ring as a flowed child and readcoloron it, which trips theREAD_PROPSdebug assertion inrp(sdk/core/src/visual.rs).compile_partsmoves a ring out of its parent'schildrenand sets the ring'shostto that parent, so the solver never flows a ring (native-only code, not in the wasm solver).hostroots. 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.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
gaprelationship unbound. With this fix a copy draws a ring exactly as a plain root does.How Has This Been Tested?
sdk/core/tests/ring_in_repeat.rs(10 tests) with fixtures intests/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).hostfails 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 warningsclean. After merging main:cargo test -p design-data-core1684 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 validateoutput identical to BASE as a sorted set.sdk/wasm-visual/test/budget.test.mjslatency 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.svgandnested.svg.Types of changes
Checklist: