-
Notifications
You must be signed in to change notification settings - Fork 113
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
Mitigation: Custom Amounts CTA not being tappable unless keyboard is manually dismissed #13994
Conversation
We’ve seen some instances where the CTA button is not tappable unless the keyboard is manually dismissed, this issue hasn’t been replicable consistently thought. We attempt to mitigate this problem by allowing keyboard dismissal when a merchant taps anywhere else within the view. Adding this within the button closure wouldn’t work, as if the button happens to be non-tappable due to the keyboard layout constraints, we wouldn’t be able to call it’s dismissal either.
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
|
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 reasoning for dismissing the keyboard upon tapping the view sound good to me. 👍
I tested on an iPhone running iOS 18.0 and didn't face issues with dismissing the keyboard 🚢
Closes: #13955
Description
We’ve seen some instances where the Custom Amounts CTA button is not tappable unless the keyboard is manually dismissed first, this issue hasn’t been replicable consistently, but we can infer that either the keyboard layout is interfering with the button tap gesture, or the timing of SwiftUI managing the keyboard vs the view dismissal.
We attempt to mitigate this problem by:
Testing information
As shared in the PR issue, this is cannot be consistently reproduced, but we can run the flow a few times and test the changes:
No new Unit Tests have been added, as it's merely an UI update.
Since the keyboard dismissal logic is encapsulated to this view only, we've just added as an extension of the view. We can move this to the view model if you prefer, but I opted to keep it in the view since we don't need to expose it to other views through the view model if the problem hasn't been reported anywhere else.
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: