feat(react-sdk): migrate Button component to design token - #2408
Conversation
|
Important Review skippedToo many files! This PR contains 116 files, which is 16 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (116)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bundle sizeBuilt package output. Sizes in KB; delta vs
|
# Conflicts: # packages/styling/src/ParticipantView/ParticipantView-layout.scss # packages/styling/src/_icons.scss # packages/styling/src/tokens/generated/light.scss
💡 Overview
Migrates the button family to the new design system.
Before this PR there were three unrelated components:
.str-video__buttonwas a full-width CTA,IconButtonrendered a bare padded icon with no background or state, and onlyCompositeButtonproduced the round call-control pill. They are now one token-driven primitive —.str-video__buttoncarries the pill itself,IconButtonis its icon-only shape, andCompositeButtoncomposes it into the call control with an optional caption and split menu.Buttonis exported for the first time.Maps onto Figma's
Core / Web / ButtonandVideo / Web / Call Control Button.📝 Implementation notes
variant= Figma's Style,appearance= Type,active→aria-pressed= Selected.background-imagelayers, reproducing Figma'sCore / Interaction Overlay. Focus isoutlineat offset 0 — Figma's focus stroke is outside-aligned.button-visual-heighttokens:block-sizepinned,min-inline-sizea floor. The inline axis can't be pinned — it collapses the split button from 68×40 to 52×40.TextButtonButtonIconButtonWithMenuPropsCompositeButtonPropsIconButtonenabledactivevariant="success" | "danger" | "active""destructive", oractivestr-video__text-button,str-video__button__icon,str-video__call-controls__button*,str-video__composite-button__button*,str-video__menu-toggle-button*. Replaced bystr-video__button--*andstr-video__composite-button__{group,action,caret}.--str-video__composite-button__button-group*theming hooks. Buttons are themed through the design tokens now.
--str-video__spacing-*keep their names but shift onestep —
xs6→8,sm8→12,md12→16,lg16→20,xl20→24.lg, 8px → 16px), so a button sized aroundits own padding changes size.
🎫 Ticket: https://linear.app/stream/issue/REACT-1131/migrate-the-button-component-to-design-tokens
📑 Docs: https://github.com/GetStream/docs-content/pull/