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

Fix error notice appearing underneath the modal screen overlay on the Navigation editor screen #31100

Closed
Tracked by #29102
javierarce opened this issue Apr 22, 2021 · 8 comments · Fixed by #34884
Closed
Tracked by #29102
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@javierarce
Copy link
Contributor

If you create a menu using the name of an already existing one, an error notice appears under the modal screen overlay, making it difficult to see and impossible to close independently.

The error notice also appears partially covered by the left sidebar.

Step-by-step reproduction instructions

  1. Create a menu with the name you want
  2. Create another one with the same name

Screenshots or screen recording (optional)

Screenshot 2021-04-22 at 17 53 27

Screenshot 2021-04-22 at 17 53 54

WordPress information

  • WordPress version: 5.7.1
  • Gutenberg version: 10.5.0-rc.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Browser: Chrome, Firefox & Safari
@javierarce
Copy link
Contributor Author

A good fix for this issue could be to integrate the error message inside the "Create a new menu" modal screen.

@talldan talldan added [Feature] Navigation Screen [Type] Bug An existing feature does not function as intended labels Apr 23, 2021
@javierarce
Copy link
Contributor Author

Also important to fix: in the mobile version is impossible to see the error message, because it's behind the modal.

Screenshot 2021-04-26 at 11 15 30

@JustinyAhin
Copy link
Member

Something we can start doing about this could be to move the notice div above the modal screen by increasing its z-index

@JustinyAhin
Copy link
Member

Something we can start doing about this could be to move the notice div above the modal screen by increasing its z-index

Not really sure about this any more. This will likely close the form to add menu on click on the notice.

@aristath , when you're back, I'll be happy to tackle this with your help

@getdave getdave changed the title Navigation Screen: the error notice appears under the modal screen overlay Fix error notice appearing underneath the modal screen overlay on the Navigation editor screen Aug 25, 2021
@Mamaduka
Copy link
Member

@javierarce, do you have mockups for the error inside the modal? Or should I use existing error notice styles?

@javierarce
Copy link
Contributor Author

I'm trying to see how we have solved this problem in other places, but I haven't found anything.

My initial idea was to use the existing error notice and show it above the modal (which would also fix the problem we have in Desktop mode)… would that be possible?

@Mamaduka
Copy link
Member

The only component I can remember is the MediaPlaceholder that displays errors locally.

media-placeholder-error

My initial idea was to use the existing error notice and show it above the modal.

It can be problematic because of the stacking context. Currently, even Snackbar is covered by modals overlay.

@javierarce
Copy link
Contributor Author

javierarce commented Sep 16, 2021

It can be problematic because of the stacking context. Currently, even Snackbar is covered by modals overlay.

Ok, the solution you mentioned works for me. We could have something like this:

image

Figma file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants