From ad57941526c4f4afc0c9ca2e263d62f2fb5c03f2 Mon Sep 17 00:00:00 2001
From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Date: Fri, 28 Aug 2026 00:10:53 +0530
Subject: [PATCH] refactor: migrate ToggleSwitch to @makeplane/propel (#9696)
* refactor: migrate web ToggleSwitch to @makeplane/propel Switch
Replace @plane/ui ToggleSwitch with @makeplane/propel Switch in apps/web.
Wire the package on web and import Propel styles so Switch utilities emit.
* style: fix comboButton indentation in dropdowns
* chore: use workspace catalog for @makeplane/propel
---
.../core/components/api-token/modal/form.tsx | 10 ++-
.../automation/auto-archive-automation.tsx | 11 ++-
.../automation/auto-close-automation.tsx | 12 ++--
.../modals/existing-issues-list-modal.tsx | 10 ++-
.../estimates/estimate-disable-switch.tsx | 13 ++--
.../home/widgets/manage/widget-item.tsx | 11 +--
.../inbox/modals/create-modal/create-root.tsx | 4 +-
.../calendar/dropdowns/options-dropdown.tsx | 12 ++--
.../components/issues/issue-modal/form.tsx | 9 ++-
.../pages/editor/toolbar/options-dropdown.tsx | 11 ++-
.../components/power-k/ui/modal/footer.tsx | 11 +--
.../project-settings-member-defaults.tsx | 12 ++--
.../project/publish-project/modal.tsx | 9 +--
.../components/project/settings/helper.tsx | 11 +--
.../notifications/email-notification-form.tsx | 67 ++++++++++---------
.../project/content/feature-control-item.tsx | 12 +++-
.../core/components/web-hooks/form/toggle.tsx | 11 +--
.../web-hooks/webhooks-list-item.tsx | 21 +++++-
18 files changed, 161 insertions(+), 96 deletions(-)
diff --git a/apps/web/core/components/api-token/modal/form.tsx b/apps/web/core/components/api-token/modal/form.tsx
index d345c80d0b..1e1b96cf90 100644
--- a/apps/web/core/components/api-token/modal/form.tsx
+++ b/apps/web/core/components/api-token/modal/form.tsx
@@ -14,7 +14,8 @@ import { Button } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { IApiToken } from "@plane/types";
// ui
-import { CustomSelect, Input, TextArea, ToggleSwitch } from "@plane/ui";
+import { Switch } from "@makeplane/propel/components/switch";
+import { CustomSelect, Input, TextArea } from "@plane/ui";
import { cn, renderFormattedDate, renderFormattedTime } from "@plane/utils";
// components
import { DateDropdown } from "@/components/dropdowns/date";
@@ -240,7 +241,12 @@ export function CreateApiTokenForm(props: Props) {
- {}} size="sm" />
+ {}}
+ aria-label={t("workspace_settings.settings.api_tokens.never_expires")}
+ />
{t("workspace_settings.settings.api_tokens.never_expires")}
diff --git a/apps/web/core/components/automation/auto-archive-automation.tsx b/apps/web/core/components/automation/auto-archive-automation.tsx
index 1221e23267..e631ec2858 100644
--- a/apps/web/core/components/automation/auto-archive-automation.tsx
+++ b/apps/web/core/components/automation/auto-archive-automation.tsx
@@ -12,7 +12,8 @@ import { ArchiveRestore } from "lucide-react";
import { PROJECT_AUTOMATION_MONTHS, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import type { IProject } from "@plane/types";
-import { CustomSelect, Loader, ToggleSwitch } from "@plane/ui";
+import { Switch } from "@makeplane/propel/components/switch";
+import { CustomSelect, Loader } from "@plane/ui";
// component
import { SelectMonthModal } from "@/components/automation";
import { SettingsControlItem } from "@/components/settings/control-item";
@@ -76,7 +77,13 @@ export const AutoArchiveAutomation = observer(function AutoArchiveAutomation(pro
title={t("project_settings.automations.auto-archive.title")}
description={t("project_settings.automations.auto-archive.description")}
control={
-
+
}
/>
diff --git a/apps/web/core/components/automation/auto-close-automation.tsx b/apps/web/core/components/automation/auto-close-automation.tsx
index 48c7203abd..d74ada18a6 100644
--- a/apps/web/core/components/automation/auto-close-automation.tsx
+++ b/apps/web/core/components/automation/auto-close-automation.tsx
@@ -13,7 +13,8 @@ import { PROJECT_AUTOMATION_MONTHS, EUserPermissions, EUserPermissionsLevel, EIc
import { useTranslation } from "@plane/i18n";
import { StateGroupIcon, StatePropertyIcon } from "@plane/propel/icons";
import type { IProject } from "@plane/types";
-import { CustomSelect, CustomSearchSelect, ToggleSwitch, Loader } from "@plane/ui";
+import { Switch } from "@makeplane/propel/components/switch";
+import { CustomSelect, CustomSearchSelect, Loader } from "@plane/ui";
import { SelectMonthModal } from "@/components/automation";
import { SettingsControlItem } from "@/components/settings/control-item";
// hooks
@@ -94,17 +95,18 @@ export const AutoCloseAutomation = observer(function AutoCloseAutomation(props:
title={t("project_settings.automations.auto-close.title")}
description={t("project_settings.automations.auto-close.description")}
control={
- {
+ {
if (currentProjectDetails?.close_in === 0) {
void handleChange({ close_in: 1, default_state: defaultState });
} else {
void handleChange({ close_in: 0, default_state: null });
}
}}
- size="sm"
disabled={!isAdmin}
+ aria-label={t("project_settings.automations.auto-close.title")}
/>
}
/>
diff --git a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx
index d0028c1360..646ce6c359 100644
--- a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx
+++ b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx
@@ -16,7 +16,8 @@ import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { Tooltip } from "@plane/propel/tooltip";
import type { ISearchIssueResponse, TProjectIssuesSearchParams } from "@plane/types";
// ui
-import { Loader, ToggleSwitch, EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
+import { Switch } from "@makeplane/propel/components/switch";
+import { Loader, EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
import { generateWorkItemLink, getTabIndex } from "@plane/utils";
// helpers
// hooks
@@ -198,7 +199,12 @@ export function ExistingIssuesListModal(props: Props) {
isWorkspaceLevel ? "text-primary" : "text-secondary"
}`}
>
- setIsWorkspaceLevel((prevData) => !prevData)} />
+