diff --git a/e2e/playwright/native-file-menu.spec.ts b/e2e/playwright/native-file-menu.spec.ts index f8d571ac0..4479e4cca 100644 --- a/e2e/playwright/native-file-menu.spec.ts +++ b/e2e/playwright/native-file-menu.spec.ts @@ -21,8 +21,9 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => { if (!app || !app.applicationMenu) { return false } - const newProject = - app.applicationMenu.getMenuItemById('File.New project') + const newProject = app.applicationMenu.getMenuItemById( + 'File.Create project' + ) if (!newProject) return false newProject.click() return true @@ -484,8 +485,9 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => { await page.waitForTimeout(100) // wait for createModelingPageMenu() to run await tronApp.electron.evaluate(async ({ app }) => { if (!app || !app.applicationMenu) fail() - const newProject = - app.applicationMenu.getMenuItemById('File.New project') + const newProject = app.applicationMenu.getMenuItemById( + 'File.Create project' + ) if (!newProject) fail() newProject.click() }) @@ -608,7 +610,7 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => { const expected = 'Export' expect(actual).toBe(expected) }) - test('Modeling.File.Share current part (via Zoo link)', async ({ + test('Modeling.File.Share part via Zoo link', async ({ tronApp, cmdBar, page, @@ -629,10 +631,10 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => { throw new Error('app or app.applicationMenu is missing') } const openProject = app.applicationMenu.getMenuItemById( - 'File.Share current part (via Zoo link)' + 'File.Share part via Zoo link' ) if (!openProject) { - throw new Error('File.Share current part (via Zoo link)') + throw new Error('File.Share part via Zoo link') } openProject.click() }) diff --git a/src/components/ModelingSidebar/ModelingSidebar.tsx b/src/components/ModelingSidebar/ModelingSidebar.tsx index 6f09112cd..ab9761e16 100644 --- a/src/components/ModelingSidebar/ModelingSidebar.tsx +++ b/src/components/ModelingSidebar/ModelingSidebar.tsx @@ -79,7 +79,7 @@ export function ModelingSidebar({ paneOpacity }: ModelingSidebarProps) { title: 'Load external model', sidebarName: 'Load external model', icon: 'importFile', - keybinding: 'Ctrl + Shift + I', + keybinding: 'Mod + Alt + L', action: () => commandBarActor.send({ type: 'Find and select command', @@ -88,8 +88,8 @@ export function ModelingSidebar({ paneOpacity }: ModelingSidebarProps) { }, { id: 'share-link', - title: 'Create share link', - sidebarName: 'Create share link', + title: 'Share part via Zoo link', + sidebarName: 'Share part via Zoo link', icon: 'link', keybinding: 'Mod + Alt + S', action: () => diff --git a/src/components/ProjectSidebarMenu.tsx b/src/components/ProjectSidebarMenu.tsx index ea6fff60d..37af452bd 100644 --- a/src/components/ProjectSidebarMenu.tsx +++ b/src/components/ProjectSidebarMenu.tsx @@ -220,7 +220,7 @@ function ProjectMenuPopover({ { id: 'share-link', Element: 'button', - children: 'Share current part (via Zoo link)', + children: 'Share part via Zoo link', disabled: !findCommand(shareCommandInfo), onClick: async () => { await copyFileShareLink({ diff --git a/src/lib/kclCommands.ts b/src/lib/kclCommands.ts index 151310b46..f24ddc5de 100644 --- a/src/lib/kclCommands.ts +++ b/src/lib/kclCommands.ts @@ -333,7 +333,7 @@ export function kclCommands(commandProps: KclCommandConfig): Command[] { }, { name: 'share-file-link', - displayName: 'Share current part (via Zoo link)', + displayName: 'Share part via Zoo link', description: 'Create a link that contains a copy of the current file.', groupId: 'code', needsReview: false, diff --git a/src/menu/channels.ts b/src/menu/channels.ts index 4e744d8e8..d308f0c07 100644 --- a/src/menu/channels.ts +++ b/src/menu/channels.ts @@ -13,7 +13,7 @@ export type MenuLabels = | 'Edit.Modify with Zoo Text-To-CAD' | 'Edit.Edit parameter' | 'Edit.Format code' - | 'File.New project' + | 'File.Create project' | 'File.Open project' | 'File.Import file from URL' | 'File.Preferences.User settings' @@ -26,7 +26,7 @@ export type MenuLabels = | 'File.Create new folder' | 'File.Load external model' | 'File.Export current part' - | 'File.Share current part (via Zoo link)' + | 'File.Share part via Zoo link' | 'File.Preferences.Project settings' | 'Design.Start sketch' | 'Design.Create an offset plane' diff --git a/src/menu/fileRole.ts b/src/menu/fileRole.ts index 579ee7ce2..cd1e39769 100644 --- a/src/menu/fileRole.ts +++ b/src/menu/fileRole.ts @@ -13,12 +13,12 @@ export const projectFileRole = ( label: 'File', submenu: [ { - label: 'New project', - id: 'File.New project', + label: 'Create project', + id: 'File.Create project', accelerator: 'CommandOrControl+N', click: () => { typeSafeWebContentsSend(mainWindow, 'menu-action-clicked', { - menuLabel: 'File.New project', + menuLabel: 'File.Create project', }) }, }, @@ -125,12 +125,12 @@ export const modelingFileRole = ( // }, // }, { - label: 'New project', - id: 'File.New project', + label: 'Create project', + id: 'File.Create project', accelerator: 'CommandOrControl+N', click: () => { typeSafeWebContentsSend(mainWindow, 'menu-action-clicked', { - menuLabel: 'File.New project', + menuLabel: 'File.Create project', }) }, }, @@ -166,11 +166,11 @@ export const modelingFileRole = ( }, }, { - label: 'Share current part (via Zoo link)', - id: 'File.Share current part (via Zoo link)', + label: 'Share part via Zoo link', + id: 'File.Share part via Zoo link', click: () => { typeSafeWebContentsSend(mainWindow, 'menu-action-clicked', { - menuLabel: 'File.Share current part (via Zoo link)', + menuLabel: 'File.Share part via Zoo link', }) }, }, diff --git a/src/menu/register.ts b/src/menu/register.ts index 12bbbee3b..854fefe07 100644 --- a/src/menu/register.ts +++ b/src/menu/register.ts @@ -24,7 +24,7 @@ export function modelingMenuCallbackMostActions( ) { // Menu listeners const cb = (data: WebContentSendPayload) => { - if (data.menuLabel === 'File.New project') { + if (data.menuLabel === 'File.Create project') { commandBarActor.send({ type: 'Find and select command', data: { @@ -84,7 +84,7 @@ export function modelingMenuCallbackMostActions( }) } else if (data.menuLabel === 'File.Preferences.Theme color') { navigate(filePath + PATHS.SETTINGS_USER + '#themeColor') - } else if (data.menuLabel === 'File.Share current part (via Zoo link)') { + } else if (data.menuLabel === 'File.Share part via Zoo link') { copyFileShareLink({ token: token ?? '', code: codeManager.code, diff --git a/src/menu/roles.ts b/src/menu/roles.ts index 6925427ab..bc1c4dc32 100644 --- a/src/menu/roles.ts +++ b/src/menu/roles.ts @@ -13,7 +13,7 @@ type HeaderLabel = type FileRoleLabel = | 'Open project' - | 'New project' + | 'Create project' | 'Import file from URL' | 'Preferences' | 'User settings' @@ -24,7 +24,7 @@ type FileRoleLabel = | 'Export current part' | 'Create new file' | 'Create new folder' - | 'Share current part (via Zoo link)' + | 'Share part via Zoo link' | 'Project settings' | 'Load external model' | 'User default units' diff --git a/src/routes/Home.tsx b/src/routes/Home.tsx index 385251f7f..473096669 100644 --- a/src/routes/Home.tsx +++ b/src/routes/Home.tsx @@ -67,7 +67,7 @@ const Home = () => { // Menu listeners const cb = (data: WebContentSendPayload) => { - if (data.menuLabel === 'File.New project') { + if (data.menuLabel === 'File.Create project') { commandBarActor.send({ type: 'Find and select command', data: {