File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
static/app/views/preprod/snapshots Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,12 @@ export function DiffImageDisplay({
8787 } ;
8888 } , [ diffImageUrl ] ) ;
8989
90- const diffPercent = pair . diff === null ? null : `${ ( pair . diff * 100 ) . toFixed ( 1 ) } %` ;
90+ // >= 1% shows 1 decimal (e.g. "93.5%"), < 1% shows up to 4 without trailing zeros (e.g. "0.0227%")
91+ const diffPct = pair . diff === null ? null : pair . diff * 100 ;
92+ const diffPercent =
93+ diffPct === null
94+ ? null
95+ : `${ diffPct >= 1 ? diffPct . toFixed ( 1 ) : parseFloat ( diffPct . toFixed ( 4 ) ) } %` ;
9196
9297 return (
9398 < Flex direction = "column" gap = "lg" padding = "xl" flex = "1" minHeight = "0" >
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export default function SnapshotsPage() {
7676 const [ showOverlay , setShowOverlay ] = useState ( true ) ;
7777 const [ overlayColor , setOverlayColor ] = useState < string > ( ( ) => {
7878 const palette = theme . chart . getColorPalette ( 10 ) ;
79- return palette . at ( - 1 ) ?? '#67C800' ;
79+ return palette . at ( - 5 ) ?? palette [ 0 ] ;
8080 } ) ;
8181 const [ diffMode , setDiffMode ] = useState < DiffMode > ( 'split' ) ;
8282
You can’t perform that action at this time.
0 commit comments