Default to a title case app name#7169
Conversation
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/common/string.d.ts@@ -7,6 +7,13 @@ export type RandomNameFamily = 'business' | 'creative';
* @returns A random name generated by combining an adjective and noun.
*/
export declare function getRandomName(family?: RandomNameFamily): string;
+/**
+ * Generates a random Title Case name by combining an adjective and noun.
+ *
+ * @param family - Theme to use for the random name (business or creative).
+ * @returns A Title Case random name (e.g. "Adaptive Vertical").
+ */
+export declare function getRandomTitleCaseName(family?: RandomNameFamily): string;
/**
* Given a string, it returns it with the first letter capitalized.
*
packages/cli-kit/dist/public/node/fs.d.ts@@ -270,6 +270,8 @@ interface GenerateRandomDirectoryOptions {
directory: string;
/** Type of word to use for random name. */
family?: RandomNameFamily;
+ /** If true, return a Title Case name instead of kebab-case. */
+ titleCase?: boolean;
}
/**
* It generates a random directory directory name for a sub-directory.
|
|
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |
WHY are these changes introduced?
Fixes #6468
App names generated during
shopify app initare currently kebab-case, which leads to poor default names when merchants submit apps to the App Store. The default name should encourage a user-facing, Title Case format, and the prompt should reinforce that the directory name will be derived separately.WHAT is this pull request doing?
Folder name: adaptive-verticalpreview is shown in cyan below the prompt, reinforcing that spaces in the app name won't create spaces in file paths.Before:

After:

How to test your changes?
my-cool-storeMeasuring impact
How do we know this change was effective? Please choose one:
Checklist