diff --git a/apps/studio/components/interfaces/Storage/StorageMenu.BucketList.tsx b/apps/studio/components/interfaces/Storage/StorageMenu.BucketList.tsx index b49c691a71f..c2d0193ce3d 100644 --- a/apps/studio/components/interfaces/Storage/StorageMenu.BucketList.tsx +++ b/apps/studio/components/interfaces/Storage/StorageMenu.BucketList.tsx @@ -4,6 +4,7 @@ import type { ListChildComponentProps } from 'react-window' import { FixedSizeList as List, areEqual } from 'react-window' import type { Bucket } from 'data/storage/buckets-query' +import { cn } from 'ui' import { BucketRow } from './BucketRow' type BucketListProps = { @@ -25,7 +26,7 @@ const VirtualizedBucketRow = memo( isSelected={isSelected} projectRef={data.projectRef} style={style as CSSProperties} - className={BUCKET_ROW_HEIGHT} + className={cn(BUCKET_ROW_HEIGHT)} /> ) }, @@ -95,19 +96,15 @@ export const BucketList = ({ buckets, selectedBucketId, projectRef = '' }: Bucke const numBuckets = buckets.length if (numBuckets <= 50) { - return ( -
- {buckets.map((bucket) => ( - - ))} -
- ) + return buckets.map((bucket) => ( + + )) } return ( diff --git a/apps/studio/components/interfaces/Storage/StorageMenu.tsx b/apps/studio/components/interfaces/Storage/StorageMenu.tsx index 8ffd4ca64e6..26348fd5073 100644 --- a/apps/studio/components/interfaces/Storage/StorageMenu.tsx +++ b/apps/studio/components/interfaces/Storage/StorageMenu.tsx @@ -10,7 +10,7 @@ import { useBucketsQuery } from 'data/storage/buckets-query' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { IS_PLATFORM } from 'lib/constants' import { useStorageExplorerStateSnapshot } from 'state/storage-explorer' -import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, Menu } from 'ui' +import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, cn, Menu } from 'ui' import { InfoTooltip } from 'ui-patterns/info-tooltip' import { InnerSideBarEmptyPanel, @@ -70,15 +70,12 @@ export const StorageMenu = () => { [sortedBuckets, searchText] ) const tempNotSupported = error?.message.includes('Tenant config') && isBranch + const isVirtualized = buckets.length > 50 return ( <> - -
+ +
@@ -110,8 +107,8 @@ export const StorageMenu = () => {
-
-
+
+
All buckets} /> {isLoading && ( @@ -165,27 +162,27 @@ export const StorageMenu = () => { )}
+
-
- Configuration} /> - - -

Policies

+
+ Configuration} /> + + +

Policies

+
+ + {IS_PLATFORM && ( + + +
+

Settings

+ {isListV2UpgradeAvailable && ( + Upgrade available + )} +
- {IS_PLATFORM && ( - - -
-

Settings

- {isListV2UpgradeAvailable && ( - Upgrade available - )} -
-
- - )} -
+ )}
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/QuickstartTemplatesWidget.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/QuickstartTemplatesWidget.tsx index e4fb1ee0a31..14d2336a775 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/QuickstartTemplatesWidget.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/QuickstartTemplatesWidget.tsx @@ -1,6 +1,7 @@ import { Columns3, Layers, Table2 } from 'lucide-react' import { useCallback, useEffect, useState } from 'react' import { toast } from 'sonner' + import { cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import type { TableField } from '../TableEditor.types' import { tableTemplates } from './templates' diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/templates.ts b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/templates.ts index 68dd6dfe4da..27e101814b9 100644 --- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/templates.ts +++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/templates.ts @@ -12,12 +12,7 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'user_id', - type: 'uuid', - nullable: false, - unique: true, - }, + { name: 'user_id', type: 'uuid', nullable: false, unique: true }, { name: 'username', type: 'text', nullable: true, unique: true }, { name: 'display_name', type: 'text', nullable: true }, { name: 'avatar_url', type: 'text', nullable: true }, @@ -40,11 +35,7 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'author_id', - type: 'uuid', - nullable: false, - }, + { name: 'author_id', type: 'uuid', nullable: false }, { name: 'content', type: 'text', nullable: false }, { name: 'image_url', type: 'text', nullable: true }, { name: 'likes_count', type: 'int4', nullable: false, default: '0' }, @@ -65,16 +56,8 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'follower_id', - type: 'uuid', - nullable: false, - }, - { - name: 'following_id', - type: 'uuid', - nullable: false, - }, + { name: 'follower_id', type: 'uuid', nullable: false }, + { name: 'following_id', type: 'uuid', nullable: false }, { name: 'created_at', type: 'timestamptz', nullable: false, default: 'now()' }, ], rationale: 'Tracks relationships between followers and followed users', @@ -120,12 +103,8 @@ export const tableTemplates: Record = { default: 'gen_random_uuid()', }, { name: 'order_number', type: 'text', nullable: false, unique: true }, - { - name: 'customer_id', - type: 'uuid', - nullable: false, - }, - { name: 'status', type: 'text', nullable: false, default: "'pending'" }, + { name: 'customer_id', type: 'uuid', nullable: false }, + { name: 'status', type: 'text', nullable: false, default: 'pending' }, { name: 'subtotal', type: 'numeric', nullable: false }, { name: 'tax', type: 'numeric', nullable: false, default: '0' }, { name: 'shipping', type: 'numeric', nullable: false, default: '0' }, @@ -147,16 +126,8 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'user_id', - type: 'uuid', - nullable: false, - }, - { - name: 'product_id', - type: 'uuid', - nullable: false, - }, + { name: 'user_id', type: 'uuid', nullable: false }, + { name: 'product_id', type: 'uuid', nullable: false }, { name: 'quantity', type: 'int4', nullable: false, default: '1' }, { name: 'added_at', type: 'timestamptz', nullable: false, default: 'now()' }, ], @@ -180,11 +151,7 @@ export const tableTemplates: Record = { { name: 'content', type: 'text', nullable: true }, { name: 'excerpt', type: 'text', nullable: true }, { name: 'cover_image', type: 'text', nullable: true }, - { - name: 'author_id', - type: 'uuid', - nullable: false, - }, + { name: 'author_id', type: 'uuid', nullable: false }, { name: 'status', type: 'text', nullable: false, default: "'draft'" }, { name: 'published_at', type: 'timestamptz', nullable: true }, { name: 'created_at', type: 'timestamptz', nullable: false, default: 'now()' }, @@ -222,11 +189,7 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'article_id', - type: 'uuid', - nullable: false, - }, + { name: 'article_id', type: 'uuid', nullable: false }, { name: 'author_name', type: 'text', nullable: false }, { name: 'author_email', type: 'text', nullable: false }, { name: 'content', type: 'text', nullable: false }, @@ -251,13 +214,9 @@ export const tableTemplates: Record = { { name: 'title', type: 'text', nullable: false }, { name: 'description', type: 'text', nullable: true }, { name: 'completed', type: 'bool', nullable: false, default: 'false' }, - { name: 'priority', type: 'text', nullable: true, default: "'medium'" }, + { name: 'priority', type: 'text', nullable: true, default: 'medium' }, { name: 'due_date', type: 'date', nullable: true }, - { - name: 'user_id', - type: 'uuid', - nullable: false, - }, + { name: 'user_id', type: 'uuid', nullable: false }, { name: 'list_id', type: 'uuid', nullable: true }, { name: 'created_at', type: 'timestamptz', nullable: false, default: 'now()' }, { name: 'updated_at', type: 'timestamptz', nullable: false, default: 'now()' }, @@ -279,11 +238,7 @@ export const tableTemplates: Record = { { name: 'description', type: 'text', nullable: true }, { name: 'color', type: 'text', nullable: true }, { name: 'icon', type: 'text', nullable: true }, - { - name: 'user_id', - type: 'uuid', - nullable: false, - }, + { name: 'user_id', type: 'uuid', nullable: false }, { name: 'created_at', type: 'timestamptz', nullable: false, default: 'now()' }, { name: 'updated_at', type: 'timestamptz', nullable: false, default: 'now()' }, ], @@ -300,11 +255,7 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'task_id', - type: 'uuid', - nullable: false, - }, + { name: 'task_id', type: 'uuid', nullable: false }, { name: 'title', type: 'text', nullable: false }, { name: 'completed', type: 'bool', nullable: false, default: 'false' }, { name: 'position', type: 'int4', nullable: false, default: '0' }, @@ -325,11 +276,7 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'user_id', - type: 'uuid', - nullable: true, - }, + { name: 'user_id', type: 'uuid', nullable: true }, { name: 'session_id', type: 'text', nullable: true }, { name: 'event_type', type: 'text', nullable: false }, { name: 'properties', type: 'jsonb', nullable: true }, @@ -350,11 +297,7 @@ export const tableTemplates: Record = { isPrimary: true, default: 'gen_random_uuid()', }, - { - name: 'user_id', - type: 'uuid', - nullable: true, - }, + { name: 'user_id', type: 'uuid', nullable: true }, { name: 'session_id', type: 'text', nullable: true }, { name: 'path', type: 'text', nullable: false }, { name: 'referrer', type: 'text', nullable: true }, diff --git a/apps/studio/components/layouts/Tabs/NewTab.tsx b/apps/studio/components/layouts/Tabs/NewTab.tsx index 1eb98dc29eb..99dbe052b96 100644 --- a/apps/studio/components/layouts/Tabs/NewTab.tsx +++ b/apps/studio/components/layouts/Tabs/NewTab.tsx @@ -20,7 +20,7 @@ import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { usePHFlag } from 'hooks/ui/useFlag' import { uuidv4 } from 'lib/helpers' import { useProfile } from 'lib/profile' -import { useAiAssistantStateSnapshot, AssistantMessageType } from 'state/ai-assistant-state' +import { AssistantMessageType, useAiAssistantStateSnapshot } from 'state/ai-assistant-state' import { useSqlEditorV2StateSnapshot } from 'state/sql-editor-v2' import { useTableEditorStateSnapshot } from 'state/table-editor' import { createTabId, useTabsStateSnapshot } from 'state/tabs' diff --git a/apps/studio/data/edge-functions/edge-functions-deploy-mutation.ts b/apps/studio/data/edge-functions/edge-functions-deploy-mutation.ts index b0efb202524..fa00cb4f9e7 100644 --- a/apps/studio/data/edge-functions/edge-functions-deploy-mutation.ts +++ b/apps/studio/data/edge-functions/edge-functions-deploy-mutation.ts @@ -63,6 +63,7 @@ export const useEdgeFunctionDeployMutation = ({ async onSuccess(data, variables, context) { const { projectRef, slug } = variables await Promise.all([ + queryClient.invalidateQueries(edgeFunctionsKeys.list(projectRef)), queryClient.invalidateQueries(edgeFunctionsKeys.detail(projectRef, slug)), queryClient.invalidateQueries(edgeFunctionsKeys.body(projectRef, slug)), ])