bigcommerce / checkout-js

Optimized One-Page Checkout
MIT License
112 stars 342 forks source link

fix(payment): PAYPAL-4248 updated customer step loading state to be able to continue with checkout even if wallet button is in loading state #1884

Closed serhii-tkachenko closed 1 month ago

serhii-tkachenko commented 1 month ago

What?

Updated customer step loading state to be able to continue with checkout even if wallet button is in loading state

Why?

Some users have pretty bad internet connection which might increase time for waiting on wallet buttons initialization. Therefore, it might be better to make wallet buttons loading state as an optional, to avoid blocking user from checkout.

Testing / Proof

Manual tests was made with Network throttling 3g slow to emulate slow internet connection CI

[Before] Continue button is disabled until wallet buttons finish their initialisation process:

https://github.com/bigcommerce/checkout-js/assets/25133454/00b9c3e5-1965-4824-9231-2fbdf9b7839d

[After] Continue button is not disabled and can be used by customer even if wallet buttons still initialising on the page:

https://github.com/bigcommerce/checkout-js/assets/25133454/d8c55ebf-56e6-4467-bed7-27bd8b5e865c