Skip to content

Commit f62fddf

Browse files
committed
improvement(settings): add search bar to skeleton loading states
Skeletons now include the search bar (and action button where applicable) so the layout matches the final component 1:1. Eliminates layout shift when the dynamic chunk loads — search bar area is already reserved by the skeleton.
1 parent 5184580 commit f62fddf

File tree

7 files changed

+55
-20
lines changed

7 files changed

+55
-20
lines changed

apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/api-key-skeleton.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@ export function ApiKeySkeleton() {
2323
*/
2424
export function ApiKeysSkeleton() {
2525
return (
26-
<div className='flex flex-col gap-[12px]'>
27-
<ApiKeySkeleton />
28-
<ApiKeySkeleton />
26+
<div className='flex h-full flex-col gap-[18px]'>
27+
<div className='flex items-center gap-[8px]'>
28+
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
29+
<Skeleton className='h-[30px] w-[80px] rounded-[6px]' />
30+
</div>
31+
<div className='flex flex-col gap-[12px]'>
32+
<ApiKeySkeleton />
33+
<ApiKeySkeleton />
34+
</div>
2935
</div>
3036
)
3137
}

apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-skeleton.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ export function BYOKKeySkeleton() {
2323
*/
2424
export function BYOKSkeleton() {
2525
return (
26-
<div className='flex flex-col gap-[12px]'>
27-
<BYOKKeySkeleton />
28-
<BYOKKeySkeleton />
29-
<BYOKKeySkeleton />
26+
<div className='flex h-full flex-col gap-[18px]'>
27+
<div className='flex items-center gap-[8px]'>
28+
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
29+
</div>
30+
<Skeleton className='h-[14px] w-[280px]' />
31+
<div className='flex flex-col gap-[8px]'>
32+
<BYOKKeySkeleton />
33+
<BYOKKeySkeleton />
34+
<BYOKKeySkeleton />
35+
</div>
3036
</div>
3137
)
3238
}

apps/sim/app/workspace/[workspaceId]/settings/components/credential-sets/credential-sets-skeleton.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import { Skeleton } from '@/components/emcn'
66
export function CredentialSetsSkeleton() {
77
return (
88
<div className='flex h-full flex-col gap-[18px]'>
9+
<div className='flex items-center gap-[8px]'>
10+
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
11+
<Skeleton className='h-[30px] w-[80px] rounded-[6px]' />
12+
</div>
913
<div className='flex flex-col gap-[8px]'>
1014
<Skeleton className='h-[14px] w-[100px]' />
1115
<div className='flex items-center justify-between'>

apps/sim/app/workspace/[workspaceId]/settings/components/credentials/credential-skeleton.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ export function CredentialSkeleton() {
2323
*/
2424
export function CredentialsSkeleton() {
2525
return (
26-
<div className='flex flex-col gap-[12px]'>
27-
<CredentialSkeleton />
28-
<CredentialSkeleton />
29-
<CredentialSkeleton />
26+
<div className='flex h-full flex-col gap-[18px]'>
27+
<div className='flex items-center gap-[8px]'>
28+
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
29+
<Skeleton className='h-[30px] w-[64px] rounded-[6px]' />
30+
</div>
31+
<div className='flex flex-col gap-[12px]'>
32+
<CredentialSkeleton />
33+
<CredentialSkeleton />
34+
<CredentialSkeleton />
35+
</div>
3036
</div>
3137
)
3238
}

apps/sim/app/workspace/[workspaceId]/settings/components/custom-tools/custom-tool-skeleton.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ export function CustomToolSkeleton() {
2323
*/
2424
export function CustomToolsSkeleton() {
2525
return (
26-
<div className='flex flex-col gap-[12px]'>
27-
<CustomToolSkeleton />
28-
<CustomToolSkeleton />
29-
<CustomToolSkeleton />
26+
<div className='flex h-full flex-col gap-[18px]'>
27+
<div className='flex items-center gap-[8px]'>
28+
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
29+
<Skeleton className='h-[30px] w-[64px] rounded-[6px]' />
30+
</div>
31+
<div className='flex flex-col gap-[12px]'>
32+
<CustomToolSkeleton />
33+
<CustomToolSkeleton />
34+
<CustomToolSkeleton />
35+
</div>
3036
</div>
3137
)
3238
}

apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-skeleton/mcp-server-skeleton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Skeleton } from '@/components/ui'
1+
import { Skeleton } from '@/components/emcn'
22

33
/**
44
* Skeleton loader for MCP server list items.
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1+
import { Skeleton } from '@/components/emcn'
12
import { McpServerSkeleton } from '@/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-skeleton/mcp-server-skeleton'
23

34
/**
45
* Skeleton for the MCP section shown during dynamic import loading.
56
*/
67
export function McpSkeleton() {
78
return (
8-
<div className='flex flex-col gap-[12px]'>
9-
<McpServerSkeleton />
10-
<McpServerSkeleton />
11-
<McpServerSkeleton />
9+
<div className='flex h-full flex-col gap-[18px]'>
10+
<div className='flex items-center gap-[8px]'>
11+
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
12+
<Skeleton className='h-[30px] w-[64px] rounded-[6px]' />
13+
</div>
14+
<div className='flex flex-col gap-[12px]'>
15+
<McpServerSkeleton />
16+
<McpServerSkeleton />
17+
<McpServerSkeleton />
18+
</div>
1219
</div>
1320
)
1421
}

0 commit comments

Comments
 (0)