Skip to content

ROU-13017: Add shape utilities and radius CSS API - #1245

Open
OS-giulianasilva wants to merge 7 commits into
ROU-12714from
ROU-13017
Open

OS-giulianasilva wants to merge 7 commits into
ROU-12714from
ROU-13017

Conversation

@OS-giulianasilva

Copy link
Copy Markdown
Contributor

This PR is for adding .shape-* utilities and wiring widget and pattern chrome through the --border-radius cascade so a single class can restyle radius without changing defaults.

What was happening

  • Theme-layer radius knobs, utility class names, and token sizes did not match, so .shape-* could not restyle chrome.
  • Widgets and patterns bound tokens or knobs directly and ignored --border-radius.
  • Changing --border-radius-softer from 16px to 12px would have flattened surfaces that must stay 16px.

What was done

  • Retargeted :root knobs (softer = 12px, softest = 16px), kept --border-radius-none for TypeScript ShapeTypes, and added .shape-* utilities including .shape-rectangular.
  • Wired widget and pattern chrome through var(--border-radius, var(--border-radius-)); Tag, Avatar, and Badge keep legacy .border-radius-soft at 4px.
  • Documented the naming split, token map, and exceptions in ADR-0010.
  • Exposed StyleClasses on widget roots and ExtendedClass on pattern configs in Storybook so .shape-* can be inspected in isolation.

Test Steps

  1. Run Storybook and open Foundations / Shape. Confirm the five .shape-* classes and that .shape-rectangular maps to --border-radius-none.
  2. Open a widget story (Button, Input) with no StyleClasses: default radius is unchanged. Add StyleClasses = shape-rounded and confirm the chrome updates.
  3. Repeat on a JS pattern (Accordion, Dropdown) via ExtendedClass = shape-softest, then shape-rectangular.
  4. Check Tag, Avatar, and Badge with .border-radius-soft: radius stays 4px, not 8px.
  5. Confirm Card and Accordion first/last items stay 16px (softest), not 12px (softer).
  6. Confirm Balloon, BottomSheet, and OverflowMenu still resolve ShapeTypes.Sharp to --border-radius-none.

Screenshots

(prefer animated gif)

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

OS-giulianasilva and others added 7 commits September 1, 2026 21:52
Keep --border-radius-none for the TS ShapeTypes contract, map softer to 12px and softest to 16px, and emit .shape-* classes that set --border-radius.

Co-authored-by: Cursor <cursoragent@cursor.com>
Component radius APIs now inherit .shape-* via var(--border-radius, var(--border-radius-<today>)), so per-instance shape overrides work without touching tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
Retarget former 16px softer defaults to --border-radius-softest so today's radii stay, and let .shape-* restyle chrome through the same fallback chain.

Co-authored-by: Cursor <cursoragent@cursor.com>
Capture the naming split, token mappings, component contract, and legacy utility exceptions so later radius work does not collapse --border-radius-none or .border-radius-soft.

Co-authored-by: Cursor <cursoragent@cursor.com>
Let widget StyleClasses land on the widget root and pass ExtendedClass through pattern configs so chrome can be inspected with .shape-* in isolation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Turn on --utilities so the token pipeline emits the utility classes the radius theme layer depends on.

Co-authored-by: Cursor <cursoragent@cursor.com>
@OS-giulianasilva
OS-giulianasilva requested a review from a team as a code owner September 1, 2026 21:07
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🖼️ Storybook: Chromatic UI tests result: ✅ Passed

Metric Value
Visual changes 0
Errors 0
Storybook Preview
Chromatic Build View Results

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