diff --git a/packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte b/packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte index 87510e5827..b60c242b5a 100644 --- a/packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldContext/Chart.svelte @@ -2,6 +2,7 @@ import ExplanationModal from './ExplanationModal/index.svelte' import { warnings, errors } from "../../fieldValidator"; import { Column, Support, NotRequired, StringNumber } from "./lines" + import subjects from './subjects'; export let support = {} @@ -16,7 +17,7 @@ let root = null; - let explanationModalSubject = null + let explanationModalSubject = subjects.none const setExplanationSubject = (option) => { explanationModalSubject = option; diff --git a/packages/builder/src/components/design/settings/controls/FieldContext/ExplanationModal/index.svelte b/packages/builder/src/components/design/settings/controls/FieldContext/ExplanationModal/index.svelte index 227e5b46fc..133b2a51b4 100644 --- a/packages/builder/src/components/design/settings/controls/FieldContext/ExplanationModal/index.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldContext/ExplanationModal/index.svelte @@ -1,27 +1,28 @@
- {#if subject === "column"} + {#if subject === subjects.column} - {:else if subject === "support"} + {:else if subject === subjects.support} - {:else if subject === "stringsAndNumbers"} + {:else if subject === subjects.stringsAsNumbers} - {:else if subject === "required"} + {:else if subject === subjects.notRequired} {/if}
diff --git a/packages/builder/src/components/design/settings/controls/FieldContext/lines/Column.svelte b/packages/builder/src/components/design/settings/controls/FieldContext/lines/Column.svelte index b00d414613..e1952fd67d 100644 --- a/packages/builder/src/components/design/settings/controls/FieldContext/lines/Column.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldContext/lines/Column.svelte @@ -1,5 +1,6 @@ @@ -9,8 +10,8 @@ No setExplanationSubject("required")} - on:mouseleave={() => setExplanationSubject(null)} + on:mouseenter={() => setExplanationSubject(subjects.notRequired)} + on:mouseleave={() => setExplanationSubject(subjects.none)} text="required" /> diff --git a/packages/builder/src/components/design/settings/controls/FieldContext/lines/StringNumber.svelte b/packages/builder/src/components/design/settings/controls/FieldContext/lines/StringNumber.svelte index ee304e32cc..b3499a9733 100644 --- a/packages/builder/src/components/design/settings/controls/FieldContext/lines/StringNumber.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldContext/lines/StringNumber.svelte @@ -1,5 +1,7 @@ @@ -7,8 +9,8 @@ Any setExplanationSubject("stringsAndNumbers")} - on:mouseleave={() => setExplanationSubject(null)} + on:mouseenter={() => setExplanationSubject(subjects.stringsAsNumbers)} + on:mouseleave={() => setExplanationSubject(subjects.none)} text="non-number values" /> diff --git a/packages/builder/src/components/design/settings/controls/FieldContext/lines/Support.svelte b/packages/builder/src/components/design/settings/controls/FieldContext/lines/Support.svelte index 92f817af09..4fbfe87c76 100644 --- a/packages/builder/src/components/design/settings/controls/FieldContext/lines/Support.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldContext/lines/Support.svelte @@ -1,5 +1,6 @@