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: Layout and text changes for Jetpack sites #2629

Merged
merged 3 commits into from
Feb 2, 2016

Conversation

richardmuscat
Copy link
Contributor

We're trying a different approach with presenting plans for .org sites including: hiding the "Free" tier, showing the savings over buying individual plugins (VaultPress, Akismet, and PollDaddy), and updating the text descriptions of the plans themselves as well as the feature detail.

Screenshots of what the final result should look like:

Plan selection page:

plans-3

Plan comparison page:

plans-2

@richardmuscat richardmuscat added Jetpack [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. .org Plans labels Jan 20, 2016
@richardmuscat
Copy link
Contributor Author

@scruffian -- is this something that you can help review or help me work out who can do so?

{ hasDiscount ? this.translate( 'for first year' ) : plan.bill_period_label } (
{ plan.saving }
% { this.translate( 'savings' ) })
</small>
Copy link
Contributor

Choose a reason for hiding this comment

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

there's some weird indentation inside this if, looks like it is using spaces instead of tabs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in df86daa

@lezama
Copy link
Contributor

lezama commented Jan 20, 2016

@richardmuscat great job for a first Calypso PR!

@@ -221,6 +221,12 @@ var PlansCompare = React.createClass( {
},

render: function() {
var compareString = 'Compare Plans';
Copy link
Member

Choose a reason for hiding this comment

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

This should probably still be translated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed: 84f7916

@scruffian
Copy link
Member

I am not sure if this approach is the tidiest way to achieve this. This introduces a lot of branching in different components based on whether or not the site is a jetpack site. It might be better to branch higher in the code, and then create specific components for Jetpack sites. Let me know if you want me to explain this idea in more detail, or if you think it's not going to work :)

</small>
</div>
);
if ( site && site.jetpack ) {
Copy link
Member

Choose a reason for hiding this comment

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

What about creating a new component specifically for Jetpack plan prices? That way we don't need this big if/else.

@richardmuscat richardmuscat added [Status] In Progress [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. and removed .org Plans labels Jan 27, 2016
@@ -221,6 +226,12 @@ var PlansCompare = React.createClass( {
},

render: function() {
var compareString = this.translate( 'Compare Plans' );

if ( this.props.selectedSite.jetpack ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should check if this.props.selectedSite is defined: this.props.selectedSite && this.props.selectedSite.jetpack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: 422d90b

@lezama
Copy link
Contributor

lezama commented Jan 27, 2016

@richardmuscat: code looks good to me, what's the best way to test this?

It would be good to squash all those commits 😊

@richardmuscat
Copy link
Contributor Author

To test, visit calypso/plans/jetpack-site and you should see the plans
shown as in the screenshot above (ie only two plans, no image, crossed out
price, etc)

Also test a wpcom site (ie not Jetpack) to make sure nothing changed there.

@richardmuscat
Copy link
Contributor Author

@lezama:

  • What do you mean by squashing commits? :-)
  • See comment above about testing

@lezama
Copy link
Contributor

lezama commented Jan 27, 2016

What do you mean by squashing commits? :-)

Git allows you to squash multiple commits into one. It is seen as a good practice in Calypso to squash small commits like "fixing a typo" to the commit(if it is part of the PR) that introduced the typo.

https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History

We can screenshare and I can show you how to!

See comment above about testing

👍

@@ -1,32 +1,46 @@
.plan-header .plan-price {
.plan-header .plan-price,
Copy link
Member

Choose a reason for hiding this comment

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

Duplicating classes like this will make the CSS really bloated. Can we use a mixin instead?

Copy link
Member

Choose a reason for hiding this comment

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

We spoke about this and it seems like this approach is the simplest one for now. Trying to avoid premature optimization :)

@richardmuscat richardmuscat force-pushed the update/jetpack-plans-text branch 2 times, most recently from 0d2ac37 to 9c270eb Compare February 1, 2016 16:07
@scruffian
Copy link
Member

When testing I noticed that the placeholders on the plans page and the comparison page have three columns, but this layout only has two columns.

Other than that LGTM 👍

@scruffian scruffian 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 Feb 1, 2016
@richardmuscat richardmuscat force-pushed the update/jetpack-plans-text branch from 9c270eb to cea05ea Compare February 2, 2016 09:36
richardmuscat added a commit that referenced this pull request Feb 2, 2016
Plans: Layout and text changes for Jetpack sites
@richardmuscat richardmuscat merged commit b7d1dc8 into master Feb 2, 2016
@richardmuscat richardmuscat deleted the update/jetpack-plans-text branch February 2, 2016 13:04
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. Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants