Skip to content

Commit 35f5c21

Browse files
committed
polish comparison button title
1 parent c621644 commit 35f5c21

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/notebooks/deepnote/deepnoteBigNumberCellStatusBarProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ export class DeepnoteBigNumberCellStatusBarProvider
182182
let comparisonText: string;
183183
if (comparisonEnabled && comparisonType && comparisonValue) {
184184
const comparisonTypeLabel = comparisonType === 'percentage-change' ? '% change' : 'vs';
185-
comparisonText = `Comparison: ${comparisonTypeLabel} ${comparisonValue}`;
185+
const comparisonTitle = (metadata?.deepnote_big_number_comparison_title as string) || '';
186+
comparisonText = `Comparison: ${comparisonTypeLabel} ${
187+
comparisonTitle ? `${comparisonTitle} (${comparisonValue})` : comparisonValue
188+
}`;
186189
} else {
187190
comparisonText = 'Set up comparison';
188191
}

0 commit comments

Comments
 (0)