From b15d63a9359dc8606f04316d377c9536d4c75d85 Mon Sep 17 00:00:00 2001 From: kanaabe Date: Thu, 22 Feb 2018 16:05:03 -0500 Subject: [PATCH] [FIX onboarding-tracking] Update context_module on genes --- .../Steps/Genes/GeneSearchResults.tsx | 2 +- .../Onboarding/Steps/Genes/SuggestedGenes.tsx | 2 +- src/Components/Onboarding/Wizard.tsx | 79 ++++++++++++++----- .../Onboarding/__stories__/Wizard.story.tsx | 19 +++-- 4 files changed, 69 insertions(+), 33 deletions(-) diff --git a/src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx b/src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx index b5e1d11282..d5307f0cf1 100644 --- a/src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx +++ b/src/Components/Onboarding/Steps/Genes/GeneSearchResults.tsx @@ -94,7 +94,7 @@ class GeneSearchResultsContent extends React.Component { action: "Followed Gene", entity_id: gene._id, entity_slug: gene.id, - context_module: "gene search", + context_module: "onboarding search", }) } diff --git a/src/Components/Onboarding/Steps/Genes/SuggestedGenes.tsx b/src/Components/Onboarding/Steps/Genes/SuggestedGenes.tsx index 05bf4991c6..eb8f269041 100644 --- a/src/Components/Onboarding/Steps/Genes/SuggestedGenes.tsx +++ b/src/Components/Onboarding/Steps/Genes/SuggestedGenes.tsx @@ -82,7 +82,7 @@ class SuggestedGenesContent extends React.Component { action: "Followed Gene", entity_id: gene._id, entity_slug: gene.id, - context_module: "gene recommended", + context_module: "onboarding recommended", }) } diff --git a/src/Components/Onboarding/Wizard.tsx b/src/Components/Onboarding/Wizard.tsx index d3b41e6894..6e061c9b71 100644 --- a/src/Components/Onboarding/Wizard.tsx +++ b/src/Components/Onboarding/Wizard.tsx @@ -1,20 +1,22 @@ import React from "react" -import { Redirect, Route } from 'react-router' +import { Redirect, Route } from "react-router" import Events from "../../Utils/Events" import { track } from "../../Utils/track" import { ProgressIndicator } from "./ProgressIndicator" -import Artists from './Steps/Artists' +import Artists from "./Steps/Artists" import Budget, { BudgetComponent } from "./Steps/Budget" -import CollectorIntent, { CollectorIntentComponent } from "./Steps/CollectorIntent" -import Genes from './Steps/Genes' +import CollectorIntent, { + CollectorIntentComponent, +} from "./Steps/CollectorIntent" +import Genes from "./Steps/Genes" const STEPS = [ `/personalize/${CollectorIntentComponent.slug}`, `/personalize/${Artists.slug}`, `/personalize/${Genes.slug}`, - `/personalize/${BudgetComponent.slug}` + `/personalize/${BudgetComponent.slug}`, ] export interface Props { @@ -51,24 +53,59 @@ export class Wizard extends React.Component { render() { return (
- - - } /> + ( + + )} + /> - - this.onNextButtonPressed(increaseBy, props.history)} /> - } /> - - this.onNextButtonPressed(increaseBy, props.history)} /> - } /> - - this.onNextButtonPressed(increaseBy, props.history)} /> - } /> - - this.onFinish()} /> - } /> + ( + + this.onNextButtonPressed(increaseBy, props.history)} + /> + )} + /> + ( + + this.onNextButtonPressed(increaseBy, props.history)} + /> + )} + /> + ( + + this.onNextButtonPressed(increaseBy, props.history)} + /> + )} + /> + ( + this.onFinish()} /> + )} + /> - {new RegExp("/personalize(/*)$").exec(location.pathname) && } + {new RegExp("/personalize(/*)$").exec(location.pathname) && ( + + )}
) } diff --git a/src/Components/Onboarding/__stories__/Wizard.story.tsx b/src/Components/Onboarding/__stories__/Wizard.story.tsx index cba971ed3c..872b4251ef 100644 --- a/src/Components/Onboarding/__stories__/Wizard.story.tsx +++ b/src/Components/Onboarding/__stories__/Wizard.story.tsx @@ -4,13 +4,12 @@ import React from "react" import { ContextProvider } from "../../Artsy" import { Wizard } from "../Wizard" -storiesOf("Onboarding", module) - .add("Wizard", () => { - return ( -
- - - -
- ) - }) \ No newline at end of file +storiesOf("Onboarding", module).add("Wizard", () => { + return ( +
+ + + +
+ ) +})