Skip to content

Purchase > Payment Methods: Clean up styles payment details grid #101757

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

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

jjchrisdiehl
Copy link
Contributor

While adding the Business Card badge to the Payment Methods section, I saw an opportunity to clean up the styling for these payment method rows. Over time, the scss became a bit messy and there was a number of UI bugs that this PR aims to fix.

Proposed Changes

Before

375px 768 1440
image image image

After

375px 768 1440
image image image

Primary changes

  • Period removed from "Use as backup." checkbox label
  • Reversed position of card name and card number/expiry - I believe this reads better, especially if customers are providing a human readable name for their cards
  • Corrected grid spacing when collapsing from desktop rows to mobile columns - before the right column on desktop would awkwardly collapse interspersed between the left columns rows. There was also so strange text alignment behavior. Now it all collapses succinctly
  • Removed usage of non-logical spaced margins in favor of flexbox gaps - this creates a more even spacing across languages and devices
  • Added a mixin to properly space items while preserving the empty logo column and resetting spacing as needed
  • Replaced any hardcoded colors or font-sizes with their theme based sass variable

Testing Instructions

  • Go to Purchases > Payment Methods
  • Click on all clickable surfaces, ensure they still work as expected
  • Resize the window and ensure the columns and rows collapse correctly and that all elements are accessible to clicks and taps

@jjchrisdiehl jjchrisdiehl requested a review from a team as a code owner March 23, 2025 21:47
@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 Mar 23, 2025
Copy link

github-actions bot commented Mar 23, 2025

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Mar 23, 2025

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

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

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/payment-method-section-styles on your sandbox.

Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

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

This looks good to me! One caveat about removing the period but otherwise good to go.

@sirbrillig sirbrillig added [Status] Reviewer Approved and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Mar 26, 2025
@jjchrisdiehl jjchrisdiehl force-pushed the update/payment-method-section-styles branch from 22fb215 to 2f9df53 Compare March 31, 2025 21:23
@jjchrisdiehl jjchrisdiehl added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Mar 31, 2025
@a8ci18n
Copy link

a8ci18n commented Mar 31, 2025

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

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

@a8ci18n
Copy link

a8ci18n commented Apr 1, 2025

Translation for this Pull Request has now been finished.

@jjchrisdiehl jjchrisdiehl force-pushed the update/payment-method-section-styles branch from 2f9df53 to a798a46 Compare April 1, 2025 21:01
@sirbrillig sirbrillig merged commit 557b7d5 into trunk Apr 18, 2025
13 checks passed
@sirbrillig sirbrillig deleted the update/payment-method-section-styles branch April 18, 2025 15:17
@github-actions github-actions bot removed the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants