From 6e0fbbd2f4cc6388005de20e0fb24bcd14a2a0e5 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Wed, 25 Mar 2026 15:46:14 +0800 Subject: [PATCH] Chore/minor qol improvements to queue operations (#44169) ## Context Resolves FE-2877 Some minor UI nudges for the queue operations feature - Update all "cancel" copy to "discard" for clarity image - Shift "review" and "cancel" actions in action bar into a dropdown image --- .../footer/operations/SaveQueueActionBar.tsx | 61 +++++++++++++------ .../AddRowOperationItem.tsx | 4 +- .../DeleteRowOperationItem.tsx | 4 +- .../OperationQueueSidePanel/OperationItem.tsx | 4 +- .../OperationQueueSidePanel.tsx | 2 +- .../features/queue-table-operations.spec.ts | 41 +++++++------ .../KeyboardShortcut/KeyboardShortcut.tsx | 2 +- 7 files changed, 72 insertions(+), 46 deletions(-) diff --git a/apps/studio/components/grid/components/footer/operations/SaveQueueActionBar.tsx b/apps/studio/components/grid/components/footer/operations/SaveQueueActionBar.tsx index 158dd38a5d0..b0b4de1a89b 100644 --- a/apps/studio/components/grid/components/footer/operations/SaveQueueActionBar.tsx +++ b/apps/studio/components/grid/components/footer/operations/SaveQueueActionBar.tsx @@ -2,10 +2,18 @@ import { useOperationQueueActions } from 'components/grid/hooks/useOperationQueu import { useOperationQueueShortcuts } from 'components/grid/hooks/useOperationQueueShortcuts' import { useIsQueueOperationsEnabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext' import { AnimatePresence, motion } from 'framer-motion' -import { useEffect, useState } from 'react' +import { Eye, MoreVertical, Trash } from 'lucide-react' import { createPortal } from 'react-dom' import { useTableEditorStateSnapshot } from 'state/table-editor' -import { Button } from 'ui' +import { + Button, + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, + KeyboardShortcut, +} from 'ui' import { DiscardChangesConfirmationDialog } from '@/components/ui-patterns/Dialogs/DiscardChangesConfirmationDialog' import { useConfirmOnClose } from '@/hooks/ui/useConfirmOnClose' @@ -48,24 +56,10 @@ export const SaveQueueActionBar = () => { }} >
+

+ {operationCount} pending change{operationCount !== 1 ? 's' : ''} +

- - {operationCount} pending change{operationCount !== 1 ? 's' : ''} - - -
-
- + + +
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/AddRowOperationItem.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/AddRowOperationItem.tsx index 637cc986b6e..2cf02b0adee 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/AddRowOperationItem.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/AddRowOperationItem.tsx @@ -62,7 +62,7 @@ export const AddRowOperationItem = ({ } onClick={handleDelete} @@ -70,7 +70,7 @@ export const AddRowOperationItem = ({ content: { side: 'left', align: 'end', - text: 'Revert change', + text: 'Discard change', }, }} /> diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/DeleteRowOperationItem.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/DeleteRowOperationItem.tsx index 4ad7e893ebd..29a77987932 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/DeleteRowOperationItem.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/DeleteRowOperationItem.tsx @@ -62,7 +62,7 @@ export const DeleteRowOperationItem = ({ } onClick={handleDelete} @@ -70,7 +70,7 @@ export const DeleteRowOperationItem = ({ content: { side: 'left', align: 'end', - text: 'Revert change', + text: 'Discard change', }, }} /> diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationItem.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationItem.tsx index 0e65c097a9f..78e3ae35885 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationItem.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationItem.tsx @@ -59,7 +59,7 @@ export const OperationItem = ({ operationId, tableId, content }: OperationItemPr } onClick={handleDelete} @@ -67,7 +67,7 @@ export const OperationItem = ({ operationId, tableId, content }: OperationItemPr content: { side: 'left', align: 'end', - text: 'Revert change', + text: 'Discard change', }, }} /> diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationQueueSidePanel.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationQueueSidePanel.tsx index 5d154be3307..6b459d98f6c 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationQueueSidePanel.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/OperationQueueSidePanel/OperationQueueSidePanel.tsx @@ -63,7 +63,7 @@ export const OperationQueueSidePanel = () => { onClick={confirmOnClose} disabled={isSaving || operations.length === 0} > - Cancel + Discard