Skip to content

Commit 96ecd65

Browse files
add source target related colours
1 parent 66bde08 commit 96ecd65

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ export function RowStatsSection({
4646
<span className="font-medium">{formatCount(fullMatchCount)}</span>
4747
</div>
4848
<div className="flex justify-between">
49-
<span className={twColors.textInfo}>~ Partial Matches</span>
49+
<span className={twColors.textClass}>~ Partial Matches</span>
5050
<span className="font-medium">
5151
{formatCount(partialMatchCount)}
5252
</span>
5353
</div>
5454
</div>
5555
<div className="space-y-1">
5656
<div className="flex justify-between">
57-
<span className={twColors.textWarning}>+ Source Only</span>
57+
<span className={twColors.textSource}>+ Source Only</span>
5858
<span className="font-medium">{formatCount(sOnlyCount)}</span>
5959
</div>
6060
<div className="flex justify-between">
61-
<span className={twColors.textError}>- Target Only</span>
61+
<span className={twColors.textTarget}>- Target Only</span>
6262
<span className="font-medium">{formatCount(tOnlyCount)}</span>
6363
</div>
6464
</div>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const TableHeaderCell = ({
2929
<th
3030
className={twMerge(
3131
'text-left py-2 px-2 font-medium whitespace-nowrap',
32-
isSource && twColors.textInfo,
33-
isTarget && twColors.textSuccess,
32+
isSource && twColors.textSource,
33+
isTarget && twColors.textTarget,
3434
!isSource && !isTarget && twColors.textMuted,
3535
)}
3636
>
@@ -61,8 +61,8 @@ const DiffTableCell = ({
6161
<td
6262
className={twMerge(
6363
'py-2 px-2 font-mono whitespace-nowrap',
64-
isSource && twColors.textInfo + ' bg-blue-500/10',
65-
isTarget && twColors.textSuccess + ' bg-green-500/10',
64+
isSource && twColors.textSource + ' bg-blue-500/10',
65+
isTarget && twColors.textTarget + ' bg-green-500/10',
6666
!isSource && !isTarget && twColors.textForeground,
6767
)}
6868
>
@@ -255,7 +255,7 @@ 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.textInfo)}>
258+
<h4 className={twMerge('text-sm font-medium mb-3', twColors.textClass)}>
259259
COMMON ROWS Data Differences:
260260
</h4>
261261
{Object.keys(groupedDifferences).length > 0 ? (

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

Lines changed: 7 additions & 7 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 * 100).toFixed(1)}%`
41+
const formatPercentage = (v: number) => `${(v).toFixed(1)}%`
4242
const formatCount = (v: number) => v.toLocaleString()
4343

4444
return (
@@ -58,13 +58,13 @@ export function TableDiffResults({ data }: Props) {
5858
)}
5959
>
6060
<div className="flex items-center gap-3 flex-wrap">
61-
<span className={twMerge('text-sm font-medium', twColors.textInfo)}>
61+
<span className={twMerge('text-sm font-medium', twColors.textSource)}>
6262
Source:
6363
</span>
6464
<code
6565
className={twMerge(
6666
'px-2 py-1 rounded text-sm whitespace-nowrap border',
67-
twColors.textInfo,
67+
twColors.textSource,
6868
twColors.bgInput,
6969
twColors.borderPanel,
7070
)}
@@ -74,15 +74,15 @@ export function TableDiffResults({ data }: Props) {
7474
<span
7575
className={twMerge(
7676
'text-sm font-medium ml-4',
77-
twColors.textSuccess,
77+
twColors.textTarget,
7878
)}
7979
>
8080
Target:
8181
</span>
8282
<code
8383
className={twMerge(
8484
'px-2 py-1 rounded text-sm whitespace-nowrap border',
85-
twColors.textSuccess,
85+
twColors.textTarget,
8686
twColors.bgInput,
8787
twColors.borderPanel,
8888
)}
@@ -91,13 +91,13 @@ export function TableDiffResults({ data }: Props) {
9191
</code>
9292
</div>
9393
<div className="flex items-center gap-6 text-xs flex-wrap">
94-
<span className={twColors.textInfo}>
94+
<span className={twColors.textSource}>
9595
Source rows:{' '}
9696
<span className="font-medium">
9797
{formatCount(row_diff.source_count)}
9898
</span>
9999
</span>
100-
<span className={twColors.textSuccess}>
100+
<span className={twColors.textTarget}>
101101
Target rows:{' '}
102102
<span className="font-medium">
103103
{formatCount(row_diff.target_count)}

vscode/react/src/components/tablediff/tailwind-utils.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ export const twColors = {
1212
textRemoved: 'text-[var(--vscode-diffEditor-removedTextForeground)]',
1313
textModified: 'text-[var(--vscode-diffEditor-modifiedTextForeground)]',
1414

15+
// Source and target environment colors
16+
textSource: 'text-[var(--vscode-debugIcon-continueForeground)]',
17+
textTarget: 'text-[var(--vscode-debugIcon-startForeground)]',
18+
textClass: 'text-[var(--vscode-symbolIcon-classForeground)]',
19+
bgSource: 'bg-[var(--vscode-debugIcon-continueForeground)]',
20+
bgTarget: 'bg-[var(--vscode-debugIcon-startForeground)]',
21+
bgClass: 'bg-[var(--vscode-symbolIcon-classForeground)]',
22+
borderSource: 'border-[var(--vscode-debugIcon-continueForeground)]',
23+
borderTarget: 'border-[var(--vscode-debugIcon-startForeground)]',
24+
borderClass: 'border-[var(--vscode-symbolIcon-classForeground)]',
25+
1526
// Background colors
1627
bgEditor: 'bg-[var(--vscode-editor-background)]',
1728
bgInput: 'bg-[var(--vscode-input-background)]',

0 commit comments

Comments
 (0)