From 7f64513a035758a44b510bfc1d3ed9b4cac1db60 Mon Sep 17 00:00:00 2001 From: Katie Date: Fri, 30 Sep 2022 09:27:37 -0400 Subject: [PATCH] CSR-762 Cleanup --- .../base-input-button/base-input-button.vue | 2 - src/constants/store-actions.js | 8 ---- src/constants/store-mutations.js | 8 ---- src/mixins/analytics-mixin.js | 2 - src/mixins/base-mixin.js | 14 +++---- src/store/index.js | 38 +------------------ 6 files changed, 7 insertions(+), 65 deletions(-) diff --git a/src/common-components/base-input-button/base-input-button.vue b/src/common-components/base-input-button/base-input-button.vue index e6861a638..46ad82b6d 100644 --- a/src/common-components/base-input-button/base-input-button.vue +++ b/src/common-components/base-input-button/base-input-button.vue @@ -27,8 +27,6 @@ import { useField } from "vee-validate"; import { toRef } from "vue"; import { gaStoreActions } from "../../constants/store-actions"; -// TODO KO Bug: select crack via keyboard, continue - doesn't fire -// TODO KO Bug: select a chip via keyboard, hit continue - doesn't fire the chip number export default { name: "base-input-button", emits: ["change"], diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 65d3789a1..fd2fad8fa 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -63,14 +63,6 @@ const storeActions = { "resetMoldingAndCapabilityQuestionAnswersIfNeeded", SAVE_MOLDING_QUESTION_ANSWERS: "saveMoldingQuestionAnswers", SAVE_CAPABILITY_QUESTION_ANSWERS: "saveCapabilityQuestionAnswers", - - // START GA click event actions - // UPDATE_CURRENTLY_SELECTED_VALUES: "updateCurrentlySelectedValues", - // UPDATE_FIRED_GA_CLICK_EVENT_VALUES: "updateFiredGaClickEventValues", - // UPDATE_LAST_FOCUSED_INPUT_GROUP: "updateLastFocusedInputGroup", - // UPDATE_WAS_LAST_FOCUSED_INPUT_MULTISELECT: - // "updateWasLastFocusedInputMultiselect", - // END GA click event actions }; const gaStoreActions = { diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 1f960abd1..e1ff971bf 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -66,14 +66,6 @@ const storeMutations = { // EXPERIMENT MUTATIONS UPDATE_EXPERIMENTS: "updateExperiments", UPDATE_TRIGGERED_SITE_ENTRY: "updateTriggeredSiteEntry", - - // START GA click event mutations - // UPDATE_CURRENTLY_SELECTED_VALUES: "updateCurrentlySelectedValues", - // UPDATE_FIRED_GA_CLICK_EVENT_VALUES: "updateFiredGaClickEventValues", - // UPDATE_LAST_FOCUSED_INPUT_GROUP: "updateLastFocusedInputGroup", - // UPDATE_WAS_LAST_FOCUSED_INPUT_MULTISELECT: - // "updateWasLastFocusedInputMultiselect", - // END GA click event mutations }; const gaStoreMutations = { diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 556ca509e..6eb18e462 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -29,8 +29,6 @@ export default { logCustomEvent(category, action, label, value) { const currentPageName = getPageNameByQueryString(); - console.log("PUSHING: ", label) - var payload = { userId: getDeviceIdValue(), sessionKey: getSessionKeyValue(), diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index 4c1e388ca..feac379f1 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -63,14 +63,12 @@ export default { }; }, pushRadioClickEventIfNecessary() { - const gaClickInformation = this.$store.getters.gaClickInformation; - const firedGaClickEventValues = - gaClickInformation.firedGaClickEventValues; - const currentlySelectedValues = - gaClickInformation.currentlySelectedValues; - const lastFocusedInputGroup = gaClickInformation.lastFocusedInputGroup; - const wasLastFocusedInputMultiselect = - gaClickInformation.wasLastFocusedInputMultiselect; + const { + firedGaClickEventValues, + currentlySelectedValues, + lastFocusedInputGroup, + wasLastFocusedInputMultiselect, + } = this.$store.getters.gaClickInformation; // Keyboard navigation if ( diff --git a/src/store/index.js b/src/store/index.js index cd2122ba9..80dbae835 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1359,48 +1359,12 @@ export const actions = { clearVin(context) { context.commit(storeMutations.UPDATE_VEHICLE_VIN, null); }, - - // START GA click event actions - // updateCurrentlySelectedValues(context, { groupName, value }) { - // context.commit( - // storeMutations.UPDATE_CURRENTLY_SELECTED_VALUES, - // groupName, - // value - // ); - // }, - // updateFiredGaClickEventValues(context, { groupName, value }) { - // context.commit( - // storeMutations.UPDATE_FIRED_GA_CLICK_EVENT_VALUES, - // groupName, - // value - // ); - // }, - // updateLastFocusedInputGroup(context, groupName) { - // context.commit(storeMutations.UPDATE_LAST_FOCUSED_INPUT_GROUP, groupName); - // }, - // updateWasLastFocusedInputMultiselect( - // context, - // wasLastFocusedInputMultiselect - // ) { - // context.commit( - // storeMutations.UPDATE_WAS_LAST_FOCUSED_INPUT_MULTISELECT, - // wasLastFocusedInputMultiselect - // ); - // }, - // END GA click event actions }; -// const store = new Store({ -// state, -// mutations, -// getters, -// actions, -// }); - export default createStore({ plugins: [createPersistedState({ reducer: state => { - const { gaState, ...rest } = state + const { gaState, ...rest } = state // Make sure gaState isn't persisted return rest } })],