From 881d641cc3b3243eb4057640f0bebc49834bb35b Mon Sep 17 00:00:00 2001 From: Eduardo Filho Date: Mon, 7 Oct 2024 11:45:11 -0400 Subject: [PATCH] feature: Build Ids on Distribution Comparison View --- .../DistributionComparisonModal.svelte | 33 ++++++++++--------- .../explore/BuildIdFormattedToDate.svelte | 23 +++++++++++++ src/components/explore/ToplineRow.svelte | 23 ++----------- 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 src/components/explore/BuildIdFormattedToDate.svelte diff --git a/src/components/DistributionComparisonModal.svelte b/src/components/DistributionComparisonModal.svelte index 244a6129d..26770af71 100644 --- a/src/components/DistributionComparisonModal.svelte +++ b/src/components/DistributionComparisonModal.svelte @@ -6,6 +6,8 @@ import { store } from '../state/store'; import routes from '../config/routes'; import { convertValueToPercentage } from '../utils/probe-utils'; + import { formatToBuildID } from '../utils/formatters'; + import BuildIdFormattedToDate from './explore/BuildIdFormattedToDate.svelte'; export let densityMetricType; export let topChartData; @@ -119,8 +121,7 @@
+ >Distribution comparison
Distribution comparison - {$store.probe.name}
@@ -130,12 +131,14 @@ + design="slider" /> {/if}
-

Reference

+

+ Reference - +

{#key cumulative} {#key innerHeight} {#key innerWidth} @@ -145,8 +148,7 @@ density={topChartDensity} {topTick} {tickIncrement} - {activeCategoricalProbeLabels} - > + {activeCategoricalProbeLabels}> {#if bottomChartData} + {activeCategoricalProbeLabels} /> {/if} @@ -167,7 +168,10 @@ {/key}
-

Hovered

+

+ Hovered - +

{#key cumulative} {#key innerHeight} {#key innerWidth} @@ -177,8 +181,7 @@ density={bottomChartDensity} {topTick} {tickIncrement} - {activeCategoricalProbeLabels} - > + {activeCategoricalProbeLabels}> {#if bottomChartData} + {activeCategoricalProbeLabels} /> {/if} @@ -204,8 +206,7 @@

{$store.probe.name}

+ showLinks={false} />

diff --git a/src/components/explore/BuildIdFormattedToDate.svelte b/src/components/explore/BuildIdFormattedToDate.svelte new file mode 100644 index 000000000..3336a716d --- /dev/null +++ b/src/components/explore/BuildIdFormattedToDate.svelte @@ -0,0 +1,23 @@ + + + + + + {buildIdHour.slice(0, 4)}-{buildIdHour.slice(4, 6)}-{buildIdHour.slice( + 6, + 8 + )} +{buildIdHour.slice(8, 10)}:{buildIdHour.slice(10, 12)}:{buildIdHour.slice(12, 14)} diff --git a/src/components/explore/ToplineRow.svelte b/src/components/explore/ToplineRow.svelte index 20571fa7a..e623d968e 100644 --- a/src/components/explore/ToplineRow.svelte +++ b/src/components/explore/ToplineRow.svelte @@ -3,6 +3,7 @@ import { Help } from '@graph-paper/icons'; import { tooltip as tooltipAction } from '@graph-paper/core/actions'; import { formatToBuildID } from '../../utils/formatters'; + import BuildIdFormattedToDate from './BuildIdFormattedToDate.svelte'; export let value; export let compare; @@ -66,15 +67,6 @@ width: var(--space-32x); } - .big-label__value__date { - font-weight: bold; - color: var(--cool-gray-700); - } - - .big-label__value__time { - color: var(--cool-gray-600); - } - .big-label__value__compare { color: var(--cool-gray-600); } @@ -92,22 +84,13 @@
+ class="data-graphic__element-title__icon">
{#if value}
{#if aggregationLevel === 'build_id'} - - {parsedLabel.slice(0, 4)}-{parsedLabel.slice( - 4, - 6 - )}-{parsedLabel.slice(6, 8)} - {parsedLabel.slice(8, 10)}:{parsedLabel.slice(10, 12)}:{parsedLabel.slice(12, 14)} + {:else}{value}{/if}
{/if}