Skip to content

Shared UI tokens: unify web and mobile checkout - #4

Merged
EliRobinson merged 21 commits into
mainfrom
shared-ui-tokens
Jul 28, 2026
Merged

EliRobinson merged 21 commits into
mainfrom
shared-ui-tokens

Conversation

@EliRobinson

Copy link
Copy Markdown
Owner

Summary

  • Add @repo/tokens as the single source of design tokens (colors, spacing, type, Tailwind preset, CSS vars) and expand @repo/ui into Atomic Design checkout components culminating in CheckoutCard.
  • Wire Next.js (apps/web) to render shared RN/NativeWind UI via react-native-web, preserving SSR resume with no client refetch flash; refactor both web and mobile checkout screens onto the shared organism.
  • Capture post-conversion screenshots in mocks/ and document the design/plan/session notes under docs/.

Test plan

  • pnpm --filter @repo/tokens test
  • pnpm --filter @repo/ui test
  • pnpm --filter web test (includes SSR smoke)
  • pnpm --filter mobile-web test
  • Manually: create session via API, open http://localhost:3001/checkout/<id> and Expo web checkout; confirm shared card + price CTA
  • Confirm mocks/web-checkout-active.png and mocks/mobile-checkout-active.png look correct

Made with Cursor

EliRobinson and others added 20 commits July 28, 2026 01:11
Co-authored-by: Cursor <cursoragent@cursor.com>
Move Button into atoms with disabled support; add Text, Banner, Notice,
and Spinner using NativeWind token classes. TDD with 8 passing tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace non-preset Tailwind grays and text-white with surface, border,
and ink tokens so Button stays within @repo/tokens constraints.

Co-authored-by: Cursor <cursoragent@cursor.com>
Compose atoms with formatCurrency for shared checkout layout primitives.

Co-authored-by: Cursor <cursoragent@cursor.com>
Port session/error view mapping from mobile checkout into @repo/ui with
centralized copy, TDD coverage, and @repo/api-contracts dependency.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use Banner with alert semantics for price_changed, keep copy.ts scoped to
CheckoutCard only, and fix Notice double Text wrapping.

Co-authored-by: Cursor <cursoragent@cursor.com>
Enable the web app to import @repo/ui by aliasing react-native to
react-native-web, adding Tailwind/NativeWind config, and injecting
shared cssVariables from @repo/tokens in the root layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use @repo/ui CheckoutCard and view mappers. SSR-first resume unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use @repo/ui CheckoutCard and view helpers. Keep mobile resume lifecycle.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mark FUTURE-IMPROVEMENTS item 1 done, note shared UI in decisions.md,
and export session summary for the @repo/tokens + @repo/ui + RN-web work.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Adopt mint accent, black web CTAs, dark mobile canvas, and Gametime
chrome from production screenshots; refresh mocks and store references.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use logo mint #19CE85, site ink #010314, CTA #141517, and dark surfaces

Co-authored-by: Cursor <cursoragent@cursor.com>
#0C0C0D / #1C1C20 sampled from the production homepage CSS and SVG.
Point root `dev` at the three apps via Turbo filters and document the
one-command workflow so reviewers don't need three terminals.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add dev:servers for api+web and run mobile-web outside turbo so Expo CLI keypresses work.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent Metro from resolving incompatible Expo SDK 57 native modules
that crash the mobile-web router.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the temporary @repo/config/tailwind shim so config no longer
depends on tokens; apps already import @repo/tokens/preset directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Collapse dual NativeWind/Appearance styling into Theme + StyleSheet, complete
CheckoutView kinds, make tokens a single CJS source, move checkout into
features/ with dotted role suffixes, and share client error/notice helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
import type { CheckoutSession } from '@repo/api-contracts';
import { colors, spacePx } from '@repo/tokens';
import type { CheckoutView } from '@repo/ui';
import { CheckoutCard, priceUpdatedNotice, viewFromErrorCode, viewFromSession } from '@repo/ui';

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Not a huge fan of exporting utils from UI, would make this better in another scenario.

First CheckoutScreen render under coverage can exceed 15s on loaded CI;
defer resume resolution so the loading assertion stays deterministic.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EliRobinson
EliRobinson merged commit 965f53e into main Jul 28, 2026
2 checks passed
@EliRobinson
EliRobinson deleted the shared-ui-tokens branch July 29, 2026 21:29
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