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: Update styling for Jetpack CRM card to match other product cards #57553

Merged
merged 15 commits into from
Nov 8, 2021

Conversation

mattgawarecki
Copy link
Contributor

Resolves 1200412004370260-as-1201272180272104.
Relates to #57362.

Changes proposed in this Pull Request

  • Split the JetpackCrmFreeCard component into two versions: one with, and one without, the price display.
  • Add styling rules for the new displayed-price version of the CRM Free card to match other product cards.
  • Add support for easier custom styling on the JetpackProductCard component.
  • Add a property for abovePriceText on the JetpackProductCard component.
  • Add support for the hideSavingLabel prop on free product price displays.

Testing instructions

NOTE: Please test this PR in both Calypso Blue and Calypso Green, for both wide and narrow screen layouts.

  1. Visit the pricing page in any non-production environment.
  2. Verify the product grid still renders correctly and flows naturally as the screen resizes.
  3. Verify the Jetpack CRM Free card still shows up to the right of the VideoPress product card, and that its styles match the other product cards.
  4. Verify the Jetpack CRM Free card's price display and copy are aligned appropriately compared to other product cards.

Reference screenshots

Screen Shot 2021-11-01 at 15 02 55 Screen Shot 2021-11-01 at 15 03 12

Screen Shot 2021-11-01 at 15 10 43 Screen Shot 2021-11-01 at 15 03 31

@mattgawarecki mattgawarecki added [Type] Enhancement [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. [Size] S Small sized issue labels Nov 2, 2021
@mattgawarecki mattgawarecki requested review from a team November 2, 2021 15:16
@mattgawarecki mattgawarecki self-assigned this Nov 2, 2021
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 2, 2021
@github-actions
Copy link

github-actions bot commented Nov 2, 2021

@matticbot
Copy link
Contributor

matticbot commented Nov 2, 2021

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~395 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
plans                      +1902 B  (+0.3%)     +395 B  (+0.2%)
jetpack-connect            +1902 B  (+0.3%)     +395 B  (+0.2%)
jetpack-cloud-pricing      +1902 B  (+0.6%)     +395 B  (+0.4%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@mattgawarecki mattgawarecki added the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Nov 2, 2021
@github-actions github-actions bot added the [Status] Design Input Requested Label automatically added to PRs where design feedback is requested label Nov 2, 2021
Copy link
Contributor

@monsieur-z monsieur-z left a comment

Choose a reason for hiding this comment

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

Card and code look good.

As for the grid, the Jetpack Free card doesn't take the full height at medium size viewport:
Screen Shot 2021-11-03 at 8 36 30 AM

@mattgawarecki
Copy link
Contributor Author

As for the grid, the Jetpack Free card doesn't take the full height at medium size viewport: Screen Shot 2021-11-03 at 8 36 30 AM

@jeffgolenski I wonder what we can do to address this so that the Free card doesn't look wonky next to other cards. I tried stretching the card out vertically in the screenshot below, but as you can see, the buttons don't line up. Should Free also have a "Start for Free" price display to match CRM Free?

image

Copy link
Contributor

@monsieur-z monsieur-z left a comment

Choose a reason for hiding this comment

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

It now looks good on medium viewport, but the Free card is not arranged in 2 columns on wider screens anymore.
Screen Shot 2021-11-04 at 9 08 29 AM

@jeffgolenski
Copy link
Member

jeffgolenski commented Nov 4, 2021

@mattgawarecki Here's a really quick mock. During that middle breakpoint when the 2 columns looks like this...

Screen Shot 2021-11-04 at 1 20 59 PM

Can you make CRM and Jetpack Free both span 100% and stack like this? (keep all the same styles that currently exist, just change the structure)

Screen Shot 2021-11-04 at 1 42 07 PM

When the small mobile breakpoint kicks in, we'll keep it exactly as you have it now.

@mattgawarecki mattgawarecki force-pushed the fix/realtime-crm-free-card-styling branch from df7c881 to 977ea6d Compare November 5, 2021 19:11
@mattgawarecki
Copy link
Contributor Author

mattgawarecki commented Nov 5, 2021

@jeffgolenski Okie dokie, it took a hot minute but I think I've got it! I updated the PR so you can see the changes live as well, but here are some screenshots:

Calypso Green

Screen Shot 2021-11-05 at 13 30 51 Screen Shot 2021-11-05 at 13 30 33 Screen Shot 2021-11-05 at 13 30 09

Calypso Blue

Screen Shot 2021-11-05 at 13 35 25 Screen Shot 2021-11-05 at 13 35 40

@jeffgolenski
Copy link
Member

@mattgawarecki Just gave it a go! Looks good on every viewport! Ship it!

Copy link
Contributor

@monsieur-z monsieur-z left a comment

Choose a reason for hiding this comment

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

LGTM!

@mattgawarecki mattgawarecki merged commit edf3037 into trunk Nov 8, 2021
@mattgawarecki mattgawarecki deleted the fix/realtime-crm-free-card-styling branch November 8, 2021 15:47
@github-actions github-actions bot removed [Status] Design Input Requested Label automatically added to PRs where design feedback is requested [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR labels Nov 8, 2021
@a8ci18n
Copy link

a8ci18n commented Nov 8, 2021

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/6950343

Thank you @mattgawarecki for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Nov 19, 2021

Translation for this Pull Request has now been finished.

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. [Size] S Small sized issue [Type] Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants