From 8edcc8cb8bd708353d148b1cf96ec461414ca427 Mon Sep 17 00:00:00 2001 From: Jan Librowski Date: Mon, 14 Sep 2026 09:14:44 +0200 Subject: [PATCH] feat(ui): drop the warning and ghost-warning button variants Design confirmed the warning button has no practical use in the product: the only occurrences were the import dialog's ignore-and-import action and the warning snackbar action, both of which now render as secondary. The variants, their public custom properties and the docs example entries are removed; the semantic warning role (snackbar surface, node focus ring, execution statuses) is untouched. Migration steps live in the changeset. --- .changeset/button-drop-warning.md | 10 ++++ .changeset/import-modal-secondary.md | 5 ++ .../src/components/ui-examples/button.tsx | 10 +--- .../import-modal/import-modal.tsx | 2 +- .../components/button/regular-button/types.ts | 2 - .../button/styles/variant.module.css | 48 +------------------ .../snackbar/components/action-buttons.tsx | 2 +- 7 files changed, 21 insertions(+), 58 deletions(-) create mode 100644 .changeset/button-drop-warning.md create mode 100644 .changeset/import-modal-secondary.md diff --git a/.changeset/button-drop-warning.md b/.changeset/button-drop-warning.md new file mode 100644 index 000000000..19391aa0e --- /dev/null +++ b/.changeset/button-drop-warning.md @@ -0,0 +1,10 @@ +--- +'@workflowbuilder/ui': major +--- + +`Button` no longer offers the `warning` and `ghost-warning` variants; `BUTTON_VARIANTS` and the `ButtonVariant` type shrink accordingly, and the `--wb-public-button-warning-*` and `--wb-public-button-ghost-warning-*` custom properties are gone. A warning `Snackbar` renders its action button as `secondary`. + +Breaking changes: + +- Replace `variant="warning"` with `critical` for destructive actions or `secondary` for cautionary secondary actions; replace `ghost-warning` with `ghost-critical` or `ghost-secondary`. +- Drop any overrides of the removed `--wb-public-button-warning-*` and `--wb-public-button-ghost-warning-*` properties. diff --git a/.changeset/import-modal-secondary.md b/.changeset/import-modal-secondary.md new file mode 100644 index 000000000..a2c9e0474 --- /dev/null +++ b/.changeset/import-modal-secondary.md @@ -0,0 +1,5 @@ +--- +'@workflowbuilder/sdk': patch +--- + +The import dialog's "Ignore and import" action uses the `secondary` button variant instead of the removed `warning` variant. diff --git a/apps/docs/src/components/ui-examples/button.tsx b/apps/docs/src/components/ui-examples/button.tsx index f869f3e63..c96b85624 100644 --- a/apps/docs/src/components/ui-examples/button.tsx +++ b/apps/docs/src/components/ui-examples/button.tsx @@ -5,14 +5,8 @@ import styles from './button.module.css'; import { ComponentPreview } from './component-preview'; -const SOLID_VARIANTS = ['primary', 'secondary', 'critical', 'success', 'warning'] as const; -const GHOST_VARIANTS = [ - 'ghost-primary', - 'ghost-secondary', - 'ghost-critical', - 'ghost-success', - 'ghost-warning', -] as const; +const SOLID_VARIANTS = ['primary', 'secondary', 'critical', 'success'] as const; +const GHOST_VARIANTS = ['ghost-primary', 'ghost-secondary', 'ghost-critical', 'ghost-success'] as const; export function ButtonExample() { return ( diff --git a/packages/sdk/src/features/integration/components/import-export/import-modal/import-modal.tsx b/packages/sdk/src/features/integration/components/import-export/import-modal/import-modal.tsx index 0dcfe5b64..50149b05c 100644 --- a/packages/sdk/src/features/integration/components/import-export/import-modal/import-modal.tsx +++ b/packages/sdk/src/features/integration/components/import-export/import-modal/import-modal.tsx @@ -70,7 +70,7 @@ export function ImportModal() {
{warnings.length > 0 && errors.length === 0 && (