From 778601f91c36851534ad80dce31a04f699acc6cf Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 2 Feb 2021 14:50:39 -0500 Subject: [PATCH 1/3] Fix setup_step numbers --- .../Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx | 2 +- .../Step2_BlockSettingsView/BlockSettingsView.jsx | 4 ++-- .../Step3_ChooseDefaultSearchView/ChooseDefaultSearchView.jsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx b/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx index 3e591cba3..d8f1941fb 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx +++ b/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx @@ -29,7 +29,7 @@ const WelcomeView = (props) => {
{t('ghostery_dawn_onboarding_welcome')}
{t('ghostery_dawn_onboarding_welcome_message')}
- setSetupStep({ setup_step: LOGIN, origin: WELCOME })}> + setSetupStep({ setup_step: WELCOME, origin: WELCOME })}> {t('ghostery_dawn_onboarding_lets_do_this')} diff --git a/app/dawn-hub/Views/OnboardingViews/Step2_BlockSettingsView/BlockSettingsView.jsx b/app/dawn-hub/Views/OnboardingViews/Step2_BlockSettingsView/BlockSettingsView.jsx index 4b774d70b..594ab7a04 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step2_BlockSettingsView/BlockSettingsView.jsx +++ b/app/dawn-hub/Views/OnboardingViews/Step2_BlockSettingsView/BlockSettingsView.jsx @@ -18,7 +18,7 @@ import { NavLink } from 'react-router-dom'; import Tooltip from '../../../../shared-components/Tooltip'; import RadioButton from '../../../../shared-components/RadioButton/RadioButton'; import ToggleCheckbox from '../../../../shared-components/ToggleCheckbox/ToggleCheckbox'; -import { CHOOSE_DEFAULT_SEARCH, ONBOARDING } from '../../OnboardingView/OnboardingConstants'; +import { BLOCK_SETTINGS, ONBOARDING } from '../../OnboardingView/OnboardingConstants'; /** * @class Implement the Block Settings View for the Dawn Hub onboarding flow @@ -119,7 +119,7 @@ class BlockSettingsView extends Component { setBlockingPolicy({ blockingPolicy }); setSetupStep({ - setup_step: CHOOSE_DEFAULT_SEARCH, + setup_step: BLOCK_SETTINGS, dawn_setup_number: this.buildSetupNumberString(), origin: ONBOARDING }); diff --git a/app/dawn-hub/Views/OnboardingViews/Step3_ChooseDefaultSearchView/ChooseDefaultSearchView.jsx b/app/dawn-hub/Views/OnboardingViews/Step3_ChooseDefaultSearchView/ChooseDefaultSearchView.jsx index 7a422102c..4dda4582e 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step3_ChooseDefaultSearchView/ChooseDefaultSearchView.jsx +++ b/app/dawn-hub/Views/OnboardingViews/Step3_ChooseDefaultSearchView/ChooseDefaultSearchView.jsx @@ -16,7 +16,7 @@ import { NavLink } from 'react-router-dom'; import ClassNames from 'classnames'; import { alwaysLog } from '../../../../../src/utils/common'; import RadioButton from '../../../../shared-components/RadioButton'; -import { ONBOARDING, CHOOSE_PLAN } from '../../OnboardingView/OnboardingConstants'; +import { ONBOARDING, CHOOSE_DEFAULT_SEARCH, CHOOSE_PLAN } from '../../OnboardingView/OnboardingConstants'; import { SEARCH_GHOSTERY, SEARCH_BING, @@ -162,7 +162,7 @@ class ChooseDefaultSearchView extends Component { setDefaultSearch(chosenSearchName); setSetupStep({ - setup_step: CHOOSE_PLAN, + setup_step: CHOOSE_DEFAULT_SEARCH, dawn_setup_number: searchSetupNumbers.find(elem => elem.name === chosenSearchName).dawn_setup_number, origin: ONBOARDING }); From e1173ff1d590709ad069f6bc38ff77905172b827 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 3 Feb 2021 16:18:12 -0500 Subject: [PATCH 2/3] Use one time hook to send a ping when user reaches the success view page --- .../OnboardingViews/Step5_SuccessView/SuccessView.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/dawn-hub/Views/OnboardingViews/Step5_SuccessView/SuccessView.jsx b/app/dawn-hub/Views/OnboardingViews/Step5_SuccessView/SuccessView.jsx index 94a85e6d9..57a4ef07d 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step5_SuccessView/SuccessView.jsx +++ b/app/dawn-hub/Views/OnboardingViews/Step5_SuccessView/SuccessView.jsx @@ -11,7 +11,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0 */ -import React, { Fragment } from 'react'; +import React, { Fragment, useEffect } from 'react'; import { NavLink } from 'react-router-dom'; /** @@ -23,8 +23,11 @@ const SuccessView = (props) => { const { actions } = props; const { sendPing } = actions; - const handleCTAButtonClick = () => { + useEffect(() => { sendPing({ type: 'gb_onboarding_success' }); + }, []); + + const handleCTAButtonClick = () => { window.close(); }; From bb65a019ec2bfa91e5764cbd56035b404be173c3 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 3 Feb 2021 16:59:49 -0500 Subject: [PATCH 3/3] Appease linter --- .../Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx b/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx index d8f1941fb..1abfe815e 100644 --- a/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx +++ b/app/dawn-hub/Views/OnboardingViews/Step0_WelcomeView/WelcomeView.jsx @@ -14,7 +14,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; -import { LOGIN, WELCOME } from '../../OnboardingView/OnboardingConstants'; +import { WELCOME } from '../../OnboardingView/OnboardingConstants'; /** * A Functional React component for rendering the Browser Welcome View