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

feat: add styles to fix braintree modal appearance #2036

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Jan 27, 2025

All Submissions:

Changes proposed in this Pull Request:

This PR tidies up the appearance of the Braintree Credit Card form; related PR: Automattic/newspack-plugin#3692 is merged.

How to test the changes in this Pull Request:

  1. Set up your site to use Braintree Braintree Credit Card as a payment processor.
  2. Either temporarily add braintree_credit_card to the $supported_gateways array in includes/class-modal-checkout.php, or add this code to a mini-plugin:
add_filter(
	'newspack_blocks_modal_checkout_supported_gateways',
	function( $gateways ) {
		if ( ! in_array( 'braintree_credit_card', $gateways, true ) ) {
			$gateways[] = 'braintree_credit_card';
		}
		return $gateways;
	}
);
  1. Run through a test checkout and note the appearance of the Braintree credit card option, both when opened and closed:

CleanShot 2025-02-19 at 09 47 51

CleanShot 2025-02-19 at 09 47 33

  1. Apply this PR and run npm run build.
  2. Repeat the checkout, and confirm the Braintree credit card form looks closer to Stripe:

CleanShot 2025-02-19 at 09 55 05

CleanShot 2025-02-19 at 09 55 18

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?

@laurelfulford laurelfulford marked this pull request as ready for review February 19, 2025 17:56
@laurelfulford laurelfulford requested a review from a team as a code owner February 19, 2025 17:56
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

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

Looks much cleaner!

@laurelfulford
Copy link
Contributor Author

Thanks @dkoo! 🙌

@laurelfulford laurelfulford merged commit 9ab2c62 into trunk Feb 19, 2025
9 checks passed
@laurelfulford laurelfulford deleted the feat/add-braintree-styles branch February 19, 2025 18:23
Copy link

Hey @laurelfulford, 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 Feb 20, 2025
# [4.7.0-alpha.1](v4.6.0...v4.7.0-alpha.1) (2025-02-20)

### Bug Fixes

* **carousel:** avoid editor crash on empty ([#2058](#2058)) ([c316801](c316801))
* **modal-checkout:** better iframe sizing ([#2052](#2052)) ([aa308f2](aa308f2))
* **recaptcha:** use clone of #place_order button to trigger checkout ([#2028](#2028)) ([46eb8b5](46eb8b5)), closes [#2030](#2030) [#2030](#2030)

### Features

* add styles to fix Braintree modal appearance ([#2036](#2036)) ([9ab2c62](9ab2c62))
* add toggle for transaction details ([#2049](#2049)) ([d254aca](d254aca))
* **carousel:** rename block and reorganise settings ([#1962](#1962)) ([9905717](9905717))
* update blocks with new brand ([#2050](#2050)) ([2711302](2711302))
@matticbot
Copy link
Contributor

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

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.

3 participants