Skip to content

Commit b73d2fb

Browse files
committed
style(sql): drop redundant inline styles in favour of classes [UX-1259]
Remove three style={{ borderColor: 'var(--color-border)' }} props that just re-asserted the base-layer default (* { border-color: var(--color-border) }), and move the two static bridge-timeline widths to w-full/w-[74%]/w-[26%] utility classes.
1 parent 513e10b commit b73d2fb

3 files changed

Lines changed: 5 additions & 16 deletions

File tree

frontend/src/components/pages/sql/sql-editor.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,7 @@ export const SqlEditor = forwardRef<SqlEditorHandle, SqlEditorProps>(function Sq
373373

374374
return (
375375
<div className="flex min-h-0 flex-1 flex-col bg-background">
376-
<div
377-
className="flex shrink-0 items-center gap-2 border-b pr-[10px]"
378-
style={{ borderColor: 'var(--color-border)' }}
379-
>
376+
<div className="flex shrink-0 items-center gap-2 border-b pr-[10px]">
380377
<div className="flex min-w-0 flex-1 items-stretch overflow-x-auto">
381378
{tabs.map((t) => (
382379
<div

frontend/src/components/pages/sql/sql-results.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ function BridgeTimeline({ bridge }: { bridge: BridgeInfo }) {
124124
<div
125125
className={cn(
126126
'flex min-w-0 items-center border border-info border-r-0 bg-info-subtle px-[11px]',
127-
caught ? 'rounded-md border-r' : 'rounded-l-md'
127+
caught ? 'w-full rounded-md border-r' : 'w-[74%] rounded-l-md'
128128
)}
129-
style={{ width: caught ? '100%' : '74%' }}
130129
/>
131130
{!caught && (
132131
<>
@@ -137,8 +136,7 @@ function BridgeTimeline({ bridge }: { bridge: BridgeInfo }) {
137136
</div>
138137
{/* .res-bridge-tl-live: live-tail segment with the 45deg hatch overlay. */}
139138
<div
140-
className="relative overflow-hidden rounded-r-md border border-success border-l-0 bg-background-success-subtle after:absolute after:inset-0 after:content-[''] after:[background:repeating-linear-gradient(45deg,transparent,transparent_5px,var(--color-success-subtle)_5px,var(--color-success-subtle)_10px)]"
141-
style={{ width: '26%' }}
139+
className="relative w-[26%] overflow-hidden rounded-r-md border border-success border-l-0 bg-background-success-subtle after:absolute after:inset-0 after:content-[''] after:[background:repeating-linear-gradient(45deg,transparent,transparent_5px,var(--color-success-subtle)_5px,var(--color-success-subtle)_10px)]"
142140
/>
143141
</>
144142
)}

frontend/src/components/pages/sql/sql-workspace.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,7 @@ export function SqlWorkspace({ role = 'viewer' }: SqlWorkspaceProps) {
389389
className="flex h-full flex-col bg-background text-strong dark:[--color-border-strong:var(--color-grey-800)] dark:[--color-border-subtle:var(--color-grey-600)] dark:[--color-border:var(--color-grey-700)]"
390390
ref={rootRef}
391391
>
392-
<div
393-
className="flex h-[52px] shrink-0 items-center gap-3 border-b bg-background px-6"
394-
style={{ borderColor: 'var(--color-border)' }}
395-
>
392+
<div className="flex h-[52px] shrink-0 items-center gap-3 border-b bg-background px-6">
396393
<div className="flex items-center gap-2 font-semibold text-sm text-strong tracking-heading [&_svg]:text-action-primary">
397394
<Database size={16} /> Redpanda SQL <span className="font-medium text-muted-foreground">· Studio</span>
398395
</div>
@@ -404,10 +401,7 @@ export function SqlWorkspace({ role = 'viewer' }: SqlWorkspaceProps) {
404401
</div>
405402

406403
<div className="flex min-h-0 flex-1">
407-
<div
408-
className="flex min-h-0 w-[320px] shrink-0 flex-col border-r bg-background"
409-
style={{ borderColor: 'var(--color-border)' }}
410-
>
404+
<div className="flex min-h-0 w-[320px] shrink-0 flex-col border-r bg-background">
411405
<CatalogTree
412406
catalogs={catalogs}
413407
isLoading={isLoading}

0 commit comments

Comments
 (0)