feat(mobile): add brand theme constants and first-run tutorial (#431, #455) - #530
Conversation
- Add constants/theme.ts with brand colors, surfaces, spacing, radii - Add constants/typography.ts with font families and role-based styles - Add components/OnboardingTutorial.tsx with 3-step dismissible coach marks - Export __e2eSkipTutorial flag for e2e test bypass Closes Miracle656#431 Closes Miracle656#455
|
@MrG139 is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@MrG139 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Miracle656
left a comment
There was a problem hiding this comment.
Thanks for the work here — the theme constants and the tutorial are both solid in isolation, but this PR closes two issues at once (#431 Brand theme constants and #455 First-run tutorial), and I can only merge PRs that close exactly one.
They're genuinely independent pieces of work:
frontend/mobile/constants/theme.ts+frontend/mobile/constants/typography.ts→ #431frontend/mobile/components/OnboardingTutorial.tsx→ #455
What to do
- Keep this PR for #431 only — drop
OnboardingTutorial.tsxand update the body toCloses #431(remove the #455 reference from the title too). - Open a second PR off
mainfor the tutorial, withCloses #455.
Also worth flagging while you're splitting: #433 (PR #532) introduces frontend/mobile/theme/colors.ts and theme/typography.ts as the shared token source, and PR #531 adds frontend/mobile/theme/typography.ts for fonts. Your files land at constants/theme.ts / constants/typography.ts, so we'd end up with two competing token modules. Please align on the frontend/mobile/theme/ path so there's one canonical source.
Split it up and I'll re-review.
Miracle656#431 is already satisfied on main by theme/colors.ts and theme/typography.ts, so drop the duplicate constants/ copies and keep the tutorial: - constants/theme.ts duplicated a palette main already has (theme/colors.ts is a superset — same gold/nearBlack/offWhite/lilac/teal/warmGrey/navy plus the surface, border and gold-tint tokens). constants/typography.ts additionally declared web CSS font stacks ('Lora, Georgia, serif'), which React Native cannot resolve; theme/typography.ts uses the loaded family names. - Add theme/spacing.ts for the spacing/radii scale, which main genuinely lacked, so the tutorial has somewhere to import layout tokens from. Make the tutorial meet Miracle656#455's acceptance, which it did not as written: - Nothing mounted it and nothing persisted dismissal — the component only had an onComplete prop with a comment saying the parent would store it. Added FirstRunTutorial, a self-gating wrapper that reads/writes veil_seen_tutorial in AsyncStorage, and mounted it on the dashboard. - Added testID="tutorial-overlay" and testID="tutorial-skip-button", which is what an external driver like Maestro can actually use; the exported __e2eSkipTutorial module flag is only reachable from in-process tests. - Fixed a rules-of-hooks violation: the __e2eSkipTutorial early return sat above four useCallback calls, so hook order changed with the flag. Moved it below every hook. tsc clean; jest 11 suites / 198 tests; expo lint clean.
|
Merging the tutorial half. The coach-mark component is nicely done — animated step transitions, #431 was already done
One thing worth knowing for future RN work: lora: 'Lora, Georgia, serif'React Native can't resolve those. It needs the loaded family name, which is what What #455 needed wiring to actually holdThe component was complete but inert — nothing mounted it, and nothing persisted dismissal. The Three additions:
Verified: Since #431 was already satisfied, I'd suggest reopening it only if you want the |
Overview
This PR adds two foundational pieces for the Veil mobile app:
frontend/wallet/app/globals.cssandBRAND_GUIDELINES.md, so the app matches the web wallet exactly.Related Issue
Closes #431
Closes #455
Changes
🎨 Brand Theme Constants
[ADD]
frontend/mobile/constants/theme.tscolors— 8 brand tokens (gold, nearBlack, offWhite, lilac, teal, warmGrey, navy, textMuted) with matching light-theme overridessurfaces/lightSurfaces— surface, surfaceMd, borderDim tokensspacing— xs through xxl spacing scaleradii— sm, md, lg, full border radii[ADD]
frontend/mobile/constants/typography.tsfonts— 4 font families (Lora, Inter, Anton, Inconsolata)fontRoles— heading, accent, body, code roles matching BRAND_GUIDELINES.md🚀 First-Run Tutorial
frontend/mobile/components/OnboardingTutorial.tsxModaloverlay with 3 step-by-step coach marksAnimatedAPI)__e2eSkipTutorialflag +setE2eSkipTutorial()so e2e tests can bypass the overlayVerification Results
colors.gold === '#FDDA24'and all values match speconCompletecallback for parent to persist__e2eSkipTutorial/setE2eSkipTutorial()exported