fix: TabbedChips working activeColor & activeBackground#766
Merged
cb-ekuersch merged 8 commits intoJun 23, 2026
Conversation
Collaborator
✅ Heimdall Review Status
✅
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
✅
1/1
|
Denominator calculation
|
Contributor
cb-ekuersch
commented
Jun 23, 2026
…g on mobile and add feature parity on web bug Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
…ure parity on web
- Mobile: destructure activeColor from DefaultTabComponent props to prevent it
from leaking into ...tabProps and spreading as an unknown prop onto MediaChip;
apply background={isActive && activeColor ? activeColor : undefined} and
invertColorScheme={isActive && !activeColor} instead of unconditional inversion
- Mobile: add activeColor?: BoxProps['background'] to TabbedChipProps type
- Web: add activeColor?: ThemeVars.Color to TabbedChipProps type (feature parity)
- Web: apply same background/invertColorScheme logic in DefaultTabComponent
- Add story examples demonstrating activeColor usage on both platforms
- Add unit tests verifying activeColor tabs render correctly and maintain selection state
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
…d mobile Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
b70e1ce to
1b7fe42
Compare
stacysun-cb
previously approved these changes
Jun 23, 2026
hcopp
reviewed
Jun 23, 2026
hcopp
reviewed
Jun 23, 2026
… for label color on web and mobile - Renamed activeColor → activeBackground (chip background) to align with Tabs semantics - Added activeColor as a separate per-chip prop for label text color, typed from MediaChipBaseProps['color'] - Omit activeColor from TabbedChipsBaseProps Omit list to prevent container-level bleed-through from TabsBaseProps - Updated stories, tests, and demos to cover both props with valid theme tokens Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
…r in TabbedChips Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
hcopp
reviewed
Jun 23, 2026
hcopp
reviewed
Jun 23, 2026
…r in TabbedChips Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
hcopp
approved these changes
Jun 23, 2026
hcopp
left a comment
Contributor
There was a problem hiding this comment.
Code looks good, will try to watch CI as well
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.
What changed? Why?
Introduces working
activeBackgroundandactiveColorprops to the alphaTabbedChipscomponent on both web and mobile, and fixes a pre-existing mobile bug whereinvertColorSchemewas applied unconditionally.What was happening before this PR
activeColorwas appearing in the docsite props table forTabbedChips— but this was entirely accidental.TabbedChipsBasePropsextendsOmit<TabsBaseProps, ...>and only omittedactiveBackgroundfromTabsBaseProps, soactiveColor(whichTabsuses for tab label text color, typed asResponsiveProp<ThemeVars.Color>) leaked through intoTabbedChipsPropsvia type inheritance. It was never declared onTabbedChipProps, never destructured inDefaultTabComponent, and never wired to any chip behavior — it silently fell into...tabPropsand was spread as an unknown prop ontoMediaChipwhere it had no effect.What this PR does
Introduces
activeBackground(chip background color, per-chip onTabbedChipProps)A new, intentionally defined prop that applies a custom background color to a chip when it is the active tab. When set, it takes precedence over the default
invertColorSchemebehavior. Typed asMediaChipBaseProps['background']since the value is forwarded directly toMediaChip'sbackgroundprop.Introduces
activeColor(chip label text color, per-chip onTabbedChipProps)A new, intentionally defined prop that applies a custom foreground color to a chip's label text when it is the active tab. Typed as
MediaChipBaseProps['color']since the value is forwarded directly toMediaChip'scolorprop.Closes the type-inheritance bleed-through
Adds
activeColorto theOmitlist inTabbedChipsBaseProps(alongsideactiveBackground), preventing the accidental Tabs-levelactiveColorfrom leaking into the TabbedChips type surface.Fixes mobile
invertColorSchemeunconditional applicationBefore this PR,
invertColorScheme={isActive}was hardcoded unconditionally in mobile'sDefaultTabComponent. This meant the chip always inverted its color scheme when active regardless of any other props. The fix makes it conditional:invertColorScheme={isActive && !activeBackground}.Adds web feature parity
activeBackgroundandactiveColorhandling inDefaultTabComponentwas added to web, matching the mobile implementation.Root cause summary
activeColorin docsite with no effectTabsBasePropsvia incompleteOmitlist; never declared or destructured inTabbedChipPropsinvertColorScheme={isActive}was hardcoded unconditionallyactiveBackground/activeColorwere never implemented on webLinear: https://linear.app/coinbase/issue/CDS-2211/tabbedchips-fix-activecolor-bug-on-mobile-and-add-feature-parity-on
UI changes
Testing
How has it been tested?
Testing instructions
alpha/TabbedChipsstory in Storybook (web) or theAlphaTabbedChipsscreen in the Expo app (mobile)bgPositive(green) background instead of the default inverted color schemefgPositivewhile the chip still usesinvertColorSchemefor its backgroundinvertColorSchemecorrectly when neither prop is setIllustrations/Icons Checklist
N/A — no changes to illustrations or icons.
Change management
type=routine
risk=low
impact=sev5
automerge=false