Skip to content

Commit c68b5e9

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
refactor(ui): finish radius references in shared and runtime styles
1 parent 2282d4a commit c68b5e9

9 files changed

Lines changed: 12 additions & 13 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/components/folders/use-row-drag-ghost.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useCallback, useEffect, useMemo, useRef } from 'react'
1111
* the label inherit the app font and match the row it was lifted from.
1212
*/
1313
const DRAG_GHOST_STYLE =
14-
'position:fixed;top:-500px;left:0;display:inline-flex;align-items:center;padding:4px 10px;background:var(--surface-active);border:1px solid var(--border);border-radius:8px;font-size:13px;color:var(--text-body);white-space:nowrap;pointer-events:none;box-shadow:var(--shadow-medium);z-index:var(--z-toast)'
14+
'position:fixed;top:-500px;left:0;display:inline-flex;align-items:center;padding:4px 10px;background:var(--surface-active);border:1px solid var(--border);border-radius:var(--radius-lg);font-size:13px;color:var(--text-body);white-space:nowrap;pointer-events:none;box-shadow:var(--shadow-medium);z-index:var(--z-toast)'
1515

1616
const DRAG_GHOST_LABEL_STYLE = 'max-width:200px;overflow:hidden;text-overflow:ellipsis'
1717

‎apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const LAYOUT_STYLES = {
142142
rowGap: 'pb-6',
143143
userRow: 'flex flex-col items-end gap-[6px] pt-3',
144144
attachmentWidth: 'max-w-[70%]',
145-
userBubble: 'max-w-[70%] overflow-hidden rounded-[16px] bg-[var(--surface-5)] px-3.5 py-2',
145+
userBubble: 'max-w-[70%] overflow-hidden rounded-2xl bg-[var(--surface-5)] px-3.5 py-2',
146146
assistantRow: 'group/msg',
147147
footer: 'shrink-0 px-[24px] pb-[16px]',
148148
footerInner: 'mx-auto max-w-chat',
@@ -154,7 +154,7 @@ const LAYOUT_STYLES = {
154154
rowGap: 'pb-4',
155155
userRow: 'flex flex-col items-end gap-[6px] pt-2',
156156
attachmentWidth: 'max-w-[85%]',
157-
userBubble: 'max-w-[85%] overflow-hidden rounded-[16px] bg-[var(--surface-5)] px-3 py-2',
157+
userBubble: 'max-w-[85%] overflow-hidden rounded-2xl bg-[var(--surface-5)] px-3 py-2',
158158
assistantRow: 'group/msg',
159159
footer: 'shrink-0 px-3 pb-3',
160160
footerInner: '',

‎apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export const ColumnHeaderMenu = React.memo(function ColumnHeaderMenu({
178178
ghost.textContent = ghostLabel
179179
ghost.className = 'text-small'
180180
ghost.style.cssText =
181-
'position:absolute;top:-9999px;padding:4px 8px;background:var(--bg);border:1px solid var(--border);border-radius:4px;white-space:nowrap;color:var(--text-primary)'
181+
'position:absolute;top:-9999px;padding:4px 8px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);white-space:nowrap;color:var(--text-primary)'
182182
document.body.appendChild(ghost)
183183
e.dataTransfer.setDragImage(ghost, ghost.offsetWidth / 2, ghost.offsetHeight / 2)
184184
requestAnimationFrame(() => ghost.parentNode?.removeChild(ghost))

‎apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/workflow-group-meta-cell.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ export function WorkflowGroupMetaCell({
475475
ghost.textContent = name
476476
ghost.className = 'text-xs'
477477
ghost.style.cssText =
478-
'position:absolute;top:-9999px;padding:4px 8px;background:var(--bg);border:1px solid var(--border);border-radius:4px;white-space:nowrap;color:var(--text-primary)'
478+
'position:absolute;top:-9999px;padding:4px 8px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);white-space:nowrap;color:var(--text-primary)'
479479
document.body.appendChild(ghost)
480480
e.dataTransfer.setDragImage(ghost, ghost.offsetWidth / 2, ghost.offsetHeight / 2)
481481
requestAnimationFrame(() => ghost.parentNode?.removeChild(ghost))

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ export function ConditionInput({
952952
? 'rounded-t-sm border-[var(--border-1)] border-b'
953953
: isElseConditionTitle(block.title)
954954
? 'rounded-sm border-0'
955-
: 'rounded-t-[4px] border-[var(--border-1)] border-b'
955+
: 'rounded-t-sm border-[var(--border-1)] border-b'
956956
)}
957957
>
958958
<span className='text-[var(--text-tertiary)] text-sm'>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components/drag-preview.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function createDragPreview(info: DragItemInfo): HTMLElement {
1919
preview.style.cssText = `
2020
width: 250px;
2121
background: var(--surface-1);
22-
border-radius: 8px;
22+
border-radius: var(--radius-lg);
2323
padding: 8px 9px;
2424
display: flex;
2525
align-items: center;
@@ -37,7 +37,7 @@ export function createDragPreview(info: DragItemInfo): HTMLElement {
3737
: document.createElement('div')
3838
iconContainer.style.width = '24px'
3939
iconContainer.style.height = '24px'
40-
iconContainer.style.borderRadius = '6px'
40+
iconContainer.style.borderRadius = 'var(--radius-md)'
4141
iconContainer.style.display = 'flex'
4242
iconContainer.style.alignItems = 'center'
4343
iconContainer.style.justifyContent = 'center'

‎apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/block/block.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ interface SubBlockValueEntry {
6060
const HANDLE_STYLES = {
6161
horizontal: 'border-none! bg-[var(--surface-7)]! h-5! w-[7px]! rounded-xs!',
6262
right:
63-
'z-[10]! border-none! bg-[var(--workflow-edge)]! h-5! w-[7px]! rounded-r-[2px]! rounded-l-none!',
64-
error:
65-
'z-[10]! border-none! bg-[var(--text-error)]! h-[7px]! w-6! rounded-b-[2px]! rounded-t-none!',
63+
'z-[10]! border-none! bg-[var(--workflow-edge)]! h-5! w-[7px]! rounded-r-xs! rounded-l-none!',
64+
error: 'z-[10]! border-none! bg-[var(--text-error)]! h-[7px]! w-6! rounded-b-xs! rounded-t-none!',
6665
} as const
6766

6867
/** Reusable style object for error handles positioned at bottom-right */

‎apps/sim/app/workspace/[workspaceId]/w/components/sidebar/utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function createSidebarDragGhost(label: string, icon?: SidebarDragGhostIco
5151
padding: 4px 10px;
5252
background: var(--surface-active);
5353
border: 1px solid rgba(255,255,255,0.08);
54-
border-radius: 8px;
54+
border-radius: var(--radius-lg);
5555
font-family: system-ui, -apple-system, sans-serif;
5656
font-size: 13px;
5757
color: var(--text-body);

‎packages/workflow-renderer/src/note/note-block-view.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const NOTE_REMARK_PLUGINS = [remarkGfm, remarkBreaks]
108108
*/
109109
const NOTE_TASK_CHECKBOX_CLASS = [
110110
'mt-[3px] inline-grid size-[16px] shrink-0 appearance-none place-content-center',
111-
'rounded-[3px] border border-[var(--border-1)] bg-transparent',
111+
'rounded-sm border border-[var(--border-1)] bg-transparent',
112112
'checked:border-[var(--text-primary)] checked:bg-[var(--text-primary)]',
113113
"checked:after:size-[10px] checked:after:bg-[var(--surface-2)] checked:after:content-['']",
114114
'checked:after:[clip-path:polygon(14%_44%,0_65%,50%_100%,100%_16%,80%_0%,43%_62%)]',

0 commit comments

Comments
 (0)