From 0efe1c5ea0aa188678331a376a00b07bc5e859bf Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Thu, 20 Oct 2022 08:31:45 +0300 Subject: [PATCH] Add TODO Signed-off-by: Janne Savolainen --- .../registered-commands/internal-commands.injectable.tsx | 4 +++- .../bind-protocol-add-route-handlers.injectable.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx b/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx index 317dd731df..27bbc4aab7 100644 --- a/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx +++ b/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.tsx @@ -15,7 +15,6 @@ import { getInjectable } from "@ogre-tools/injectable"; import commandOverlayInjectable from "../command-overlay.injectable"; import createTerminalTabInjectable from "../../dock/terminal/create-terminal-tab.injectable"; import type { DockTabCreate } from "../../dock/dock/store"; -import navigateToPreferencesInjectable from "../../../../features/preferences/common/navigate-to-preferences.injectable"; import navigateToHelmChartsInjectable from "../../../../common/front-end-routing/routes/cluster/helm/charts/navigate-to-helm-charts.injectable"; import navigateToHelmReleasesInjectable from "../../../../common/front-end-routing/routes/cluster/helm/releases/navigate-to-helm-releases.injectable"; import navigateToConfigMapsInjectable from "../../../../common/front-end-routing/routes/cluster/config/config-maps/navigate-to-config-maps.injectable"; @@ -40,6 +39,9 @@ import navigateToCustomResourcesInjectable from "../../../../common/front-end-ro import navigateToEntitySettingsInjectable from "../../../../common/front-end-routing/routes/entity-settings/navigate-to-entity-settings.injectable"; import getEntitySettingCommandsInjectable from "./get-entity-setting-commands.injectable"; +// TODO: Importing from features is not OK. Make commands to comply with Open Closed Principle to allow moving implementation under a feature +import navigateToPreferencesInjectable from "../../../../features/preferences/common/navigate-to-preferences.injectable"; + export function isKubernetesClusterActive(context: CommandContext): boolean { return context.entity?.kind === "KubernetesCluster"; } diff --git a/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts b/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts index 31c630352b..cb6f4652ce 100644 --- a/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts +++ b/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.ts @@ -12,6 +12,8 @@ import navigateToExtensionsInjectable from "../../../common/front-end-routing/ro import navigateToEntitySettingsInjectable from "../../../common/front-end-routing/routes/entity-settings/navigate-to-entity-settings.injectable"; import navigateToClusterViewInjectable from "../../../common/front-end-routing/routes/cluster-view/navigate-to-cluster-view.injectable"; import catalogEntityRegistryInjectable from "../../api/catalog/entity/registry.injectable"; + +// TODO: Importing from features is not OK. Make protocol-router to comply with Open Closed Principle to allow moving implementation under a feature import navigateToPreferencesInjectable from "../../../features/preferences/common/navigate-to-preferences.injectable"; const bindProtocolAddRouteHandlersInjectable = getInjectable({