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

Fix payment method logo spacing #94159

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

jjchrisdiehl
Copy link
Contributor

@jjchrisdiehl jjchrisdiehl commented Sep 3, 2024

This is a follow up to the cobadge work. It looks like we serve the payment-method-logos from two places, wpcom-checkout and my-sites/checkout. Because of this, we have two similar PaymentMethodLogos wrapper components that apply styling to the payment methods found in Checkout and the Add Payment Method sections.

While one had styling to set the PaymentLogo svg to inline-block, the other had set the svg styling to block which caused the logos to become left align.

Before After
image image

Related to #94123

Proposed Changes

  • Update the svg display property in both styled components to inline-block
  • Additional changes: updated missing translation functions on some of the payment logo labels

Testing Instructions

  • Open up a Calypso.live link below and go to Checkout
  • Ensure you have Google or Apple Pay set up
  • Check that the payment logos for these methods are right aligned like the existing credit card methods

@jjchrisdiehl jjchrisdiehl requested a review from a team as a code owner September 3, 2024 22:04
@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 Sep 3, 2024
@jjchrisdiehl jjchrisdiehl self-assigned this Sep 3, 2024
@matticbot
Copy link
Contributor

matticbot commented Sep 3, 2024

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

Sections (~34 bytes removed 📉 [gzipped])

name                          parsed_size           gzip_size
site-purchases                      -41 B  (-0.0%)      -20 B  (-0.0%)
purchases                           -41 B  (-0.0%)      -20 B  (-0.0%)
checkout                            -41 B  (-0.0%)      -18 B  (-0.0%)
jetpack-cloud-partner-portal        -17 B  (-0.0%)       -4 B  (-0.0%)
a8c-for-agencies-purchases          -17 B  (-0.0%)       -4 B  (-0.0%)
a8c-for-agencies-client             -17 B  (-0.0%)       -4 B  (-0.0%)

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

Async-loaded Components (~18 bytes removed 📉 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-calypso-my-sites-checkout-modal                                              -41 B  (-0.0%)      -18 B  (-0.0%)
async-load-calypso-blocks-editor-checkout-modal                                         -41 B  (-0.0%)      -18 B  (-0.0%)
async-load-signup-steps-page-picker                                                     -17 B  (-0.0%)       -4 B  (-0.0%)
async-load-purchase-modal-wrapper                                                       -17 B  (-0.0%)       -4 B  (-0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...        -17 B  (-0.0%)       -4 B  (-0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

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.

@jjchrisdiehl jjchrisdiehl force-pushed the fix/styling-of-payment-method-selectors branch from 993c121 to dbf876f Compare September 3, 2024 23:10
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/styling-of-payment-method-selectors on your sandbox.

@jjchrisdiehl
Copy link
Contributor Author

Functionally tests well:

image

@jjchrisdiehl jjchrisdiehl merged commit 04ba30b into trunk Sep 4, 2024
11 checks passed
@jjchrisdiehl jjchrisdiehl deleted the fix/styling-of-payment-method-selectors branch September 4, 2024 02:29
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 4, 2024
@michaeldcain michaeldcain added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Payment Methods labels Sep 4, 2024
@sirbrillig
Copy link
Member

Confirmed that this fixes the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Payment Methods [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants