Repository navigation
Conversation
…verage (GoodDollar#303) Fixes GoodDollar#303 - packages/ui/src/components/Button.tsx: * Stop non-primary variants from re-entering light_Button sub-theme. * Add variant-aware coloring to ButtonText (primary: $textColor; non-primary: $color). * Only bind 'Button' component theme to primary buttons so non-primary variants render readable dark text in Light. - packages/ui/src/components/CircularActionButton.tsx: * Replace hardcoded $grey600 with $colorDim for pending/disabled label and spinner to adapt to light/dark themes. - packages/ui/src/components/Separator.ts: * Add maxHeight: 'none' and explicit height/minHeight/maxHeight to prevent Tamagui's horizontal maxHeight: 0 clamp from collapsing dividers to 0px. - packages/ui/src/components/TokenAmount.tsx: * Replace unresolved $text token with $color. * Replace $secondaryColor with $placeholderColor. - packages/ui/src/components-test/Input.tsx & Select.tsx: * Add placeholderTextColor: '$placeholderColor' to InputFrame. * Add borderWidth: 0 and outlineWidth: 0 to OptionItem in Select to remove browser 2px button outset border. - packages/ui/src/theme.ts: * Add textColor to base light/dark themes for consistent token resolution. - examples/storybook/src/stories/design-system/: * Add Button.stories.tsx covering all variants across Light and Dark. * Add Separator.stories.tsx covering horizontal sizes and vertical mode. * Add LightTheme and DarkTheme coverage to TokenAmount.stories.tsx. Payout: 0x759797593fed8f313d8fdba7a3a0d491f0e4b9f7 (USDC on Base L2)
deamybro
requested review from
a team and
L03TJ3
and
a balanced review from Copilot
November 11, 2026 22:03
Open
4 tasks
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Review could not proceed because the required external GoodDollar contribution guidelines could not be retrieved with the available tools.
No open issues 🎉
What changed in this PR
Updates shared @goodwidget/ui primitives to address the light/dark rendering issues in #303, complementing the streaming-widget theme changes in #291.
Changes:
- Adjusts button theme selection and semantic text colors for buttons and token amounts.
- Updates separator sizing, input placeholder colors, and select option styling.
- Adds light/dark Storybook coverage for buttons, separators, and token amounts.
| File | Description |
|---|---|
packages/ui/src/theme.ts |
Adds textColor fields to base and component themes. |
packages/ui/src/components/TokenAmount.tsx |
Changes primary and secondary text color tokens. |
packages/ui/src/components/Separator.ts |
Overrides horizontal height clamps and adjusts vertical constraints. |
packages/ui/src/components/CircularActionButton.tsx |
Uses semantic colors for disabled/pending labels and spinners. |
packages/ui/src/components/Button.tsx |
Changes frame theme selection and adds variant-aware label styles. |
packages/ui/src/components-test/Select.tsx |
Removes default option borders and outlines. |
packages/ui/src/components-test/Input.tsx |
Adds a themed placeholder color. |
examples/storybook/src/stories/design-system/TokenAmount.stories.tsx |
Adds dedicated light and dark amount stories. |
examples/storybook/src/stories/design-system/Separator.stories.tsx |
Adds stories for sizes, colors, and orientations in both themes. |
examples/storybook/src/stories/design-system/Button.stories.tsx |
Adds all-variant stories and a side-by-side theme comparison. |
Review effort: Balanced
This branch is waiting to be deployed
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.
Summary
Fixes #303. Resolves the shared UI primitive rendering and theme resolution bugs identified in
@goodwidget/uiduring the Storybook-to-Penpot pass, ensuring full parity and readability across both Light and Dark themes.Changes by Item
Non-primary
Buttonlabels render white in Light:packages/ui/src/components/Button.tsx, stoppedButtonFramefrom imposing thelight_Buttonsub-theme onto non-primary variants.theme="Button"exclusively to primary buttons (variant === 'primary'). Non-primary variants (secondary, outline, ghost, pill, text, list) now inherit ambient theme text color directly.ButtonTextvariant-aware (primary: $textColor, non-primary:$color), ensuring high-contrast readable text in both Light (#333333) and Dark (#E0E0E0) themes.textColorto baselightanddarkthemes inpackages/ui/src/theme.tsfor consistent token resolution.CircularActionButtonhardcoded$grey600:packages/ui/src/components/CircularActionButton.tsx, replaced hardcoded$grey600for both the disabled/pending label and the spinner with semantic theme token$colorDim. Adapts dynamically to Light (#555555) and Dark (#888888).Horizontal
Separator0px height clamp:packages/ui/src/components/Separator.ts, overridden Tamagui's native horizontalmaxHeight: 0clamp withmaxHeight: 'none'and explicitheight/minHeight/maxHeightper size variant (sm: 1px,md: 2px,lg: 4px), allowing horizontal dividers to render visibly. Checked and preserved vertical mode (vertical: true).TokenAmountempty (0x0) spans in Light:packages/ui/src/components/TokenAmount.tsx, replaced non-existent$texttoken with$coloronTokenAmountText.$secondaryColorwith$placeholderColorfor the secondary variant.Streaming widget inputs falling back to browser defaults:
packages/ui/src/components-test/Input.tsx, addedplaceholderTextColor: '$placeholderColor'toInputFrameso input placeholders resolve cleanly against the theme instead of browser-default grey (#757575).packages/ui/src/components-test/Select.tsx, addedborderWidth: 0,borderColor: 'transparent', andoutlineWidth: 0toOptionItemto remove the default 2px outset button border.Relation to #255 / #291
packages/streaming-widget.@goodwidget/ui, resolving all remaining styling and theme fallback bugs at the source as requested.Storybook Coverage
examples/storybook/src/stories/design-system/Button.stories.tsxcovering all 7 button variants across Light and Dark themes side-by-side.examples/storybook/src/stories/design-system/Separator.stories.tsxcovering all horizontal sizes, colors, and vertical orientation.examples/storybook/src/stories/design-system/TokenAmount.stories.tsxwith dedicatedLightThemeandDarkThemestories.Verification
pnpm --filter @goodwidget/ui lint: PASS (0 errors)pnpm --filter @goodwidget/ui build: PASS (100% clean tsup build, ESM + CJS + DTS)core.autocrlf false) with zero noise diffs.Payout Coordinates:
0x759797593fed8f313d8fdba7a3a0d491f0e4b9f7(USDC on Base L2)