From 01b38cdd964daee4e8b17ab8ba8234c4d14cb096 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Mon, 25 Mar 2024 18:38:32 -0500 Subject: [PATCH] add a tab view for help mode, singular store, use md composable - Added a tab view for help mode which tracks the current, relevant help texts using a stack. - Consolidated multiple help stores into one. - Used an existing composable for MD rendering. - Modified the composable to use the html prop, add `
`s in `
` sections and render font awesome icons wherever there is a `fa-iconname` section. - Other help mode related minor refactoring --- client/src/components/Form/FormDisplay.vue | 6 +- .../History/Modals/SelectorModal.vue | 24 +++- .../components/Masthead/HelpModeSwitch.vue | 24 +++- client/src/components/Panels/HelpModeText.vue | 131 +++++++++++------- client/src/composables/markdown.ts | 56 +++++++- .../src/entry/analysis/modules/Analysis.vue | 4 +- .../stores/helpmode/helpModeStatusStore.ts | 32 ----- client/src/stores/helpmode/helpModeStore.ts | 111 +++++++++++++++ .../src/stores/helpmode/helpModeTextStore.ts | 45 ------ client/src/stores/helpmode/helpTextConfig.yml | 11 +- 10 files changed, 302 insertions(+), 142 deletions(-) delete mode 100644 client/src/stores/helpmode/helpModeStatusStore.ts create mode 100644 client/src/stores/helpmode/helpModeStore.ts delete mode 100644 client/src/stores/helpmode/helpModeTextStore.ts diff --git a/client/src/components/Form/FormDisplay.vue b/client/src/components/Form/FormDisplay.vue index 293857ea4e33..289972140231 100644 --- a/client/src/components/Form/FormDisplay.vue +++ b/client/src/components/Form/FormDisplay.vue @@ -19,7 +19,7 @@ import { mapActions } from "pinia"; import Vue from "vue"; -import { useHelpModeTextStore } from "@/stores/helpmode/helpModeTextStore"; +import { useHelpModeStore } from "@/stores/helpmode/helpModeStore"; import FormInputs from "./FormInputs"; import { matchInputs, validateInputs, visitInputs } from "./utilities"; @@ -154,10 +154,10 @@ export default { }, destroyed() { // since the user is leaving the form, the help mode is reset - this.clearHelpModeText(); + this.clearHelpModeText("tool_form_base"); }, methods: { - ...mapActions(useHelpModeTextStore, ["storeHelpModeText", "clearHelpModeText"]), + ...mapActions(useHelpModeStore, ["storeHelpModeText", "clearHelpModeText"]), callHelpMode() { this.storeHelpModeText("tool_form_base"); }, diff --git a/client/src/components/History/Modals/SelectorModal.vue b/client/src/components/History/Modals/SelectorModal.vue index 4c7be641955d..a9472750a9f9 100644 --- a/client/src/components/History/Modals/SelectorModal.vue +++ b/client/src/components/History/Modals/SelectorModal.vue @@ -1,4 +1,6 @@