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.
This commit is contained in:
waleed
2026-03-09 20:45:35 -07:00
parent 5184580dbd
commit f62fddfac5
7 changed files with 55 additions and 20 deletions

View File

@@ -23,9 +23,15 @@ export function ApiKeySkeleton() {
*/
export function ApiKeysSkeleton() {
return (
<div className='flex flex-col gap-[12px]'>
<ApiKeySkeleton />
<ApiKeySkeleton />
<div className='flex h-full flex-col gap-[18px]'>
<div className='flex items-center gap-[8px]'>
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
<Skeleton className='h-[30px] w-[80px] rounded-[6px]' />
</div>
<div className='flex flex-col gap-[12px]'>
<ApiKeySkeleton />
<ApiKeySkeleton />
</div>
</div>
)
}

View File

@@ -23,10 +23,16 @@ export function BYOKKeySkeleton() {
*/
export function BYOKSkeleton() {
return (
<div className='flex flex-col gap-[12px]'>
<BYOKKeySkeleton />
<BYOKKeySkeleton />
<BYOKKeySkeleton />
<div className='flex h-full flex-col gap-[18px]'>
<div className='flex items-center gap-[8px]'>
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
</div>
<Skeleton className='h-[14px] w-[280px]' />
<div className='flex flex-col gap-[8px]'>
<BYOKKeySkeleton />
<BYOKKeySkeleton />
<BYOKKeySkeleton />
</div>
</div>
)
}

View File

@@ -6,6 +6,10 @@ import { Skeleton } from '@/components/emcn'
export function CredentialSetsSkeleton() {
return (
<div className='flex h-full flex-col gap-[18px]'>
<div className='flex items-center gap-[8px]'>
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
<Skeleton className='h-[30px] w-[80px] rounded-[6px]' />
</div>
<div className='flex flex-col gap-[8px]'>
<Skeleton className='h-[14px] w-[100px]' />
<div className='flex items-center justify-between'>

View File

@@ -23,10 +23,16 @@ export function CredentialSkeleton() {
*/
export function CredentialsSkeleton() {
return (
<div className='flex flex-col gap-[12px]'>
<CredentialSkeleton />
<CredentialSkeleton />
<CredentialSkeleton />
<div className='flex h-full flex-col gap-[18px]'>
<div className='flex items-center gap-[8px]'>
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
<Skeleton className='h-[30px] w-[64px] rounded-[6px]' />
</div>
<div className='flex flex-col gap-[12px]'>
<CredentialSkeleton />
<CredentialSkeleton />
<CredentialSkeleton />
</div>
</div>
)
}

View File

@@ -23,10 +23,16 @@ export function CustomToolSkeleton() {
*/
export function CustomToolsSkeleton() {
return (
<div className='flex flex-col gap-[12px]'>
<CustomToolSkeleton />
<CustomToolSkeleton />
<CustomToolSkeleton />
<div className='flex h-full flex-col gap-[18px]'>
<div className='flex items-center gap-[8px]'>
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
<Skeleton className='h-[30px] w-[64px] rounded-[6px]' />
</div>
<div className='flex flex-col gap-[12px]'>
<CustomToolSkeleton />
<CustomToolSkeleton />
<CustomToolSkeleton />
</div>
</div>
)
}

View File

@@ -1,4 +1,4 @@
import { Skeleton } from '@/components/ui'
import { Skeleton } from '@/components/emcn'
/**
* Skeleton loader for MCP server list items.

View File

@@ -1,3 +1,4 @@
import { Skeleton } from '@/components/emcn'
import { McpServerSkeleton } from '@/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-skeleton/mcp-server-skeleton'
/**
@@ -5,10 +6,16 @@ import { McpServerSkeleton } from '@/app/workspace/[workspaceId]/settings/compon
*/
export function McpSkeleton() {
return (
<div className='flex flex-col gap-[12px]'>
<McpServerSkeleton />
<McpServerSkeleton />
<McpServerSkeleton />
<div className='flex h-full flex-col gap-[18px]'>
<div className='flex items-center gap-[8px]'>
<Skeleton className='h-[30px] flex-1 rounded-[8px]' />
<Skeleton className='h-[30px] w-[64px] rounded-[6px]' />
</div>
<div className='flex flex-col gap-[12px]'>
<McpServerSkeleton />
<McpServerSkeleton />
<McpServerSkeleton />
</div>
</div>
)
}