Skip to content

chore(core): document clamp_radius and assert the button-ios radius token is bound - #1591

Merged
GarthDB merged 1 commit into
mainfrom
chore/clamp-radius-followups
Nov 2, 2026
Merged

GarthDB merged 1 commit into
mainfrom
chore/clamp-radius-followups

Conversation

@GarthDB

@GarthDB GarthDB commented Nov 1, 2026

Copy link
Copy Markdown
Member

Description

Follow-ups to #1590 (comment and test only):

  • Restore the Closed outline of a rect with independent corner radii [tl, tr, br, bl]. doc line above rounded_path in sdk/core/src/visual.rs. fix(core): clamp the corner radius to half the box so an oversized radius draws a pill #1590 inserted clamp_radius between that line and its function.
  • Give clamp_radius its own doc: a corner radius cannot exceed half the box's width or height, like CSS border-radius.
  • Strengthen the cli_platform.rs assertion for render button --platform ios. It now checks that the scene binds the button-md-radius-capsule token (value 20px) and that the container radius equals min(token value, height / 2), which is 17.1 for m. Before, it only checked radius == height / 2, which would also pass if the token were not bound.

No behavior change.

Related Issue

Follow-up to #1590 (p6ga.8.59), found in review.

Motivation and Context

A wrong doc placement and an assertion that did not prove the radius token is bound.

How Has This Been Tested?

  • cargo test -p design-data-cli --test cli_platform passes (29 tests).
  • Run: cargo fmt --check, cargo clippy --all-targets -- -D warnings, moon run sdk:test sdk-wasm:test design-data:validate design-data:validate-dataset tokens:verifyLegacyOutput root:validate-platform-recipes root:test-platform-recipes-guard root:test-platform-recipes-e2e --force (1,738 Rust tests and 126 WASM tests pass), the changeset linter with --fail-on-warnings, check-ci-coverage and ai:check, all passing. pnpm-lock.yaml is unchanged; cargo check --all-targets passes.
  • No changeset: comment and test only, no published artifact changes behavior.

Screenshots (if appropriate):

N/A

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.

…oken is bound

Restore the rounded_path doc line, give clamp_radius its own doc, and make the
cli_platform test check radius == min(token value, height / 2).
@changeset-bot

changeset-bot Bot commented Nov 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f6ac622

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Nov 1, 2026

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

github-actions Bot commented Nov 1, 2026

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. 🤖

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Run report for f6ac622e

Total time: 4m 45s | Comparison time: 6m 54s | Estimated savings: 2m 8s (31.0% faster)

Action Time Status Info
⬛️ SetupProto(0.57.4) 0ms Skipped
🟩 SyncWorkspace 10.9ms Passed
🟩 SyncProject(sdk) 0.7ms Passed
⬛️ SetupToolchain(node:20.17.0) 669.9ms Skipped
⬛️ SetupToolchain(rust:1.88.0) 1.2s Skipped
🟩 SetupEnvironment(rust, sdk) 116.6ms Passed
⬛️ InstallDependencies(rust, sdk) 2.7ms Skipped
⬛️ SetupToolchain(pnpm:10.17.1) 1.1s Skipped
⬛️ SetupToolchain(javascript) 0ms Skipped
⬛️ SetupEnvironment(javascript, sdk) 0.7ms Skipped
🟩 RunTask(sdk:fmt-check) 1.1s Passed
🟩 InstallDependencies(javascript, sdk) 7.2s Passed
🟩 RunTask(sdk:codegen-check) 293.9ms Passed
🟩 RunTask(sdk:lint) 1m 6s Passed
🟩 RunTask(sdk:test-doc) 2m 11s Passed SLOW
🟩 RunTask(sdk:test) 4m 36s Passed SLOW
Changed files
sdk/cli/tests/cli_platform.rs
sdk/core/src/visual.rs

@GarthDB
GarthDB merged commit 5efe98d into main Nov 2, 2026
9 checks passed
@GarthDB
GarthDB deleted the chore/clamp-radius-followups branch November 2, 2026 17:22
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