Repository navigation
feat(mobile): move the screens onto the design tokens and component kit - #1562
Merged
janicduplessis merged 1 commit intoSep 26, 2026
Merged
janicduplessis merged 1 commit into
janicduplessis merged 1 commit into
Conversation
This was referenced Sep 26, 2026
janicduplessis
added this pull request to stack #1566
September 26, 2026 18:30
janicduplessis
commented
Sep 26, 2026
janicduplessis
left a comment
Collaborator
Author
There was a problem hiding this comment.
Fresh review of the diff against feat/1547-mobile-component-kit (head 1a49ec6). I found no blocking bugs.
What I checked
- Handlers and accessibility. Every
onPresssurvives the move toButton,IconButton,PillandListRow. The accessibility labels that used to sit on the wrappingTouchnow go through the newButton.accessibilityLabelprop. This covers Rename/Forget, "Copy command", Close and Settings. The Control switch role and state, the device-viewonLayoutmeasurement, and thepointerEvents/touch-handler wiring on the overlay are unchanged. - Conditional rendering. Unchanged in every screen. The
LinetoListRowswap keepsnumberOfLines={2}on the title and the warning tone on the value. - Colors passed as props. Everything that is not a React Native component gets its colors from
useUnistyles().theme: expo-imagetintColor,Stack.Toolbartint and badge,@expo/uiHost seedColor, the settings(.ios) modifiers,Icon,ActivityIndicator, andTextInput placeholderTextColorin logs, pair and device-view.TouchiswithUnistyles(Touchable), so its stylesheet styles re-style too. - Gesture Handler lists on iOS. The
ScrollView,FlatListandSectionListfrom@/components/lists, and pair's Gesture HandlerScrollView, receive only spacing from the stylesheet. Their backgrounds come from inlinetheme.colors.backgroundread from the hook. - Removed files. No
@/themeor@/components/chipimport remains.Appearancemoved tohooks/settings. Typecheck, lint and tests pass in CI. - Media colors. They map to the old literals:
#FFFFFF66becomeswithAlpha(media.text, 0.4),#FFFFFF99becomesmedia.textTertiary, and#FFFFFF1Fbecomesmedia.fill. The1Atints becomewithAlpha(..., opacity.subtle). - README. It matches the code:
index.tsimportssrc/design/unistyles.tsfirst, the/galleryroute is__DEV__-only under thestimscheme, and the gallery has a light/dark switch. - Non-ASCII. The diff adds no non-ASCII characters.
Findings (all low)
- Nested themed
Textmay not re-style on an Appearance switch. Seeworkspace-detail.tsx:194(the branch name nested inside the locationText) andhome.tsx:262("Show all" nested inside the footerText). Unistyles has an open issue about this: nestedTextis not updated on a theme change (jpudysz/react-native-unistyles#1045, open, still present on 3.3.0). Here both parents calluseUnistyles(), so the screen re-renders and the nested element should get the new style from React. That probably hides the problem. It is still worth checking one of these on a device with a light/dark toggle. A bad case would be the branch name in#121212on the dark card. - Smaller touch targets.
Buttonwithplain/destructiveuseshitSlop={6}, and the text actions it replaces usedhitSlop={8}:filters.tsx:38Reset,mac-list.tsx:51Rename/Forget, andmac-status.tsx:232Copy plus "Show N more". This is a small loss of tap area on small text actions. It is fine if intended. - Leftover non-ASCII (nit, older than this PR).
about.tsx:20andabout.tsx:31still contain a literal·. This PR rewrites that file and converts the same character to·indevice-view.tsx. CLAUDE.md asks for ASCII-onlysrc/, so these two lines could be converted too.
janicduplessis
force-pushed
the
feat/1548-mobile-screens-tokens
branch
from
September 26, 2026 18:42
1a49ec6 to
ff60d0b
Compare
janicduplessis
marked this pull request as ready for review
September 26, 2026 18:45
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.
Description
Stacked on #1561 (component kit), which is stacked on #1560 (tokens and Unistyles); this diff is against #1561.
The screens in
src/screensandsrc/appstill used React NativeStyleSheet, literal spacing, font sizes and colors,useColors()fromsrc/theme.ts, and local copies of a button, row and section. Nothing usestheme.tsorChipafter this change, so both are deleted.Solution
Textvariants and tones, and the nearest token for each literal. The device viewer's chrome over dark video uses the fixedmediacolors. No hex or rgba color remains outsidetokens.ts.Buttonand text "✕" close button becomeButtonandIconButton.Buttons.Buttons.IconButton.SectionHeader, and build details' bordered lists areListSections.Section/LinebecomeListSection/ListRow, and its read-only notice an inlineBanner.Pills.useUnistyles(). This covers@expo/ui(Hostseed colors, SwiftUI and Compose rows in Settings),Stackoptions and toolbar tints,TextInputplaceholders,Icontints, and the Gesture Handler scroll views' backgrounds. Unistyles does not re-style these on a theme change, and the hook re-renders the component when the theme changes._layouttakes the scheme forStatusBarand the navigation theme from Unistyles' runtime.Appearancetype. It moves tohooks/settings.tsx.apps/mobile/README.mdgains a "Design system" section on the tokens, the Unistyles rules for props, the kit and the gallery.Screenshots:
Each image shows, left to right: before light, after light, before dark, after dark. The before images come from
origin/main, and the after images from the top of the stack, so they include the follow-ups #1563, #1564 and #1565.iOS (iPhone 18 Pro simulator, iOS 27)
Home
Menu
Device grid
Machines
Filters
Machine sheet
Workspace
Build sheet
Logs
Device viewer
Settings
Pair
About
Android (emulator)
Home
Machine sheet
Workspace
Visible changes: literals snap to the nearest token, so most paddings and gaps move by 1 to 2 pt. The notable ones:
xmarkicon.Every visible change
ListSectioncards: radius 14 -> 12, and rows padded 12x6 and centred, where they were in a 14-padded card with 10-pt gaps and baseline-aligned. Disk volumes are a row plus a padded bar. The read-only notice becomes an inline Banner, a raised tinted card with Allow control. Top padding 28 -> 24, gaps 14 -> 12, group titles 15 -> 16 pt, "Copy" 13 -> 14 pt, "Show N more" goes regular -> semibold, and issue boxes change padding 10 -> 8 and radius 8 -> 10.SectionHeader. Change-row gap 10 -> 8.xmarkicon instead of the "✕" text glyph. Gap 18 -> 16. Fields 15 -> 16 pt with padding 11 -> 12. The link 15 -> 16 pt. Button padding 13 -> 12.Test plan
pnpm run format:check,pnpm run lint,pnpm run typecheckandpnpm testin apps/mobile pass.grepfinds no@/themeorcomponents/chipimport and no hex or rgba color outsidesrc/design.stim iosandstim androidon the stack after feat(mobile): keep machine connections in a Zustand store and cache the last status per machine #1551 (MMKV), and the Android build configured Unistyles with AGP 9.2.1.origin/mainfor the before images.Fixes #1548