Skip to content

Commit b60987d

Browse files
committed
fix(settings): address PR feedback — deduplicate skeleton, fix import order, remove inline comments
1 parent 65f512b commit b60987d

File tree

6 files changed

+4
-52
lines changed

6 files changed

+4
-52
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ import { Skeleton } from '@/components/emcn'
77
export function AdminSkeleton() {
88
return (
99
<div className='flex h-full flex-col gap-6'>
10-
{/* Super admin mode toggle */}
1110
<div className='flex items-center justify-between'>
1211
<Skeleton className='h-[14px] w-[120px]' />
1312
<Skeleton className='h-[20px] w-[36px] rounded-full' />
1413
</div>
1514

1615
<div className='h-px bg-[var(--border-secondary)]' />
1716

18-
{/* Workflow import section */}
1917
<div className='flex flex-col gap-2'>
2018
<Skeleton className='h-[14px] w-[340px]' />
2119
<div className='flex gap-2'>
@@ -26,19 +24,15 @@ export function AdminSkeleton() {
2624

2725
<div className='h-px bg-[var(--border-secondary)]' />
2826

29-
{/* User management section */}
3027
<div className='flex flex-col gap-3'>
3128
<Skeleton className='h-[14px] w-[120px]' />
3229

33-
{/* Search input + button */}
3430
<div className='flex gap-2'>
3531
<Skeleton className='h-9 flex-1 rounded-md' />
3632
<Skeleton className='h-9 w-[80px] rounded-md' />
3733
</div>
3834

39-
{/* Table */}
4035
<div className='flex flex-col gap-0.5'>
41-
{/* Column headers */}
4236
<div className='flex items-center gap-3 border-[var(--border-secondary)] border-b px-3 py-2'>
4337
<Skeleton className='h-[12px] w-[200px]' />
4438
<Skeleton className='h-[12px] flex-1' />
@@ -47,7 +41,6 @@ export function AdminSkeleton() {
4741
<Skeleton className='h-[12px] w-[250px]' />
4842
</div>
4943

50-
{/* Table rows */}
5144
{Array.from({ length: 5 }).map((_, i) => (
5245
<div
5346
key={i}
@@ -66,7 +59,6 @@ export function AdminSkeleton() {
6659
))}
6760
</div>
6861

69-
{/* Pagination */}
7062
<div className='flex items-center justify-between'>
7163
<Skeleton className='h-[14px] w-[160px]' />
7264
<div className='flex gap-1'>

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,18 @@ export function ApiKeySkeleton() {
2424
export function ApiKeysSkeleton() {
2525
return (
2626
<div className='flex h-full flex-col gap-4.5'>
27-
{/* Search bar and Create button */}
2827
<div className='flex items-center gap-2'>
2928
<Skeleton className='h-[38px] flex-1 rounded-lg' />
3029
<Skeleton className='h-[38px] w-[90px] rounded-md' />
3130
</div>
3231

33-
{/* Scrollable content area */}
3432
<div className='min-h-0 flex-1 overflow-y-auto'>
3533
<div className='flex flex-col gap-4.5'>
36-
{/* Workspace section */}
3734
<div className='flex flex-col gap-2'>
3835
<Skeleton className='h-5 w-[80px]' />
3936
<Skeleton className='h-5 w-[180px]' />
4037
</div>
4138

42-
{/* Personal section */}
4339
<div className='flex flex-col gap-2'>
4440
<Skeleton className='h-5 w-[60px]' />
4541
<ApiKeySkeleton />
@@ -48,7 +44,6 @@ export function ApiKeysSkeleton() {
4844
</div>
4945
</div>
5046

51-
{/* Bottom toggle section */}
5247
<div className='mt-6 flex items-center justify-between'>
5348
<div className='flex items-center gap-2'>
5449
<Skeleton className='h-5 w-[170px]' />

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,20 @@ function CredentialRowSkeleton() {
4545
export function CredentialsSkeleton() {
4646
return (
4747
<div className='flex h-full flex-col gap-4'>
48-
{/* Search bar + Save button */}
4948
<div className='flex items-center gap-2'>
5049
<Skeleton className='h-[30px] flex-1 rounded-lg' />
5150
<Skeleton className='h-[30px] w-[50px] rounded-md' />
5251
</div>
5352

54-
{/* Scrollable content area */}
5553
<div className='min-h-0 flex-1 overflow-y-auto'>
5654
<div className='flex flex-col gap-4'>
5755
<div className={`${GRID_COLS} gap-y-2`}>
58-
{/* Workspace section header */}
5956
<Skeleton className={`${COL_SPAN_ALL} h-5 w-[70px]`} />
6057
<CredentialRowSkeleton />
6158
<CredentialRowSkeleton />
6259

63-
{/* Spacer matching the real component */}
6460
<div className={`${COL_SPAN_ALL} h-[8px]`} />
6561

66-
{/* Personal section header */}
6762
<Skeleton className={`${COL_SPAN_ALL} h-5 w-[55px]`} />
6863
<CredentialRowSkeleton />
6964
<CredentialRowSkeleton />

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export function InboxTaskSkeleton() {
2525
export function InboxSkeleton() {
2626
return (
2727
<div className='flex h-full flex-col gap-4.5'>
28-
{/* InboxEnableToggle: label + description on left, switch on right */}
2928
<div className='flex items-center justify-between'>
3029
<div className='flex flex-col gap-0.5'>
3130
<Skeleton className='h-[14px] w-[140px]' />
@@ -34,12 +33,9 @@ export function InboxSkeleton() {
3433
<Skeleton className='h-[20px] w-[36px] rounded-full' />
3534
</div>
3635

37-
{/* Border separator */}
3836
<div className='border-[var(--border)] border-t' />
3937

40-
{/* InboxSettingsTab: two sections with gap-6 */}
4138
<div className='flex flex-col gap-6'>
42-
{/* Sim's email section */}
4339
<div className='flex flex-col gap-1.5'>
4440
<Skeleton className='h-[14px] w-[90px]' />
4541
<div className='flex items-center justify-between'>
@@ -52,7 +48,6 @@ export function InboxSkeleton() {
5248
<Skeleton className='h-9 w-full rounded-md' />
5349
</div>
5450

55-
{/* Allowed senders section */}
5651
<div className='flex flex-col gap-1.5'>
5752
<Skeleton className='h-[14px] w-[110px]' />
5853
<Skeleton className='h-[13px] w-[260px]' />
@@ -68,13 +63,11 @@ export function InboxSkeleton() {
6863
</div>
6964
</div>
7065

71-
{/* Border separator with Inbox heading */}
7266
<div className='border-[var(--border)] border-t pt-4'>
7367
<Skeleton className='h-[14px] w-[40px]' />
7468
<Skeleton className='mt-0.5 h-[13px] w-[220px]' />
7569
</div>
7670

77-
{/* InboxTaskList: search bar + status filter */}
7871
<div className='flex flex-col gap-3'>
7972
<div className='flex items-center gap-2'>
8073
<Skeleton className='h-[32px] flex-1 rounded-lg' />

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

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
import { Skeleton } from '@/components/emcn'
2-
3-
/**
4-
* Skeleton for a single integration row matching the flex card layout.
5-
*/
6-
function IntegrationItemSkeleton() {
7-
return (
8-
<div className='flex items-center justify-between gap-3'>
9-
<div className='flex min-w-0 items-center gap-2.5'>
10-
<Skeleton className='h-8 w-8 flex-shrink-0 rounded-md' />
11-
<div className='flex min-w-0 flex-col justify-center gap-[1px]'>
12-
<Skeleton className='h-4 w-[120px]' />
13-
<Skeleton className='h-3.5 w-[180px]' />
14-
</div>
15-
</div>
16-
<div className='flex flex-shrink-0 items-center gap-1'>
17-
<Skeleton className='h-8 w-[60px] rounded-md' />
18-
<Skeleton className='h-8 w-[85px] rounded-md' />
19-
</div>
20-
</div>
21-
)
22-
}
2+
import { CredentialSkeleton } from '@/app/workspace/[workspaceId]/settings/components/credentials/credential-skeleton'
233

244
/**
255
* Skeleton for the Integrations section shown during dynamic import loading.
@@ -33,9 +13,9 @@ export function IntegrationsSkeleton() {
3313
</div>
3414
<div className='min-h-0 flex-1 overflow-y-auto'>
3515
<div className='flex flex-col gap-2'>
36-
<IntegrationItemSkeleton />
37-
<IntegrationItemSkeleton />
38-
<IntegrationItemSkeleton />
16+
<CredentialSkeleton />
17+
<CredentialSkeleton />
18+
<CredentialSkeleton />
3919
</div>
4020
</div>
4121
</div>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ import { DeletedItemSkeleton } from '@/app/workspace/[workspaceId]/settings/comp
88
export function RecentlyDeletedSkeleton() {
99
return (
1010
<div className='flex h-full flex-col gap-4.5'>
11-
{/* Search bar + sort dropdown row */}
1211
<div className='flex items-center gap-2'>
1312
<Skeleton className='h-[30px] flex-1 rounded-lg' />
1413
<Skeleton className='h-[30px] w-[190px] shrink-0 rounded-lg' />
1514
</div>
1615

17-
{/* Tabs bar */}
1816
<div className='relative flex gap-4 border-[var(--border)] border-b px-4'>
1917
<Skeleton className='mb-2 h-[20px] w-[32px] rounded-sm' />
2018
<Skeleton className='mb-2 h-[20px] w-[72px] rounded-sm' />
@@ -23,7 +21,6 @@ export function RecentlyDeletedSkeleton() {
2321
<Skeleton className='mb-2 h-[20px] w-[40px] rounded-sm' />
2422
</div>
2523

26-
{/* Item list */}
2724
<div className='min-h-0 flex-1 overflow-y-auto'>
2825
<div className='flex flex-col gap-2'>
2926
<DeletedItemSkeleton />

0 commit comments

Comments
 (0)