Skip to content

Commit 664d662

Browse files
lkostrowskiclaude
andauthored
Hide mirumee.webhooks plugin from Installed Extensions page (#6395)
Add filterOutHiddenPlugins utility to exclude specific plugins from the installed extensions list. The mirumee.webhooks plugin is no longer shown on the /extensions page. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent da6b2de commit 664d662

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

.changeset/sweet-regions-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"saleor-dashboard": patch
3+
---
4+
5+
Hide Webhooks plugin on the extensions list

src/extensions/views/InstalledExtensions/hooks/useInstalledExtensions.tsx

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import {
1212
type WebhookDeliveryProblem,
1313
} from "@dashboard/extensions/types";
1414
import { ExtensionsUrls } from "@dashboard/extensions/urls";
15-
import { byActivePlugin, sortByName } from "@dashboard/extensions/views/InstalledExtensions/utils";
15+
import {
16+
byActivePlugin,
17+
filterOutHiddenPlugins,
18+
sortByName,
19+
} from "@dashboard/extensions/views/InstalledExtensions/utils";
1620
import {
1721
AppTypeEnum,
1822
PermissionEnum,
@@ -184,15 +188,18 @@ export const useInstalledExtensions = () => {
184188

185189
const installedPlugins = useMemo<InstalledExtension[]>(
186190
() =>
187-
installedPluginsData.filter(byActivePlugin).map(plugin => ({
188-
id: plugin.id,
189-
name: plugin.name,
190-
logo: <PluginIcon />,
191-
info: null,
192-
href: ExtensionsUrls.resolveEditPluginExtensionUrl(plugin.id),
193-
activeProblemCount: 0,
194-
criticalProblemCount: 0,
195-
})),
191+
installedPluginsData
192+
.filter(filterOutHiddenPlugins)
193+
.filter(byActivePlugin)
194+
.map(plugin => ({
195+
id: plugin.id,
196+
name: plugin.name,
197+
logo: <PluginIcon />,
198+
info: null,
199+
href: ExtensionsUrls.resolveEditPluginExtensionUrl(plugin.id),
200+
activeProblemCount: 0,
201+
criticalProblemCount: 0,
202+
})),
196203
[installedPluginsData],
197204
);
198205

src/extensions/views/InstalledExtensions/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { type InstalledExtension } from "@dashboard/extensions/types";
22
import { type PluginBaseFragment } from "@dashboard/graphql";
33

4+
const HIDDEN_PLUGIN_IDS = new Set(["mirumee.webhooks"]);
5+
6+
export const filterOutHiddenPlugins = (plugin: PluginBaseFragment) =>
7+
!HIDDEN_PLUGIN_IDS.has(plugin.id);
8+
49
export const byActivePlugin = (plugin: PluginBaseFragment) => {
510
return (
611
plugin?.globalConfiguration?.active === true ||

0 commit comments

Comments
 (0)