Skip to content

Commit 6bb2913

Browse files
remove badges; polish up colours
1 parent 96ecd65 commit 6bb2913

File tree

6 files changed

+6
-66
lines changed

6 files changed

+6
-66
lines changed

vscode/react/src/components/tablediff/ColumnStatsSection.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@ export function ColumnStatsSection({
102102
<SectionToggle
103103
id="columnStats"
104104
title="Column Statistics"
105-
badge={`${Object.keys(columnStats).length} columns`}
106-
badgeClassName={twMerge(
107-
'px-2 py-1 text-xs rounded border',
108-
twColors.bgInput,
109-
'text-[var(--vscode-symbolIcon-classForeground,#9b59b6)]',
110-
'border-[var(--vscode-symbolIcon-classForeground,#9b59b6)]',
111-
)}
112105
expanded={expanded}
113106
onToggle={onToggle}
114107
>

vscode/react/src/components/tablediff/RowStatsSection.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ export function RowStatsSection({
2828
<SectionToggle
2929
id="rows"
3030
title="Row Statistics"
31-
badge={`${formatPercentage(fullMatchPct)} match rate`}
32-
badgeClassName={twMerge(
33-
'px-2 py-1 text-xs rounded border',
34-
twColors.bgInput,
35-
twColors.textInfo,
36-
twColors.borderInfo,
37-
)}
3831
expanded={expanded}
3932
onToggle={onToggle}
4033
>

vscode/react/src/components/tablediff/SampleDataSection.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ export function SampleDataSection({ rowDiff }: SampleDataSectionProps) {
255255
<div className="px-8 py-3 space-y-6">
256256
{/* COMMON ROWS diff */}
257257
<div>
258-
<h4 className={twMerge('text-sm font-medium mb-3', twColors.textClass)}>
259-
COMMON ROWS Data Differences:
258+
<h4 className={twMerge('text-sm font-medium mb-3', twColors.textInfo)}>
259+
Common Rows Data Differences:
260260
</h4>
261261
{Object.keys(groupedDifferences).length > 0 ? (
262262
<div className="space-y-4">
@@ -285,7 +285,7 @@ export function SampleDataSection({ rowDiff }: SampleDataSectionProps) {
285285
twColors.textWarning,
286286
)}
287287
>
288-
SOURCE ONLY Rows:
288+
Source Only Rows:
289289
</h4>
290290
<div
291291
className={twMerge(
@@ -343,7 +343,7 @@ export function SampleDataSection({ rowDiff }: SampleDataSectionProps) {
343343
twColors.textSuccess,
344344
)}
345345
>
346-
TARGET ONLY Rows:
346+
Target Only Rows:
347347
</h4>
348348
<div
349349
className={twMerge(

vscode/react/src/components/tablediff/SchemaDiffSection.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,30 +84,10 @@ export function SchemaDiffSection({
8484
)
8585
}, [schemaDiff])
8686

87-
const totalChanges =
88-
Object.keys(schemaDiff.added).length +
89-
Object.keys(schemaDiff.removed).length +
90-
Object.keys(schemaDiff.modified).length
91-
9287
return (
9388
<SectionToggle
9489
id="schema"
9590
title="Schema Changes"
96-
badge={schemaHasChanges ? `${totalChanges} changes` : 'No changes'}
97-
badgeClassName={twMerge(
98-
'px-2 py-1 text-xs rounded border',
99-
schemaHasChanges
100-
? twColors.bgModified +
101-
' ' +
102-
twColors.textModified +
103-
' ' +
104-
twColors.borderModified
105-
: twColors.bgAdded +
106-
' ' +
107-
twColors.textAdded +
108-
' ' +
109-
twColors.borderAdded,
110-
)}
11191
expanded={expanded}
11292
onToggle={onToggle}
11393
>

vscode/react/src/components/tablediff/SectionToggle.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ import { twColors, twMerge } from './tailwind-utils'
66
interface SectionToggleProps {
77
id: keyof ExpandedSections
88
title: string
9-
badge?: string
10-
badgeStyle?: React.CSSProperties
11-
badgeClassName?: string
129
expanded: boolean
1310
onToggle(): void
1411
children: ReactNode
1512
}
1613

1714
export function SectionToggle({
1815
title,
19-
badge,
20-
badgeStyle,
21-
badgeClassName,
2216
expanded,
2317
onToggle,
2418
children,
@@ -39,16 +33,6 @@ export function SectionToggle({
3933
<ChevronRightIcon className="w-4 h-4 mr-2 shrink-0 transition-transform" />
4034
)}
4135
<span className="font-medium flex-1">{title}</span>
42-
{badge && (
43-
<span
44-
className={
45-
badgeClassName || 'text-xs px-2 py-0.5 rounded ml-2 border'
46-
}
47-
style={badgeStyle}
48-
>
49-
{badge}
50-
</span>
51-
)}
5236
</button>
5337
<div
5438
className={twMerge(

vscode/react/src/components/tablediff/TableDiffResults.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function TableDiffResults({ data }: Props) {
3838
}))
3939
}
4040

41-
const formatPercentage = (v: number) => `${(v).toFixed(1)}%`
41+
const formatPercentage = (v: number) => `${v.toFixed(1)}%`
4242
const formatCount = (v: number) => v.toLocaleString()
4343

4444
return (
@@ -72,10 +72,7 @@ export function TableDiffResults({ data }: Props) {
7272
{schema_diff.source}
7373
</code>
7474
<span
75-
className={twMerge(
76-
'text-sm font-medium ml-4',
77-
twColors.textTarget,
78-
)}
75+
className={twMerge('text-sm font-medium ml-4', twColors.textTarget)}
7976
>
8077
Target:
8178
</span>
@@ -148,13 +145,6 @@ export function TableDiffResults({ data }: Props) {
148145
<SectionToggle
149146
id="sampleData"
150147
title="Sample Data"
151-
badge={`${(row_diff.processed_sample_data.column_differences?.length || 0) + (row_diff.processed_sample_data.source_only?.length || 0) + (row_diff.processed_sample_data.target_only?.length || 0)} rows`}
152-
badgeClassName={twMerge(
153-
'px-2 py-1 text-xs rounded border',
154-
twColors.bgInput,
155-
twColors.textAccent,
156-
'border-[var(--vscode-textLink-foreground)]',
157-
)}
158148
expanded={expanded.sampleData}
159149
onToggle={() => toggle('sampleData')}
160150
>

0 commit comments

Comments
 (0)