Skip to content

Commit 523aff8

Browse files
committed
improvements(tables): styling improvements
1 parent 4fe9509 commit 523aff8

File tree

22 files changed

+133
-628
lines changed

22 files changed

+133
-628
lines changed

apps/sim/app/workspace/[workspaceId]/logs/logs.tsx

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -662,59 +662,25 @@ export default function Logs() {
662662
return {
663663
id: log.id,
664664
cells: {
665-
date: {
666-
content: (
667-
<span className='font-medium text-[12px] text-[var(--text-secondary)]'>
668-
{formattedDate.compactDate}
669-
</span>
670-
),
671-
},
672-
time: {
673-
content: (
674-
<span className='font-medium text-[12px] text-[var(--text-secondary)]'>
675-
{formattedDate.compactTime}
676-
</span>
677-
),
678-
},
679-
status: {
680-
content: <StatusBadge status={displayStatus} />,
681-
},
665+
date: { label: formattedDate.compactDate },
666+
time: { label: formattedDate.compactTime },
667+
status: { content: <StatusBadge status={displayStatus} /> },
682668
workflow: {
683-
content: (
684-
<span className='flex items-center gap-[8px] truncate'>
685-
{workflowColor && (
686-
<div
687-
className='h-[8px] w-[8px] flex-shrink-0 rounded-[2px] border-[1.5px]'
688-
style={{
689-
backgroundColor: workflowColor,
690-
borderColor: `${workflowColor}60`,
691-
backgroundClip: 'padding-box',
692-
}}
693-
/>
694-
)}
695-
<span className='truncate font-medium text-[12px] text-[var(--text-secondary)]'>
696-
{workflowName}
697-
</span>
698-
</span>
699-
),
700-
},
701-
cost: {
702-
content: (
703-
<span className='font-medium text-[12px] text-[var(--text-secondary)]'>
704-
{costText}
705-
</span>
706-
),
707-
},
708-
trigger: {
709-
content: <TriggerBadge trigger={log.trigger || 'manual'} />,
710-
},
711-
duration: {
712-
content: (
713-
<span className='font-medium text-[12px] text-[var(--text-secondary)]'>
714-
{durationText}
715-
</span>
716-
),
669+
icon: workflowColor ? (
670+
<div
671+
className='h-[10px] w-[10px] rounded-[3px] border-[1.5px]'
672+
style={{
673+
backgroundColor: workflowColor,
674+
borderColor: `${workflowColor}60`,
675+
backgroundClip: 'padding-box',
676+
}}
677+
/>
678+
) : undefined,
679+
label: workflowName,
717680
},
681+
cost: { label: costText },
682+
trigger: { content: <TriggerBadge trigger={log.trigger || 'manual'} /> },
683+
duration: { label: durationText },
718684
},
719685
}
720686
}),

apps/sim/app/workspace/[workspaceId]/logs/utils.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ interface StatusBadgeProps {
8787
*/
8888
export const StatusBadge = React.memo(({ status }: StatusBadgeProps) => {
8989
const config = STATUS_CONFIG[status]
90-
return React.createElement(Badge, { variant: config.variant, dot: true }, config.label)
90+
return React.createElement(
91+
Badge,
92+
{ variant: config.variant, dot: true, size: 'sm' },
93+
config.label
94+
)
9195
})
9296

9397
StatusBadge.displayName = 'StatusBadge'
@@ -110,18 +114,18 @@ export const TriggerBadge = React.memo(({ trigger }: TriggerBadgeProps) => {
110114

111115
const coreVariant = TRIGGER_VARIANT_MAP[trigger]
112116
if (coreVariant) {
113-
return React.createElement(Badge, { variant: coreVariant }, metadata.label)
117+
return React.createElement(Badge, { variant: coreVariant, size: 'sm' }, metadata.label)
114118
}
115119

116120
if (IconComponent) {
117121
return React.createElement(
118122
Badge,
119-
{ variant: 'gray-secondary', icon: IconComponent },
123+
{ variant: 'gray-secondary', size: 'sm', icon: IconComponent },
120124
metadata.label
121125
)
122126
}
123127

124-
return React.createElement(Badge, { variant: 'gray-secondary' }, metadata.label)
128+
return React.createElement(Badge, { variant: 'gray-secondary', size: 'sm' }, metadata.label)
125129
})
126130

127131
TriggerBadge.displayName = 'TriggerBadge'

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/cell-viewer-modal/cell-viewer-modal.tsx

Lines changed: 0 additions & 84 deletions
This file was deleted.

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/cell-viewer-modal/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export * from './cell-viewer-modal'
21
export * from './context-menu'
32
export * from './row-modal'
43
export * from './schema-modal'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export type { RowModalProps } from './row-modal'
21
export { RowModal } from './row-modal'

0 commit comments

Comments
 (0)