From aee92f7d406bc67f63b99c0dd22fdf7cb753b4b3 Mon Sep 17 00:00:00 2001 From: Nitish27 Date: Tue, 3 Nov 2026 12:35:18 +0530 Subject: [PATCH] style(workspace): clarify toolbar and resize affordances --- src/App.tsx | 10 ++- src/components/DataTable.tsx | 10 +-- src/components/QueryResultsTable.tsx | 12 +-- src/components/TabContentQuery.tsx | 6 +- src/components/TabContentTable.tsx | 6 +- src/components/TableFooter.tsx | 24 +++--- src/components/ThemeSettings.tsx | 3 +- src/components/Toolbar.tsx | 122 +++++++++++++++------------ src/index.css | 42 +++++++++ 9 files changed, 150 insertions(+), 85 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 12ef3da..a031ece 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -129,9 +129,10 @@ function App() { {sidebarVisible && ( -
+
)} @@ -227,9 +228,10 @@ function App() { {rightVisible && ( -
+
)} diff --git a/src/components/DataTable.tsx b/src/components/DataTable.tsx index 61bb38e..b0fd04c 100644 --- a/src/components/DataTable.tsx +++ b/src/components/DataTable.tsx @@ -491,12 +491,12 @@ export const DataTable = ({ className="border-collapse text-xs" style={{ tableLayout: 'fixed', fontFamily: dataTableAppearance.fontFamily, fontSize: `${dataTableAppearance.fontSize}px` }} > - + {table.getHeaderGroups().map(headerGroup => ( {showLineNumbers && ( # @@ -508,7 +508,7 @@ export const DataTable = ({ handleResizeStart(header.id, e)} - style={{ transform: 'translateX(50%)' }} /> ); diff --git a/src/components/QueryResultsTable.tsx b/src/components/QueryResultsTable.tsx index 120639a..e9c84a1 100644 --- a/src/components/QueryResultsTable.tsx +++ b/src/components/QueryResultsTable.tsx @@ -315,13 +315,13 @@ export const QueryResultsTable = ({
{/* Header */}
-
+
{showLineNumbers &&
} {columns.map((name, index) => (
{name} @@ -335,9 +335,9 @@ export const QueryResultsTable = ({ {isColumnMasked(name) ? : }
handleResizeStart(index, event)} - style={{ transform: 'translateX(50%)' }} />
))} @@ -345,8 +345,8 @@ export const QueryResultsTable = ({
{showLineNumbers && (
#
diff --git a/src/components/TabContentQuery.tsx b/src/components/TabContentQuery.tsx index 4aaa5d9..1948dc5 100644 --- a/src/components/TabContentQuery.tsx +++ b/src/components/TabContentQuery.tsx @@ -557,14 +557,14 @@ export const TabContentQuery = ({ id, initialQuery = '', connectionId }: TabCont
{assistantOpen &&
-
{ resizeStart.current = { x: event.clientX, width: assistantWidth }; event.currentTarget.setPointerCapture(event.pointerId); }} onPointerMove={event => { if (resizeStart.current) setAssistantWidth(Math.max(300, Math.min(640, resizeStart.current.width + resizeStart.current.x - event.clientX))); }} onPointerUp={event => { resizeStart.current = null; event.currentTarget.releasePointerCapture(event.pointerId); }} onPointerCancel={() => { resizeStart.current = null; }} onKeyDown={event => { if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') { event.preventDefault(); setAssistantWidth(width => Math.max(300, Math.min(640, width + (event.key === 'ArrowLeft' ? 24 : -24)))); } }} - /> + >
+
{ consoleDragRef.current = null; }} onKeyDown={resizeConsoleWithKeyboard} onDoubleClick={() => setConsoleHeight(clampTableConsoleHeight(DEFAULT_TABLE_CONSOLE_HEIGHT, availableConsoleHeight()))} - className="group relative z-10 h-2 shrink-0 cursor-row-resize touch-none bg-sidebar focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent" + className="group relative z-10 h-2 shrink-0 cursor-row-resize touch-none bg-sidebar transition-colors hover:bg-accent/10 focus-visible:bg-accent/10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent" > -
+
-
-
+
+
+
)} {onViewRelationships && ( - )}
-
+
{executionTime !== undefined && (
{executionTime}ms @@ -101,7 +101,7 @@ export const TableFooter = ({ )}
-
+
)} -
+
diff --git a/src/components/ThemeSettings.tsx b/src/components/ThemeSettings.tsx index 1f52ed2..9c993cb 100644 --- a/src/components/ThemeSettings.tsx +++ b/src/components/ThemeSettings.tsx @@ -26,10 +26,11 @@ export const ThemeSettings = ({ className={cn( 'transition-colors', displayMode === 'toolbar' - ? 'flex items-center gap-1.5 rounded-md px-2 py-1.5 text-text-muted hover:bg-hover hover:text-text-primary' + ? 'flex h-8 w-8 items-center justify-center rounded-md text-text-secondary hover:bg-hover hover:text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent' : 'w-full flex items-center justify-between gap-3 rounded-lg border border-border bg-surface px-3 py-2 text-text-secondary hover:bg-hover' )} title="Open appearance settings" + aria-label="Open appearance settings" > {displayMode === 'toolbar' ? : } diff --git a/src/components/Toolbar.tsx b/src/components/Toolbar.tsx index b049821..f95f294 100644 --- a/src/components/Toolbar.tsx +++ b/src/components/Toolbar.tsx @@ -133,25 +133,19 @@ export const Toolbar = ({ ); return ( -
+
{/* Left side: Action Controls */} -
+
- - +
+ -
+
- + -
+ {pendingChangesCount > 0 &&
} - - } + {pendingChangesCount > 0 && + + } {/* Connection-scoped write protection */}