Skip to content

[cli] Fix Nativewind home layout, TabBarIcon types, and rerun-hint quoting#612

Merged
danstepanov merged 1 commit into
mainfrom
fix/nativewind-home-layout-main
Jul 4, 2026
Merged

[cli] Fix Nativewind home layout, TabBarIcon types, and rerun-hint quoting#612
danstepanov merged 1 commit into
mainfrom
fix/nativewind-home-layout-main

Conversation

@danstepanov

Copy link
Copy Markdown
Member

Description

Mirror of #611 for the v4 (main) templates, plus one main-only fix:

  • Description text clipped mid-sentence: ScreenContent centers its children (items-center), so EditScreenInfo's unconstrained outer View sized itself to the text's intrinsic single-line width and the description clipped at the screen edge. Give it w-full so the text wraps.
  • Show Details button touched the screen edges: Container only has p-safe, which is zero horizontally on iPhones in portrait, and the stretched button spanned edge to edge. Add mx-6 to the button on the Nativewind stack home screen.
  • TabBarIcon color type (main-only): Expo Router's Tabs on SDK 56 passes ColorValue to tabBarIcon, which fails tsc against the base TabBarIcon's color: string. Type it as ColorValue@expo/vector-icons accepts string | OpaqueColorValue, so both Expo Router and React Navigation callers fit. (Not caught by CI because main's matrix doesn't include --nativewind --expo-router --tabs.)
  • Rerun hint quoted every project name: quoteShellArg now returns safe-charset values unchanged and only quotes names with spaces or other special characters.

Related Issue

N/A — spotted during manual testing of generated apps. Same fixes applied to next in #611.

Motivation and Context

Fresh --nativewind --expo-router projects had visibly broken layout on first launch, and --nativewind --expo-router --tabs projects fail typechecking on SDK 56.

How Has This Been Tested?

  • bun run build (tsc + ejslint) passes
  • Generated a --nativewind --expo-router project: new classes present in output, tsc --noEmit exits 0
  • Verified the rerun hint prints bare names unquoted and quotes names containing spaces

Screenshots (if appropriate):

Before: button spans the full screen width; description text ends mid-sentence at the screen edge.


Generated by Claude Code

- Give EditScreenInfo's outer View w-full: ScreenContent centers its
  children, so the unconstrained View sized to the text's intrinsic
  single-line width and the description clipped at the screen edge.
- Inset the Show Details button with mx-6; the Container only has
  safe-area padding, which is zero horizontally on iPhones, so the
  stretched button touched the screen edges.
- Type TabBarIcon color as ColorValue: Expo Router's Tabs on SDK 56
  passes ColorValue to tabBarIcon, which fails typechecking against
  color: string. @expo/vector-icons accepts string | OpaqueColorValue.
- Only quote the rerun-hint project name when it contains characters
  that actually need shell quoting.
@danstepanov danstepanov merged commit bbe0628 into main Jul 4, 2026
2 checks passed
@danstepanov danstepanov deleted the fix/nativewind-home-layout-main branch July 4, 2026 00:31
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