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 plan features to Plan Overview page #1565

Merged
merged 21 commits into from
Dec 18, 2015

Conversation

stephanethomas
Copy link
Contributor

This pull request addresses part of #1151 by adding a list of plan features at the bottom of the Plan Overview page. It also displays a nudge to upgrade to Business when the current plan on trial is Premium:

screenshot

Testing instructions

  1. Run git checkout add/plan-overview-features and start your server
  2. Get a new test account and blog
  3. Enable your sandbox and proxy
  4. Select a plan by clicking the Start Free Trial button on the Plans page
  5. Click the Start 14 Day Free Trial button on the Secure Payment page
  6. Check that the purchase was successful
  7. Navigate back to the Plans page which should now display the Plan Overview variant
  8. Check that all buttons as well as the upgrade link work fine

Reviews

  • Code
  • Product

@stephanethomas stephanethomas 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. Free Trials labels Dec 14, 2015
@stephanethomas stephanethomas self-assigned this Dec 14, 2015
@stephanethomas stephanethomas added this to the No-cc Free Trials: v1 milestone Dec 14, 2015
@@ -86,3 +88,17 @@
.plan-status__time-until-expiry {
font-weight: 700;
}

.plan-features__feature-description {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this CSS live in the same directory as PlanFeatures?

@scruffian scruffian 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 Dec 16, 2015
@scruffian
Copy link
Member

Only some of these features are available in WordPress.com Premium, so we need to show/hide features based on the plan the user is in.

@scruffian
Copy link
Member

There are a couple of strange display features here when the window is just over 660px wide:
screenshot 2015-12-16 13 37 19

  1. The purchase now button overlaps the edge of the screen
  2. The plan features boxes look strange when so narrow, with the button on the right; it would be nice if they were the same as on mobile at this resolution.

@scruffian
Copy link
Member

I don't think we can offer an upsell from a Premium Trial to a Business Trial; the user has to buy Business in this case.

@scruffian
Copy link
Member

Only some of these features are available in WordPress.com Premium, so we need to show/hide features based on the plan the user is in.

Done in cf7c244.

@scruffian scruffian 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 Dec 16, 2015
@@ -0,0 +1,27 @@
@mixin plan-overview-button {
Copy link
Contributor

Choose a reason for hiding this comment

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

@scruffian it looks like we should use @extend for mixins that don't accept an argument (docs).

Copy link
Contributor

Choose a reason for hiding this comment

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

After giving his some more thought, I think sharing this style using classes is preferable to either a mixin or extend:

.plan-overview {
  .plan-feature__button,
  .plan-status__button {
    flex-shrink: 0;
    margin-left: 15px;
    min-width: 150px;
    text-align: center;

    @include breakpoint( "<480px" ) {
        margin: 15px 0 0 0;
        width: 100%;
    }
  }
}

Rationale:

  • This is easier to grok than a mixin/extend. Defining the styles for %plan-overview-button in the PlanOverview stylesheet and including them with @extend elsewhere makes it difficult to know where the styles are used.
  • This probably results in a smaller CSS bundle.

Copy link
Member

Choose a reason for hiding this comment

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

This approach makes sense too, but I didn't like the idea of having rules for one component live inside another. I wonder what @mtias thinks...

@drewblaisdell drewblaisdell 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 Dec 16, 2015
@include plan-overview-row();
}

.plan-features__feature-button {
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 update the names here to match the component name, e.g. .plan-feature__button

@drewblaisdell drewblaisdell force-pushed the add/plan-overview-features branch 2 times, most recently from 78b0d4e to 181327e Compare December 16, 2015 22:10
stephanethomas and others added 19 commits December 18, 2015 15:34
These features don't have calls to action.
This makes sure we're using them consistently.
…add a left margin to create space between the button and the text
…mponent files targetting their respective components, and keep the code DRY
… make it obvious that this is a simple component
@stephanethomas
Copy link
Contributor Author

I've made a few small adjustments and rebased against master. This is ready to go.

stephanethomas added a commit that referenced this pull request Dec 18, 2015
Plans: Add plan features to Plan Overview page
@stephanethomas stephanethomas merged commit 4896717 into master Dec 18, 2015
@stephanethomas stephanethomas deleted the add/plan-overview-features branch December 18, 2015 15:44
{ button &&
<Button
className="plan-feature__button"
href={ button.href }
Copy link
Member

Choose a reason for hiding this comment

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

Talking a bit with @breezyskies... can we try a compact button here? I think it'd work a bit better in terms of weight.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to loop back, PR started in #1820 for this.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants