Skip to content

Commit 607b613

Browse files
BillLeoutsakosvl346Bill Leoutsakos
andauthored
improvement(ui): use chips for table job actions (#8082)
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
1 parent 96f4e64 commit 607b613

2 files changed

Lines changed: 16 additions & 21 deletions

File tree

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/run-status-control/run-status-control.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { memo } from 'react'
4-
import { Button } from '@sim/emcn'
4+
import { Chip } from '@sim/emcn'
55
import { Loader, Square } from '@sim/emcn/icons'
66

77
interface RunStatusControlProps {
@@ -38,15 +38,9 @@ export const RunStatusControl = memo(function RunStatusControl({
3838
</>
3939
)}
4040
</div>
41-
<Button
42-
variant='subtle'
43-
className='py-1 text-caption'
44-
onClick={onStopAll}
45-
disabled={isStopping}
46-
>
47-
<Square className='mr-1.5 size-[14px]' />
41+
<Chip leftIcon={Square} onClick={onStopAll} disabled={isStopping}>
4842
{isStopping ? 'Stopping…' : 'Stop all'}
49-
</Button>
43+
</Chip>
5044
</div>
5145
)
5246
})

apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/import-progress-menu.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import {
4-
Button,
4+
Chip,
55
DropdownMenu,
66
DropdownMenuContent,
77
DropdownMenuTrigger,
@@ -64,20 +64,21 @@ export function ImportProgressMenu({ workspaceId, tableId }: ImportProgressMenuP
6464
return (
6565
<DropdownMenu open={menuOpen} onOpenChange={setMenuOpen}>
6666
<DropdownMenuTrigger asChild>
67-
<Button variant='subtle' className='py-1 text-caption'>
68-
{/* Aggregate state, mirroring the row iconography: spinner while anything runs, then
69-
alert if any job failed, else a check. */}
70-
{anyRunning ? (
71-
<Loader animate className='mr-1.5 size-[14px] text-[var(--text-icon)]' />
72-
) : anyFailed ? (
73-
<CircleAlert className='mr-1.5 size-[14px] text-[var(--text-error)]' />
74-
) : (
75-
<CircleCheck className='mr-1.5 size-[14px] text-[var(--text-icon)]' />
76-
)}
67+
<Chip
68+
leftAdornment={
69+
anyRunning ? (
70+
<Loader animate className='size-[14px] text-[var(--text-icon)]' />
71+
) : anyFailed ? (
72+
<CircleAlert className='size-[14px] text-[var(--text-error)]' />
73+
) : (
74+
<CircleCheck className='size-[14px] text-[var(--text-icon)]' />
75+
)
76+
}
77+
>
7778
<span className='tabular-nums'>
7879
{done}/{total}
7980
</span>
80-
</Button>
81+
</Chip>
8182
</DropdownMenuTrigger>
8283
<DropdownMenuContent align='end' className='min-w-[320px] max-w-[420px]'>
8384
{imports.map((row) => {

0 commit comments

Comments
 (0)