From 3dfde15133fb9f623d1500bf710ecff834bc98b7 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 27 Jun 2018 18:56:14 -0700 Subject: Always restart onboarding from 0 and other small improvements --- packages/website/ts/redux/reducer.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/website/ts/redux') diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index ed6a4868e..de95296b0 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -312,6 +312,8 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State { ...state, isPortalOnboardingShowing, hasPortalOnboardingBeenSeen: true, + // always start onboarding from the beginning + portalOnboardingStep: 0, }; } -- cgit v1.2.3 From fc40efb761514b9e22e77f61d161d267b5f4c3c0 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 29 Jun 2018 11:47:12 -0700 Subject: Allow you to continue the onboarding flow once youve installed metamask and refreshed the page --- packages/website/ts/redux/reducer.ts | 6 +++--- packages/website/ts/redux/store.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/website/ts/redux') diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index de95296b0..caddabcf0 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -42,7 +42,7 @@ export interface State { userEtherBalanceInWei?: BigNumber; portalOnboardingStep: number; isPortalOnboardingShowing: boolean; - hasPortalOnboardingBeenSeen: boolean; + hasPortalOnboardingBeenClosed: boolean; // Note: cache of supplied orderJSON in fill order step. Do not use for anything else. userSuppliedOrderCache: Order; @@ -85,7 +85,7 @@ export const INITIAL_STATE: State = { userSuppliedOrderCache: undefined, portalOnboardingStep: 0, isPortalOnboardingShowing: false, - hasPortalOnboardingBeenSeen: false, + hasPortalOnboardingBeenClosed: false, // Docs docsVersion: DEFAULT_DOCS_VERSION, availableDocVersions: [DEFAULT_DOCS_VERSION], @@ -311,7 +311,7 @@ export function reducer(state: State = INITIAL_STATE, action: Action): State { return { ...state, isPortalOnboardingShowing, - hasPortalOnboardingBeenSeen: true, + hasPortalOnboardingBeenClosed: !isPortalOnboardingShowing ? true : state.hasPortalOnboardingBeenClosed, // always start onboarding from the beginning portalOnboardingStep: 0, }; diff --git a/packages/website/ts/redux/store.ts b/packages/website/ts/redux/store.ts index 203f068a1..0d0e6cea1 100644 --- a/packages/website/ts/redux/store.ts +++ b/packages/website/ts/redux/store.ts @@ -15,7 +15,7 @@ store.subscribe( _.throttle(() => { // Persisted state stateStorage.saveState({ - hasPortalOnboardingBeenSeen: store.getState().hasPortalOnboardingBeenSeen, + hasPortalOnboardingBeenClosed: store.getState().hasPortalOnboardingBeenClosed, }); }, ONE_SECOND), ); -- cgit v1.2.3