From 939c00860ae65231070338b5bc0b09db7af0e149 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Tue, 15 Oct 2019 22:28:44 +0200 Subject: plan selection polishing --- .../planSelection/components/PlanSelection.js | 123 +++++++++++---------- .../containers/PlanSelectionScreen.js | 13 ++- 2 files changed, 77 insertions(+), 59 deletions(-) (limited to 'src/features') diff --git a/src/features/planSelection/components/PlanSelection.js b/src/features/planSelection/components/PlanSelection.js index d26cc08a2..9cd592083 100644 --- a/src/features/planSelection/components/PlanSelection.js +++ b/src/features/planSelection/components/PlanSelection.js @@ -11,6 +11,7 @@ import PlanItem from './PlanItem'; import { i18nPlanName } from '../../../helpers/plan-helpers'; import { PLANS } from '../../../config'; import { FeatureList } from '../../../components/ui/FeatureList'; +import Appear from '../../../components/ui/effects/Appear'; const messages = defineMessages({ welcome: { @@ -132,6 +133,10 @@ const styles = theme => ({ display: 'block', color: `${theme.styleTypes.primary.contrast} !important`, }, + scrollContainer: { + border: '1px solid red', + overflow: 'scroll-x', + }, }); @injectSheet(styles) @observer @@ -166,67 +171,69 @@ class PlanSelection extends Component { const { intl } = this.context; return ( -
-
-
- -
-

{intl.formatMessage(messages.welcome, { name: firstname })}

-

{intl.formatMessage(messages.subheadline)}

-
- stayOnFree()} - simpleCTA - > - - - upgradeAccount(plans.personal.yearly.id)} - > - - - upgradeAccount(plans.personal.yearly.id)} - perUser + +
+
+
+ +
+

{intl.formatMessage(messages.welcome, { name: firstname })}

+

{intl.formatMessage(messages.subheadline)}

+
+ stayOnFree()} + simpleCTA + > + + + upgradeAccount(plans.personal.yearly.id)} + > + + + upgradeAccount(plans.personal.yearly.id)} + perUser + > + + +
+ - - + {intl.formatMessage(messages.fullFeatureList)} +
- - {intl.formatMessage(messages.fullFeatureList)} -
-
+ ); } } diff --git a/src/features/planSelection/containers/PlanSelectionScreen.js b/src/features/planSelection/containers/PlanSelectionScreen.js index b0d9b5ab5..01b357861 100644 --- a/src/features/planSelection/containers/PlanSelectionScreen.js +++ b/src/features/planSelection/containers/PlanSelectionScreen.js @@ -8,7 +8,8 @@ import FeaturesStore from '../../../stores/FeaturesStore'; import UserStore from '../../../stores/UserStore'; import PlanSelection from '../components/PlanSelection'; import ErrorBoundary from '../../../components/util/ErrorBoundary'; -import { planSelectionStore } from '..'; +import { planSelectionStore, GA_CATEGORY_PLAN_SELECTION } from '..'; +import { gaEvent } from '../../../lib/analytics'; const { dialog, app } = remote; @@ -37,6 +38,10 @@ class PlanSelectionScreen extends Component { intl: intlShape, }; + componentDidMount() { + gaEvent(GA_CATEGORY_PLAN_SELECTION, 'show'); + } + upgradeAccount(planId) { const { user, features } = this.props.stores; const { upgradeAccount, hideOverlay } = this.props.actions.planSelection; @@ -83,6 +88,8 @@ class PlanSelectionScreen extends Component { upgradeAccount={(planId) => { if (user.data.hadSubscription) { this.upgradeAccount(planId); + + gaEvent(GA_CATEGORY_PLAN_SELECTION, 'SelectPlan', planId); } else { activateTrial({ planId, @@ -103,11 +110,15 @@ class PlanSelectionScreen extends Component { ], }); + gaEvent(GA_CATEGORY_PLAN_SELECTION, 'SelectPlan', 'Stay on Free'); + if (selection === 0) { downgradeAccount(); hideOverlay(); } else { upgradeAccount(plans.personal.yearly.id); + + gaEvent(GA_CATEGORY_PLAN_SELECTION, 'SelectPlan', 'Revoke'); } }} subscriptionExpired={user.team && user.team.state === 'expired' && !user.team.userHasDowngraded} -- cgit v1.2.3-70-g09d2