Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(studio): refine Explorer query surfaces and tab styling (#50249)

Saxon Fletcher66c6da82fe94
diff --git a/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx b/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx
index 1437c43c45c..c1b24419ba2 100644
--- a/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx
+++ b/apps/studio/components/interfaces/Explorer/ExplorerNotebookTab.tsx
@@ -450,16 +450,20 @@ export const ExplorerNotebookTab = () => {
</DropdownMenuContent>
</DropdownMenu>
</ExplorerToolbarActions>
- <ExplorerToolbarAction
+ <ButtonTooltip
+ type="button"
+ variant="default"
+ size="tiny"
+ className="ml-1"
aria-label="Run notebook"
icon={<Play size={16} strokeWidth={2} />}
- tooltip="Run notebook"
+ tooltip={{ content: { side: 'bottom', text: 'Run notebook' } }}
loading={isRunningNotebook}
disabled={queryCellIds.length === 0}
onClick={handleRunNotebook}
>
Run
- </ExplorerToolbarAction>
+ </ButtonTooltip>
</ExplorerToolbarActions>
</ExplorerToolbar>
diff --git a/apps/studio/components/interfaces/Explorer/ExplorerQuery.tsx b/apps/studio/components/interfaces/Explorer/ExplorerQuery.tsx
index c37de6e65b5..b13823e4db4 100644
--- a/apps/studio/components/interfaces/Explorer/ExplorerQuery.tsx
+++ b/apps/studio/components/interfaces/Explorer/ExplorerQuery.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import { cn } from 'ui'
-const explorerQueryClassName = 'flex flex-col overflow-hidden bg-muted'
+const explorerQueryClassName = 'flex flex-col overflow-hidden'
export type ExplorerQueryProps = React.ComponentProps<'div'>
@@ -15,7 +15,11 @@ const ExplorerQuery = ({ className, ...props }: ExplorerQueryProps) => (
<div
data-slot="explorer-query"
data-variant="embedded"
- className={cn(explorerQueryClassName, 'min-h-64 rounded-md border shadow-xs', className)}
+ className={cn(
+ explorerQueryClassName,
+ 'min-h-64 rounded-md border bg-card dark:bg-muted shadow-xs',
+ className
+ )}
{...props}
/>
)
@@ -31,7 +35,7 @@ const ExplorerQueryViewport = ({ className, ...props }: ExplorerQueryViewportPro
<div
data-slot="explorer-query"
data-variant="viewport"
- className={cn(explorerQueryClassName, 'h-full min-h-0', className)}
+ className={cn(explorerQueryClassName, 'h-full min-h-0 bg-card dark:bg-muted', className)}
{...props}
/>
)
diff --git a/apps/studio/components/interfaces/Explorer/QueryEditor/QueryRunButton.tsx b/apps/studio/components/interfaces/Explorer/QueryEditor/QueryRunButton.tsx
index 09656fae14a..b115079f817 100644
--- a/apps/studio/components/interfaces/Explorer/QueryEditor/QueryRunButton.tsx
+++ b/apps/studio/components/interfaces/Explorer/QueryEditor/QueryRunButton.tsx
@@ -26,7 +26,7 @@ export const QueryRunButton = ({
onRunSelected,
}: QueryRunButtonProps) => {
return (
- <div className="flex w-fit">
+ <div className="ml-1 flex w-fit">
<ButtonTooltip
type="button"
size="tiny"
diff --git a/apps/studio/components/layouts/Tabs/SortableTab.tsx b/apps/studio/components/layouts/Tabs/SortableTab.tsx
index a59cfab95a0..9d437c76491 100644
--- a/apps/studio/components/layouts/Tabs/SortableTab.tsx
+++ b/apps/studio/components/layouts/Tabs/SortableTab.tsx
@@ -79,7 +79,7 @@ export const SortableTab = ({
layoutId={tab.id}
transition={{ duration: 0.045 }}
animate={{ opacity: isDragging ? 0 : 1 }}
- className={cn('flex items-center h-(--header-height) first-of-type:border-l')}
+ className={cn('flex items-center h-(--header-height)', index === 0 && 'border-l')}
>
<div className="group/tab relative flex h-full min-w-0 items-center">
<TabsTrigger