From 16f5a5e72aee7672c5d7ee214c2547bd809da7dc Mon Sep 17 00:00:00 2001 From: Brian Holmes Date: Sat, 19 Oct 2024 08:55:31 -0700 Subject: [PATCH] don't fill inferred properties in sidebar --- web-common/src/components/forms/InputLabel.svelte | 2 +- web-common/src/features/visual-metrics-editing/Sidebar.svelte | 4 ++-- web-common/src/features/visual-metrics-editing/lib.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web-common/src/components/forms/InputLabel.svelte b/web-common/src/components/forms/InputLabel.svelte index bca493296ae..1a2651eb127 100644 --- a/web-common/src/components/forms/InputLabel.svelte +++ b/web-common/src/components/forms/InputLabel.svelte @@ -21,7 +21,7 @@
- + {@html hint} diff --git a/web-common/src/features/visual-metrics-editing/Sidebar.svelte b/web-common/src/features/visual-metrics-editing/Sidebar.svelte index 0e5bc84e04a..edfba5c0d6c 100644 --- a/web-common/src/features/visual-metrics-editing/Sidebar.svelte +++ b/web-common/src/features/visual-metrics-editing/Sidebar.svelte @@ -88,7 +88,7 @@ fields: [ { key: "label", - hint: "Used on dashboards and charts", + hint: "Used on dashboards and charts. Inferred from name when not provided", label: "Label", }, @@ -176,7 +176,7 @@ fields: [ { key: "label", - hint: "Used on dashboards and charts", + hint: "Used on dashboards and charts. Inferred from name when not provided", label: "Label", }, diff --git a/web-common/src/features/visual-metrics-editing/lib.ts b/web-common/src/features/visual-metrics-editing/lib.ts index 7c5aa8844ec..35c2488f12e 100644 --- a/web-common/src/features/visual-metrics-editing/lib.ts +++ b/web-common/src/features/visual-metrics-editing/lib.ts @@ -65,7 +65,7 @@ export class YAMLMeasure { constructor(item?: YAMLMap) { this.expression = item?.get("expression") ?? ""; this.name = item?.get("name") ?? ""; - this.label = item?.get("label") ?? item?.get("name") ?? ""; + this.label = item?.get("label") ?? ""; this.description = item?.get("description") ?? ""; this.valid_percent_of_total = item?.get("valid_percent_of_total") === undefined