From 897acaec89ef00a845c7ddcb406e21089d468fe9 Mon Sep 17 00:00:00 2001 From: Dan Hauk Date: Mon, 15 Feb 2016 13:11:13 -0500 Subject: [PATCH 1/5] only show list items we don't want to remove as part of the test --- client/components/plans/plan/index.jsx | 16 +++++++++------- client/lib/abtest/active-tests.js | 7 ++++--- client/lib/features-list/test-features.js | 6 ++++-- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/client/components/plans/plan/index.jsx b/client/components/plans/plan/index.jsx index 2d41286408ffd..d1ed59906d7e5 100644 --- a/client/components/plans/plan/index.jsx +++ b/client/components/plans/plan/index.jsx @@ -83,12 +83,14 @@ module.exports = React.createClass( { 'is-plan-specific': feature.planSpecific } ); - return ( -
  • - - { feature.text } -
  • - ); + if ( abtest( 'plansFeatureList' ) !== 'andMore' || !feature.testVariable ) { + return ( +
  • + + { feature.text } +
  • + ); + } } ); return ; @@ -226,7 +228,7 @@ module.exports = React.createClass( { }, render: function() { - var shouldDisplayFeatureList = this.props.plan && ! isJetpackPlan( this.props.plan ) && abtest( 'plansFeatureList' ) === 'list'; + var shouldDisplayFeatureList = this.props.plan && ! isJetpackPlan( this.props.plan ) && abtest( 'plansFeatureList' ) !== 'description'; return ( { this.getPlanDiscountMessage() } diff --git a/client/lib/abtest/active-tests.js b/client/lib/abtest/active-tests.js index 3de4471507228..b1ed24b2dbef6 100644 --- a/client/lib/abtest/active-tests.js +++ b/client/lib/abtest/active-tests.js @@ -57,10 +57,11 @@ module.exports = { defaultVariation: 'original' }, plansFeatureList: { - datestamp: '20040202', + datestamp: '20040214', variations: { - list: 50, - description: 50 + list: 33, + andMore: 33, + description: 34 }, defaultVariation: 'description' }, diff --git a/client/lib/features-list/test-features.js b/client/lib/features-list/test-features.js index 71401377d83b3..f6d54881d6e58 100644 --- a/client/lib/features-list/test-features.js +++ b/client/lib/features-list/test-features.js @@ -75,7 +75,8 @@ const features = { }, { text: 'eCommerce', - planSpecific: true + planSpecific: true, + testVariable: true }, { text: 'Unlimited Premium Themes', @@ -83,7 +84,8 @@ const features = { }, { text: 'Google Analytics', - planSpecific: true + planSpecific: true, + testVariable: true }, { text: 'Live Chat Support', From 1d99358cc70008e3326bcdc64eacc2415e317197 Mon Sep 17 00:00:00 2001 From: Brie Anne Demkiw Date: Mon, 15 Feb 2016 11:27:50 -0800 Subject: [PATCH 2/5] Plans: Show more link on plans feature list variation a/b test. --- client/components/plans/plan/index.jsx | 50 ++++++++++++++++++-------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/client/components/plans/plan/index.jsx b/client/components/plans/plan/index.jsx index d1ed59906d7e5..e95215263d4b6 100644 --- a/client/components/plans/plan/index.jsx +++ b/client/components/plans/plan/index.jsx @@ -40,8 +40,14 @@ module.exports = React.createClass( { } }, + getComparePlansUrl: function() { + const { site } = this.props; + var siteSuffix = site ? site.slug : ''; + + return this.props.comparePlansUrl ? this.props.comparePlansUrl : '/plans/compare/' + siteSuffix; + }, + getDescription: function() { - var comparePlansUrl, siteSuffix; const { plan, site } = this.props; if ( this.isPlaceholder() ) { @@ -54,9 +60,6 @@ module.exports = React.createClass( { ); } - siteSuffix = site ? site.slug : ''; - comparePlansUrl = this.props.comparePlansUrl ? this.props.comparePlansUrl : '/plans/compare/' + siteSuffix; - if ( site && site.jetpack ) { return ( @@ -65,14 +68,16 @@ module.exports = React.createClass( { return ( ); }, getFeatureList: function() { - var features; + var features, + showMoreLink = false, + moreLink = ''; if ( this.isPlaceholder() ) { return; @@ -83,17 +88,34 @@ module.exports = React.createClass( { 'is-plan-specific': feature.planSpecific } ); - if ( abtest( 'plansFeatureList' ) !== 'andMore' || !feature.testVariable ) { - return ( -
  • - - { feature.text } -
  • - ); + if ( abtest( 'plansFeatureList' ) === 'andMore' && feature.testVariable ) { + showMoreLink = true; + return null; } + + return ( +
  • + + { feature.text } +
  • + ); } ); - return
      { features }
    ; + if ( showMoreLink ) { + moreLink = ( +
  • + + And more +
  • + ); + } + + return ( +
      + { features } + { moreLink } +
    + ); }, showDetails: function() { From 672b844535a70f3c5799c6bd015527d429f3de0c Mon Sep 17 00:00:00 2001 From: Brie Anne Demkiw Date: Mon, 15 Feb 2016 11:30:12 -0800 Subject: [PATCH 3/5] Plans: Update start date for plans feature list a/b test. --- client/lib/abtest/active-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/lib/abtest/active-tests.js b/client/lib/abtest/active-tests.js index b1ed24b2dbef6..38900a5bd09ff 100644 --- a/client/lib/abtest/active-tests.js +++ b/client/lib/abtest/active-tests.js @@ -57,7 +57,7 @@ module.exports = { defaultVariation: 'original' }, plansFeatureList: { - datestamp: '20040214', + datestamp: '20160215', variations: { list: 33, andMore: 33, From ebf531865afef0f2fcd227f8e49845b3e3b701a4 Mon Sep 17 00:00:00 2001 From: Brie Anne Demkiw Date: Mon, 15 Feb 2016 15:29:47 -0800 Subject: [PATCH 4/5] Plans: Don't use ES6 syntax. --- client/components/plans/plan/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/plans/plan/index.jsx b/client/components/plans/plan/index.jsx index e95215263d4b6..616b81d57314e 100644 --- a/client/components/plans/plan/index.jsx +++ b/client/components/plans/plan/index.jsx @@ -41,8 +41,8 @@ module.exports = React.createClass( { }, getComparePlansUrl: function() { - const { site } = this.props; - var siteSuffix = site ? site.slug : ''; + var site = this.props.site, + siteSuffix = site ? site.slug : ''; return this.props.comparePlansUrl ? this.props.comparePlansUrl : '/plans/compare/' + siteSuffix; }, From b9d47119eb730c916759ac9c3a0cf39677e549fc Mon Sep 17 00:00:00 2001 From: Brie Anne Demkiw Date: Mon, 15 Feb 2016 15:39:54 -0800 Subject: [PATCH 5/5] Plans: Use isBusiness() check to clean up logic. --- client/components/plans/plan/index.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/components/plans/plan/index.jsx b/client/components/plans/plan/index.jsx index 616b81d57314e..36b88bf5028af 100644 --- a/client/components/plans/plan/index.jsx +++ b/client/components/plans/plan/index.jsx @@ -19,7 +19,9 @@ var abtest = require( 'lib/abtest' ).abtest, PlanPrice = require( 'components/plans/plan-price' ), PlanDiscountMessage = require( 'components/plans/plan-discount-message' ), Card = require( 'components/card' ), - WpcomPlanDetails = require( 'my-sites/plans/wpcom-plan-details' ); + WpcomPlanDetails = require( 'my-sites/plans/wpcom-plan-details' ), + productsValues = require( 'lib/products-values' ), + isBusiness = productsValues.isBusiness; module.exports = React.createClass( { displayName: 'Plan', @@ -76,7 +78,6 @@ module.exports = React.createClass( { getFeatureList: function() { var features, - showMoreLink = false, moreLink = ''; if ( this.isPlaceholder() ) { @@ -89,7 +90,6 @@ module.exports = React.createClass( { } ); if ( abtest( 'plansFeatureList' ) === 'andMore' && feature.testVariable ) { - showMoreLink = true; return null; } @@ -101,7 +101,7 @@ module.exports = React.createClass( { ); } ); - if ( showMoreLink ) { + if ( abtest( 'plansFeatureList' ) === 'andMore' && isBusiness( this.props.plan ) ) { moreLink = (