-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix BNPL payment method messaging loading state #9355
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: +235 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
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.
@rafaelzaleski, good call. I initially had thought about conditionally call We can achieve a good UI flow by hiding the container via CSS and I did that in db76836. It's a low-risk approach and it keeps the UI looking good. I opted for hiding the message container by default in the product pages (instead of the opposite) as the majority of products should have an amount higher than the minimum, being those an exception. Update: |
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.
@cesarcosta99, I tested a product below the minimum amount and another above it, and the UI looks good in both scenarios now. The blank space is gone—thanks for the changes!
Fixes #9244.
Changes proposed in this Pull Request
This fixes the BNPL payment method messaging loading state. Previously, the skeleton was being displayed even if the product amount was lower than the minimum.
I needed to make the frontend aware of the minimum value so it has a value to compare to. Stripe doesn't provide a way to retrieve that information from their API, so I needed to build up a hardcoded list - sourced this idea from the Stripe extension [ref]. I pulled the values for this list from the Stripe docs.
Testing instructions
Setup
npm run build:client
.Test: Ensure the payment method messaging skeleton works as expected
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