-
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
Ensure ‘Proceed to Checkout’ Button Does Not Collapse Through WooPay Direct Checkout Flow #9172
Ensure ‘Proceed to Checkout’ Button Does Not Collapse Through WooPay Direct Checkout Flow #9172
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: +111 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
…-collapsing-in-dc
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.
Tests well on Tsubaki, Twenty-Twenty Four, and Storefront! Although the spinner doesn't appear in the Storefront mini-cart, but that's true for develop
as well, so not an issue.
It's really clever to hide the content of the button and then overlay the spinner! I would not have thought of that, super impressed 👏
Although I wonder how that works for people with screen readers 🤔 Should we set aria-hidden="false"
on the content to remove it from the vision of accessibility devices?
Good call. I'll create a separate issue for this in order to avoid blocking this PR. |
…Direct Checkout Flow (#9172) Co-authored-by: Kristófer Reykjalín <13835680+reykjalin@users.noreply.github.com>
Fixes #9165
Changes proposed in this Pull Request
The changes in this PR ensure that the
Proceed to Checkout
button does not collapse after being clicked while using the WooPay Direct Checkout (DC) flow.When the
Proceed to Checkout
button is clicked in the DC flow, the button's content is replaced with a loading spinner. However, since the button is set to hug the content when the button's content is replaced with the loading spinner, the button changes widths since the spinner is more narrow than the existing content.The changes in this PR ensure that the content remains but is hidden. Then, it adds the spinner on top of the content to ensure the button's width does not resize.
Testing instructions
Tip
The following tests should be performed on more than one theme.
Prerequisites
Test: Ensure
Proceed to Checkout
button does not collapse in classic cart[woocommerce_cart]
shortcode.Proceed to Checkout
button.Test: Ensure
Go to Checkout
button does not collapse in wc-blocks mini-cartwc-blocks footer mini-cart
.mini-cart
widget to the sidebar.Go to Checkout
button.Test: Ensure
Go to Checkout
button does not collapse in wc-blocks footer mini-cartGo to Checkout
button.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