Skip to content

design system: guide corner geometry and compositing - #351118

Draft
Cherry Wang (chryw) wants to merge 6 commits into
mainfrom
dev/cherwan/agents/shape-guidance
Draft

Cherry Wang (chryw) wants to merge 6 commits into
mainfrom
dev/cherwan/agents/shape-guidance

Conversation

@chryw

@chryw Cherry Wang (chryw) commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

The Shape foundation names corner tiers but does not explain how adjacent curves relate. This expands it into a construction and review guide: classify the relationship first, then derive the geometry and its paint boundary.

  • Independent controls keep their own role. A circular send button inside a composer is not automatically a concentric inset surface.
  • Nested offsets stay exact. Name the reference edges and retain token-based arithmetic rather than snapping derived values to another token. r = R - d describes concentric circles only for equal horizontal/vertical insets while d < R. An ancestor clip may already supply the intended corner.
  • Connected surfaces need a combined exterior. Tangency does not prevent double painting. A reverse curve and its horizontal connector must not sit over a separately painted full baseline.
  • Stroke geometry uses the correct reference. Border-box radii and stroke-centerline radii differ. Zero-radius joins still have stroke rectangles; cap and shoulder radii need not match.

Existing radius and stroke tokens remain the inputs; their defaults are unchanged. Frame customizations such as editorArea.cornerRadius do not change independently owned tab corners.

Evaluate the rule, not just a radius

The connected-tab fix in #351117 tests the boundary/compositing guidance across shared tab consumers. Its matched comparison shows double painting at the horizontal join and the corrected continuous boundary.

Non-tab product fixtures supplied counterexamples to an overly broad nesting rule:

Relationship Measured observation Consequence
Composer/send Composer radius 8; circular send control 22x22; bottom/right inset 7 Blind 8 - 7 produces an almost-square independent action.
Composer/editor paint Square editor paint has unequal top/left/right insets of 1/11/1 Contrasting diagnostic paint follows the ancestor clip; adding a child clip introduces notches.
Dialog/button Radii 12/4; side gap 14, beyond the dialog's corner zone Inheriting the dialog radius changes an unrelated control silhouette.

The images below show the first counterexample. These are Dark 2026 headless product fixtures; the second image changes only the send radius through page-local diagnostic CSS. The circular button is not being changed by this PR.

Existing independent control Incorrect blanket scalar rule
Existing composer with its independent circular send control Diagnostic radius of one squares the send control without improving a shared corner

These observations support the stated relationships, not preferred replacement radii or equivalence across all themes.

Validation

node .github/skills/design-system/scripts/validate.mts --root "$DOCS_WORKTREE": passed, validating 38 specifications and their owned bindings. DOCS_WORKTREE identifies this PR's checkout; the validator ran from an existing dependency-installed checkout. All 13 local Markdown links also resolved.

Documentation only. Review by predicting the resulting curve and paint ownership for a connected boundary, an independently rounded control, and an ancestor-clipped child before choosing any new numbers.

Rewrite the Shape foundation from a stub into usable guidance. Corners are
chosen by surface role, and every dependent corner is derived from that
anchor: concentric nesting (inner = outer - inset) within the corner zone,
strokes sitting on the curve, connected tabs as a matching S-curve, and one
owner for every stroke segment.

Each rule was checked against existing product surfaces, and the connected
panel tab fix serves as the worked example for stroke ownership.

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The shape guidance conflicts with tested wrapped-tab geometry and frame customization boundaries, while its radius-rounding rule breaks concentricity.

3 open issues
What changed in this PR

This documentation-only PR expands the design system’s Shape foundation into guidance for deriving corners from surface roles, nesting, and shared boundaries.

Changes:

  • Defines anchor radii, nested-corner relationships, and component-owned customization boundaries.
  • Adds stroke-ownership and connected-tab guidance, informed by the panel-tab fix in #351117.
  • Adds optical guidance and a build-and-review checklist for rounded surfaces.
File Description
.github/​skills/​design-system/​foundations/​shape.design.md Replaces brief corner-tier guidance with relationship-based geometry rules and review checks.

Review effort: Balanced

Classify independent controls, nested offsets, and ancestor clips before deriving a radius. Document connected exterior boundaries, tangent and stroke-centerline geometry, and rendered product counterexamples.

Co-authored-by: Copilot <[email protected]>
@chryw Cherry Wang (chryw) changed the title design system: derive corner shapes from relationships design system: guide corner geometry and compositing Nov 30, 2026
Cherry Wang (chryw) and others added 4 commits November 30, 2026 08:36
Integrate main at c9d084f and shorten the construction guide. Keep derived offsets exact, distinguish independent cap and shoulder radii, and preserve the frame customization contract.

Co-authored-by: Copilot <[email protected]>
Derive nested radii from the snapped border width when the frame uses device-pixel alignment.

Co-authored-by: Copilot <[email protected]>

This branch has not been deployed

No deployments
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.

2 participants