-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add support for button styling for ECE buttons #8988
Add support for button styling for ECE buttons #8988
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +471 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
@nikkivias @elizaan36 the screenshots of the different options are in #8951 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have direct control over font sizes, but we can set the base font size for Stripe's elements, so we can probably figure out a way to get the exact font size we want. I'm curious if this should be a separate issue though? Are the font size not different in the PRB implementation? 🤔 If they're different there I'd say this isn't a regression and shouldn't be fixed in this PR. |
I think it fits the scope of #8136. |
Ah yes, I agree!
Yes, that sounds like a nice solution. It'd ensure it scales with the size of the button effortlessly too 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, and the settings are correctly applied to the ECE buttons. Nice work!
There are some design inconsistencies, but they are out of scope for this review and have already been addressed in issue #8951 with the design team, resulting in new issues being created.
Fixes #8951
Changes proposed in this Pull Request
No automated tests because it's hard to make assertions on iframes and their style.
Testing instructions
Important
There's an issue with Storefront that causes the button width to be incorrect. We're still discussing how to address that. In the meantime you can test with Twenty-Twenty Four. See #8951 (comment) for details.
Important
HTTPS is a hard requirement for testing the buttons. They will not be rendered unless you have a valid HTTPS URL to test with. Jurassic tube is recommended for permanent custom URLs.
Setup
_wcpay_wcpay_feature_stripe_ece
to1
:wp option set _wcpay_feature_stripe_ece 1
.Test button sizes
Note
Due to limitations in Stripe's API the maximum height of the buttons is
55px
instead of the56px
suggested by theLarge
option in the settings. We're discussing this in #8951 (comment).Test button theme (i.e. color)
Important
Stripe only supports an
Outline
version of the Google Pay button so both theLight
andOutline
themes will have an outline.Note
You can keep the size the same while doing this test.
Test combinations
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge