Skip to content
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

URL dialog is cut off in landscape mode #4936

Closed
derekblank opened this issue Jun 7, 2022 · 5 comments · Fixed by WordPress/gutenberg#54096
Closed

URL dialog is cut off in landscape mode #4936

derekblank opened this issue Jun 7, 2022 · 5 comments · Fixed by WordPress/gutenberg#54096
Assignees
Labels
[Pri] High [Type] Bug Something isn't working

Comments

@derekblank
Copy link
Contributor

Describe the bug
The Insert from URL dialog is partially cut off when the app is opened in portrait orientation first, and then rotated to landscape orientation. (This may affect other dialogs in landscape, too.)

To Reproduce
Steps to reproduce the behavior:

  1. Open a Post or Page in Portrait orientation.
  2. Insert an Image or Audio Block.
  3. Tap on Insert from URL in the menu options.
  4. When the URL dialog opens, rotate to landscape orientation.
  5. Note that the dialog is only partially visible (screenshot below).

Expected behavior
Dialog should not be cut off. This may affect other dialogs in landscape, too.

Screenshots
URL dialog

@derekblank derekblank added the [Type] Bug Something isn't working label Jun 7, 2022
@essleeung
Copy link

Another case here:5420724-zd-woothemes

This happens when adding a link for paragraphs in Chrome & Safari (portrait mode). Asked user to use landscape mode.

@sudeepbaral
Copy link

sudeepbaral commented Jul 27, 2022

  • 5420724-zen

The user replied back and shared they are quadriplegic and shared they primarily use their iPad in portrait mode as they are not able to easily switch back-and-forth between portrait and landscape mode.

@jhnstn
Copy link
Member

jhnstn commented Mar 8, 2023

@essleeung and @sudeepbaral It looks like the issue the the user reported is with the mobile view of Gutenberg. This repo is for the mobile app. I would suggest reporting the issue on https://github.com/WordPress/gutenberg/ if it comes up again.

@jhnstn jhnstn self-assigned this May 9, 2023
@dcalhoun
Copy link
Member

From debugging this today, I believe this is an expected outcome for the amount of space in which we are rendering UIAlertController via React Native's Alert. iOS is doing its best to layout the alert within the limited space between the keyboard and the top toolbar rendered by the WordPress iOS host app. There simplify is not enough room.

React Native does not provide methods for styling its alert, because neither does iOS' UIAlertController.

The UIAlertController class is intended to be used as-is and doesn’t support subclassing. The view hierarchy for this class is private and must not be modified.

I believe we will need to design first-party UI to address this, e.g. a modal or bottom sheet. Given the mobile Gutenberg project already relies upon the bottom sheet pattern, I plan to explore rendering a text input in a bottom sheet.

@dcalhoun dcalhoun assigned dcalhoun and unassigned jhnstn Aug 30, 2023
@derekblank
Copy link
Contributor Author

derekblank commented Aug 31, 2023

I believe we will need to design first-party UI to address this, e.g. a modal or bottom sheet. Given the mobile Gutenberg project already relies upon the bottom sheet pattern, I plan to explore rendering a text input in a bottom sheet.

Good thought. BottomSheet seems like a natural choice based on other UI interactions we have with URLs, like the Link Picker. Something to bear in mind is that this ActionSheet containing the "Insert from URL" option may eventually become a Context Menu. Using BottomSheet seems like it would work fine with this flow, but just wanted to mention it in case there was anything further to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] High [Type] Bug Something isn't working
Projects
Status: Done (keep clean, manually)
Development

Successfully merging a pull request may close this issue.

6 participants