-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat: Insert from URL leverages a bottom sheet #54096
Conversation
Size Change: 0 B Total Size: 1.51 MB ℹ️ View Unchanged
|
Flaky tests detected in a46455c497737b69f02aabb1130534d2e74e75ab. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6043873311
|
👋🏻 @osullivanchris @paulforgione would either you be willing to review this solution for wordpress-mobile/gutenberg-mobile#4936 from a design perspective? You can find prototype builds for testing referenced in this PRs description. I am open to alternative UI or flows, but the bottom sheet approach felt the most appropriate for the UI patterns we have in place currently. You can review my rationale for this approach in wordpress-mobile/gutenberg-mobile#4936 (comment). Thanks! |
Thanks for the ping @dcalhoun . This looks much better. Good for me 👍 . One small thing. When I tap Insert from URL, the keyboard rises with the block insertor initially, before this bottom sheet animates up. Looks a little bit glitchy. But I believe this might be a general issue we have with keyboards/toolbars. https://github.com/WordPress/gutenberg/assets/50576199/4e5b35cc-970d-44a2-942a-6bf9957a71b0 |
a46455c
to
f45e95b
Compare
Thanks for the quick feedback. Super helpful! 🙇🏻
Yes, I observe similar animation oddities with this UI and elsewhere. I consider this to be in the scope of #37559, which hopefully would be addressed if we work on #42192. |
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.
I was able to successfully complete the testing steps on an iPhone SE and Galaxy S20 FE. LGTM. 🚀
This allows the MediaUploader component file to export only React components, which enables hot module reloading.
The usage of iOS `UIAlertController` via `react-native-prompt-android` resulted in an obscured alert on small devices in landscape orientation as there was not enough vertical space between the keyboard and the top of the editor view. Replacing the usage of alerts with the existing bottom sheet avoids the obscured UI.
This package is no longer installed or used. These referenced caused build errors.
This felt appropriate given this input is displayed for a user immediately after tapping "Insert from URL." Thus, the user likely expects a focused input and presented keyboard.
Align with content layout with that found in other existing bottom sheets.
Used for tests in the gutenberg-mobile repository.
50507e3
to
db66c34
Compare
Related PRs
What?
Replace the usage of an OS alert with a bottom sheet for the "Insert from URL"
flow for supported media blocks.
Why?
Fixes wordpress-mobile/gutenberg-mobile#4936.
The usage of iOS
UIAlertController
viareact-native-prompt-android
resultedin an obscured alert on small devices in landscape orientation as there was not
enough vertical space between the keyboard and the top of the editor view.
Replacing the usage of alerts with the existing bottom sheet avoids the obscured
UI.
How?
Refactor MediaUploader to export constants seprately, to enable fast refresh
support through only exporting a React component.
Replace usage of
react-native-prompt-android
with a bottom sheet containing atext input.
Given the refactor, stepping through the commits individually may simplify code review.
Testing Instructions
Valid Media
Invalid Media
Replace Media
Testing Instructions for Keyboard
n/a
Screenshots or screencast