From 3d2b9a12c7a135d195fb28c7073b642cb75f8683 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 2 Jul 2026 14:40:48 +0000 Subject: [PATCH 1/2] fix: inset home button and let EditScreenInfo text wrap ScreenContent centers its children, so EditScreenInfo's unconstrained outer View sized to the text's intrinsic single-line width and the description clipped at the screen edge. Give it w-full so the text wraps within the screen. The stack home button wrapper only had safe-area padding, which is zero horizontally on iPhones, so the button touched the screen edges. Add px-6. --- .changeset/nativewind-home-layout.md | 6 ++++++ .../templates/packages/expo-router/stack/app/index.tsx.ejs | 2 +- .../packages/nativewind/components/EditScreenInfo.tsx.ejs | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/nativewind-home-layout.md diff --git a/.changeset/nativewind-home-layout.md b/.changeset/nativewind-home-layout.md new file mode 100644 index 00000000..311fb7a7 --- /dev/null +++ b/.changeset/nativewind-home-layout.md @@ -0,0 +1,6 @@ +--- +'create-expo-stack': patch +'rn-new': patch +--- + +Fix Nativewind template layout: inset the Show Details button from the screen edges and constrain EditScreenInfo so its description text wraps instead of clipping. diff --git a/cli/src/templates/packages/expo-router/stack/app/index.tsx.ejs b/cli/src/templates/packages/expo-router/stack/app/index.tsx.ejs index a92b5f02..ee838a0a 100644 --- a/cli/src/templates/packages/expo-router/stack/app/index.tsx.ejs +++ b/cli/src/templates/packages/expo-router/stack/app/index.tsx.ejs @@ -65,7 +65,7 @@ export default function Home() { <% if (props.stylingPackage?.name === "nativewind") { %> const styles = { container: "flex flex-1 p-safe bg-white", - buttonWrapper: "w-full pb-safe", + buttonWrapper: "w-full px-6 pb-safe", }; <% } else if (props.stylingPackage?.name === "stylesheet") { %> const styles = StyleSheet.create({ diff --git a/cli/src/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs b/cli/src/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs index a94ad1d2..8f9953a1 100644 --- a/cli/src/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs +++ b/cli/src/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs @@ -19,7 +19,7 @@ export const EditScreenInfo: React.FC = ({ path }) => { const description = "Change any of the text, save the file, and your app will automatically update." <% } %> return ( - + {title} @@ -34,6 +34,7 @@ export const EditScreenInfo: React.FC = ({ path }) => { }; const styles = { + container: `w-full`, codeHighlightContainer: `rounded-md px-1`, getStartedContainer: `items-center mx-12`, getStartedText: `text-lg leading-6 text-center`, From fc1b334fe60c965fc5b53f79ce16a92936c77400 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 2 Jul 2026 14:44:16 +0000 Subject: [PATCH 2/2] fix: only quote rerun-hint args when needed quoteShellArg wrapped every project name in quotes, so the 'To recreate this project' hint showed npx rn-new@latest 'my-app' even for names that need no quoting. Return safe-charset values unchanged and keep quoting for names with spaces or other special characters. --- .changeset/rerun-hint-quoting.md | 6 ++++++ cli/src/utilities/systemCommand.ts | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/rerun-hint-quoting.md diff --git a/.changeset/rerun-hint-quoting.md b/.changeset/rerun-hint-quoting.md new file mode 100644 index 00000000..4dcbd291 --- /dev/null +++ b/.changeset/rerun-hint-quoting.md @@ -0,0 +1,6 @@ +--- +'create-expo-stack': patch +'rn-new': patch +--- + +Only quote the project name in the rerun hint when it contains characters that need shell quoting. diff --git a/cli/src/utilities/systemCommand.ts b/cli/src/utilities/systemCommand.ts index 8264110c..c408bfeb 100644 --- a/cli/src/utilities/systemCommand.ts +++ b/cli/src/utilities/systemCommand.ts @@ -5,6 +5,11 @@ type STDIO = 'inherit' | 'ignore' | 'pipe' | 'overlapped'; export const ONLY_ERRORS = ['ignore', 'ignore', 'inherit'] as const; export function quoteShellArg(value: string): string { + // Values made of safe characters don't need quoting on any platform + if (/^[A-Za-z0-9._-]+$/.test(value)) { + return value; + } + if (process.platform === 'win32') { return `"${value.replace(/"/g, '""')}"`; }