Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plans: Add a/b test with 'upgrade' button in the sidebar #2453

Merged
merged 1 commit into from
Jan 18, 2016

Conversation

drewblaisdell
Copy link
Contributor

Fixes #2382.

This adds an a/b test to change the label in the sidebar next to 'Plans' from 'Free' to a button with the label 'Upgrade'.

original variation:
screen shot 2016-01-14 at 3 44 25 pm

button variation:
screen shot 2016-01-14 at 3 43 49 pm

I'll update the datestamp for this test before merging to the current day.

Testing
original:

  • Run localStorage.setItem( 'ABTests', '{"plansUpgradeButton_20040114":"original"}' ); in the console.
  • Visit /stats/year/:site (or any 'My Sites' route) for a site with the free plan.
  • Assert that you see the 'Free' label next to 'Plans' in the sidebar.

original:

  • Run localStorage.setItem( 'ABTests', '{"plansUpgradeButton_20040114":"button"}' ); in the console.
  • Visit /stats/year/:site (or any 'My Sites' route) for a site with the free plan.
  • Assert that you see the 'Upgrade' button next to 'Plans' in the sidebar.
  • Product review
  • Code review

cc @breezyskies

@drewblaisdell drewblaisdell added [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Task labels Jan 14, 2016
@drewblaisdell drewblaisdell self-assigned this Jan 14, 2016
planName = 'Upgrade'; // TODO: translate this string if the test is removed
} else {
labelClass = 'plan-name';
}

if ( productsValues.isFreeTrial( site.plan ) ) {
planName = this.translate( 'Trial' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noted that on my todo list but since you're updating this file could you add more context to this translation? I guess just explaining it's for free trials for plans would really help translators to deliver a more accurate translation.

@stephanethomas
Copy link
Contributor

A quick note that Upgrade might be translated in longer strings in some languages (for example it would be Mettre à jour in French). I know the test will run only for English users but that's something we should probably keep in mind, considering we don't have much room in this sidebar.

@stephanethomas stephanethomas added [Status] Needs Author Reply and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 15, 2016
@breezyskies
Copy link
Contributor

Tested and works as described. 👍

A quick note that Upgrade might be translated in longer strings in some languages (for example it would be Mettre à jour in French). I know the test will run only for English users but that's something we should probably keep in mind, considering we don't have much room in this sidebar.

Definitely something to keep an eye on. I will note that it does appear to handle this pretty well right now and (while still not being ideal) at least doesn't break the layout:

screen shot 2016-01-15 at 7 11 26 am

@drewblaisdell drewblaisdell added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Author Reply labels Jan 15, 2016
@drewblaisdell
Copy link
Contributor Author

Thanks for looking at this, @breezyskies and @stephanethomas. I updated the commit to add context to the 'Trial' translation string and made the logic for using the button a bit more clear.

@stephanethomas
Copy link
Contributor

Code looks good. We're good to go here.

@stephanethomas stephanethomas added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jan 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. [Type] Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants