1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Rename id of menu item to keep it discoverable by existing extensions

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso 2022-10-12 14:55:29 +03:00 committed by Janne Savolainen
parent 2c29fb7e00
commit 27a94f4132
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
16 changed files with 33 additions and 33 deletions

View File

@ -3,19 +3,19 @@
exports[`application-menu given enough time passes populates application menu 1`] = `
Array [
"root",
"root.primary-for-mac",
"root.primary-for-mac.about",
"root.primary-for-mac.separator-1",
"root.primary-for-mac.navigate-to-preferences",
"root.primary-for-mac.navigate-to-extensions",
"root.primary-for-mac.separator-2",
"root.primary-for-mac.services",
"root.primary-for-mac.separator-3",
"root.primary-for-mac.hide",
"root.primary-for-mac.hide-others",
"root.primary-for-mac.unhide",
"root.primary-for-mac.separator-4",
"root.primary-for-mac.quit",
"root.mac",
"root.mac.about",
"root.mac.separator-1",
"root.mac.navigate-to-preferences",
"root.mac.navigate-to-extensions",
"root.mac.separator-2",
"root.mac.services",
"root.mac.separator-3",
"root.mac.hide",
"root.mac.hide-others",
"root.mac.unhide",
"root.mac.separator-4",
"root.mac.quit",
"root.file",
"root.file.add-cluster",
"root.file.separator-1-for-file",

View File

@ -26,7 +26,7 @@ const checkForUpdatesMenuItemInjectable = getInjectable({
return {
kind: "clickable-menu-item" as const,
id: "check-for-updates",
parentId: isMac ? "primary-for-mac" : "help",
parentId: isMac ? "mac" : "help",
orderNumber: isMac ? 20 : 50,
label: "Check for updates",
isShown: updatingIsEnabled,

View File

@ -16,7 +16,7 @@ const navigateToExtensionsMenuItem = getInjectable({
return {
kind: "clickable-menu-item" as const,
parentId: isMac ? "primary-for-mac" : "file",
parentId: isMac ? "mac" : "file",
id: "navigate-to-extensions",
orderNumber: isMac ? 50 : 40,
label: "Extensions",

View File

@ -16,7 +16,7 @@ const navigateToPreferencesMenuItemInjectable = getInjectable({
return {
kind: "clickable-menu-item" as const,
parentId: isMac ? "primary-for-mac" : "file",
parentId: isMac ? "mac" : "file",
id: "navigate-to-preferences",
orderNumber: isMac ? 40 : 30,
label: "Preferences",

View File

@ -9,28 +9,28 @@ import {
export const actionForServices = getApplicationMenuOperationSystemActionInjectable({
id: "services",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 80,
actionName: "services",
});
export const actionForHide = getApplicationMenuOperationSystemActionInjectable({
id: "hide",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 100,
actionName: "hide",
});
export const actionForHideOthers = getApplicationMenuOperationSystemActionInjectable({
id: "hide-others",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 110,
actionName: "hideOthers",
});
export const actionForUnhide = getApplicationMenuOperationSystemActionInjectable({
id: "unhide",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 120,
actionName: "unhide",
});

View File

@ -17,7 +17,7 @@ const primaryMenuItemInjectable = getInjectable({
return {
kind: "top-level-menu" as const,
parentId: "root" as const,
id: "primary-for-mac",
id: "mac",
orderNumber: 10,
label: appName,
isShown: isMac,

View File

@ -19,7 +19,7 @@ const quitApplicationMenuItemInjectable = getInjectable({
id: "quit",
label: "Quit",
parentId: isMac ? "primary-for-mac" : "file",
parentId: isMac ? "mac" : "file",
orderNumber: isMac ? 140 : 70,
keyboardShortcut: isMac ? "Cmd+Q" : "Alt+F4",

View File

@ -9,24 +9,24 @@ import {
export const separator1 = getApplicationMenuSeparatorInjectable({
id: "separator-1",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 30,
});
export const separator2 = getApplicationMenuSeparatorInjectable({
id: "separator-2",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 70,
});
export const separator3 = getApplicationMenuSeparatorInjectable({
id: "separator-3",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 90,
});
export const separator4 = getApplicationMenuSeparatorInjectable({
id: "separator-4",
parentId: "primary-for-mac",
parentId: "mac",
orderNumber: 130,
});

View File

@ -19,7 +19,7 @@ const aboutMenuItemInjectable = getInjectable({
return {
kind: "clickable-menu-item" as const,
id: "about",
parentId: isMac ? "primary-for-mac" : "help",
parentId: isMac ? "mac" : "help",
orderNumber: isMac ? 10 : 40,
label: `About ${productName}`,

View File

@ -142,7 +142,7 @@ describe("analytics for installing update", () => {
it("when checking for updates using application menu, sends event to analytics for being checked from application menu", async () => {
analyticsListenerMock.mockClear();
builder.applicationMenu.click("root.primary-for-mac.check-for-updates");
builder.applicationMenu.click("root.mac.check-for-updates");
expect(analyticsListenerMock.mock.calls).toEqual([
[

View File

@ -48,7 +48,7 @@ describe("extensions - navigation using application menu", () => {
describe("when navigating to extensions using application menu", () => {
beforeEach(() => {
builder.applicationMenu.click("root.primary-for-mac.navigate-to-extensions");
builder.applicationMenu.click("root.mac.navigate-to-extensions");
});
it("focuses the window", () => {

View File

@ -29,7 +29,7 @@ describe("preferences - navigation using application menu", () => {
describe("when navigating to preferences using application menu", () => {
beforeEach(() => {
applicationBuilder.applicationMenu.click("root.primary-for-mac.navigate-to-preferences");
applicationBuilder.applicationMenu.click("root.mac.navigate-to-preferences");
});
it("renders", () => {

View File

@ -45,7 +45,7 @@ describe("quitting the app using application menu", () => {
describe("when application is quit", () => {
beforeEach(() => {
builder.applicationMenu.click("root.primary-for-mac.quit");
builder.applicationMenu.click("root.mac.quit");
});
it("closes all windows", () => {

View File

@ -29,7 +29,7 @@ describe("welcome - navigation using application menu", () => {
describe("when navigated somewhere else", () => {
beforeEach(() => {
applicationBuilder.applicationMenu.click("root.primary-for-mac.navigate-to-preferences");
applicationBuilder.applicationMenu.click("root.mac.navigate-to-preferences");
});
it("renders", () => {

View File

@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import showApplicationWindowInjectable from "../../../start-main-application/lens-window/show-application-window.injectable";
import showAboutInjectable from "../../../../features/application-menu/main/menu-items/primary-for-mac/show-about-application/show-about.injectable";
import showAboutInjectable from "../../../../features/application-menu/main/menu-items/special-menu-for-mac-application/show-about-application/show-about.injectable";
import { trayMenuItemInjectionToken } from "../tray-menu-item-injection-token";
import { computed } from "mobx";
import withErrorLoggingInjectable from "../../../../common/utils/with-error-logging/with-error-logging.injectable";