Skip to content

Conversation

@miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Oct 3, 2025

All Submissions:

Changes proposed in this Pull Request:

NPPD-485

Related: Automattic/newspack-plugin#4220

Remove the box from single-gateway checkouts:

image image image

How to test the changes in this Pull Request:

  1. Checkout this branch and fix(my-account): new payment method style tweaks newspack-plugin#4220
  2. Make sure you have only Stripe as your payment gateway
  3. Go through the modal checkout flow via a checkout button block
  4. Confirm the card input is now borderless and the gateway title is hidden
  5. Confirm you are able to fill the payment information and complete the checkout
  6. Change your Woo setup to enable Woo Payments in sandbox mode so you have 2 gateways
  7. Go through the checkout flow again and confirm the bordered style is preserved, you can select the different gateways and complete the checkout flow without issues
  8. Deactivate the Stripe gateway and go through the checkout again
  9. Confirm the Woo Payments gateway renders well in the new borderless stytle

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@miguelpeixe miguelpeixe marked this pull request as ready for review October 3, 2025 17:00
@miguelpeixe miguelpeixe requested a review from a team as a code owner October 3, 2025 17:00
@miguelpeixe miguelpeixe self-assigned this Oct 3, 2025
@thomasguillot
Copy link
Contributor

@miguelpeixe Thank you for the PR. I made some tiny tweaks here and there, mainly regarding font-size/line-height and margins.

Couple of questions:

  • Is it possible to add a "Cancel" ghost button for the change payment method modal?
  • The "Back" buttons flow are strange.
    • For the Change Subscription, I'd expect to go back to the Subscription selection screen, not my Billing details.
    • For the Renew now, it doesn't make sense to be able to go back as well. Why would anyone change their billing details like this? I'd expect a Close button instead.
Screenshot 2025-10-06 at 17 01 21@2x
Screenshot.2025-10-06.at.17.04.06.mp4

@miguelpeixe
Copy link
Member Author

Is it possible to add a "Cancel" ghost button for the change payment method modal?

Added in e255b67. Because the page refreshes on modal close, the most straightforward way to implement this is to link it back to the subscription page.

The "Back" buttons flow are strange.
For the Change Subscription, I'd expect to go back to the Subscription selection screen, not my Billing details.
For the Renew now, it doesn't make sense to be able to go back as well. Why would anyone change their billing details like this? I'd expect a Close button instead.

That's inheriting the standard 2-step modal checkout behavior. Would it be better if we changed the button label to "Edit billing information" rather than back? Perhaps accompanied by a "Cancel" or"Close" as well?

@thomasguillot
Copy link
Contributor

thomasguillot commented Oct 7, 2025

That's inheriting the standard 2-step modal checkout behavior. Would it be better if we changed the button label to "Edit billing information" rather than back? Perhaps accompanied by a "Cancel" or"Close" as well?

Yes, wfm, thank you @miguelpeixe (cancel for consistency)

@miguelpeixe
Copy link
Member Author

Implemented in 5010817. I changed the Edit billing information button to secondary instead of ghost. Let me know if both Edit billing and Cancel should be ghost:

image

@thomasguillot
Copy link
Contributor

This is perfect @miguelpeixe

@thomasguillot
Copy link
Contributor

2 more small issues I noticed:

Screenshot 2025-10-07 at 20 06 03@2x

This is if I edit my billing details, the "Cancel" button shouldn't have a margin-bottom.

Screenshot 2025-10-07 at 20 06 30@2x

And there's a similar issue here.

@miguelpeixe
Copy link
Member Author

Good catch! Fixed in eddf6de

@thomasguillot
Copy link
Contributor

Thank you @miguelpeixe!

@miguelpeixe miguelpeixe merged commit 3c0014a into trunk Oct 17, 2025
9 checks passed
@miguelpeixe miguelpeixe deleted the fix/modal-checkout-card-input-style-tweaks branch October 17, 2025 12:47
@github-actions
Copy link

Hey @miguelpeixe, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Oct 17, 2025
# [4.17.0-alpha.1](v4.16.0...v4.17.0-alpha.1) (2025-10-17)

### Bug Fixes

* correct RTL styles for the Content Loop ([#2215](#2215)) ([a8e2f42](a8e2f42))
* ga4 events for tiered modal ([#2218](#2218)) ([a08981d](a08981d))
* handle invalid file errors when processing archive ([#2221](#2221)) ([2ba3d26](2ba3d26))
* **modal-checkout:** style improvements to single-gateway ([#2223](#2223)) ([3c0014a](3c0014a))

### Features

* add newspack-colors and newspack-icons packages ([#2222](#2222)) ([f6bdf20](f6bdf20))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.17.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Oct 30, 2025
# [4.17.0](v4.16.1...v4.17.0) (2025-10-30)

### Bug Fixes

* correct RTL styles for the Content Loop ([#2215](#2215)) ([a8e2f42](a8e2f42))
* ga4 events for tiered modal ([#2218](#2218)) ([a08981d](a08981d))
* handle invalid file errors when processing archive ([#2221](#2221)) ([2ba3d26](2ba3d26))
* **modal-checkout:** skip newsletter signup on subscription switch ([#2235](#2235)) ([e6feccc](e6feccc))
* **modal-checkout:** style improvements to single-gateway ([#2223](#2223)) ([3c0014a](3c0014a))

### Features

* add newspack-colors and newspack-icons packages ([#2222](#2222)) ([f6bdf20](f6bdf20))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

5 participants