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

The position of the Navigation block item appender obstructs the view #42010

Closed
javierarce opened this issue Jun 28, 2022 · 11 comments · Fixed by #43530
Closed

The position of the Navigation block item appender obstructs the view #42010

javierarce opened this issue Jun 28, 2022 · 11 comments · Fixed by #43530
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended

Comments

@javierarce
Copy link
Contributor

javierarce commented Jun 28, 2022

Description

The appender inside the Navigation block sits on top of the last inserted element, making it difficult, for example, to read the text of a link.

Screenshot 2022-06-28 at 15 25 11

This problem also happens with vertical menus:

Screenshot 2022-06-28 at 15 29 10

The solution would be to add some spacing to the left (or top) side of the appender:

image

Step-by-step reproduction instructions

  1. Create a navigation menu that is right-aligned
  2. Add two or three links inside

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.0, Gutenberg 13.5.1
Tested in Chrome, Firefox, and Safari for mac

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@javierarce javierarce added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block labels Jun 28, 2022
@javierarce javierarce changed the title Navigation block item appender position obstructs the view The position of the Navigation block item appender obstructs the view Jun 28, 2022
@talldan
Copy link
Contributor

talldan commented Jun 29, 2022

I wasn't involved in the change, but I think it was done this way so that when the navigation block is selected it doesn't become wider and potentially cause a layout shift in the site editor.

@javierarce
Copy link
Contributor Author

That makes sense, but we should try to solve the problem. Links with long texts can be edited, but links with short ones (like "Help" for example, or text written using ideograms like in Chinese or Japanese) are quite difficult to select.

Maybe we could try something like this for example:

image

@getdave
Copy link
Contributor

getdave commented Jul 21, 2022

Related #40382

@javierarce
Copy link
Contributor Author

Circling back to this issue, I discovered that removing the position: absolute from the .block-editor-block-list__block .block-list-appender solved the problem, and the appender position was more consistent with the default case (where it appears right after the last item)

Here's a video that shows the default behavior and the result of removing the absolute position:

Screen.Recording.2022-08-23.at.11.47.03.mov

I haven't done an exhaustive testing, so maybe I'm missing other problems that this fix could cause, but perhaps there's something here we could explore.

@javierarce
Copy link
Contributor Author

I haven't done an exhaustive testing, so maybe I'm missing other problems that this fix could cause, but perhaps there's something here we could explore.

Oh, well, I imagine this could be one of the reasons (pointed out by @talldan above)

Screen.Recording.2022-08-23.at.11.58.43.mov

@getdave
Copy link
Contributor

getdave commented Aug 23, 2022

I think a PR to test would be great if you have time/inclination 🙇‍♂️

@javierarce
Copy link
Contributor Author

I think a PR to test would be great if you have time/inclination 🙇‍♂️

Of course, here is the PR

@mrfoxtalbot
Copy link

Thank you, @javierarce! I am seeing that your PR #43530 is blocked. Features for 6.1 are frozen at this point, but I wanted to know what is blocking this and ask you if this is on your roadmap for the next release. Thank you!

@annezazu
Copy link
Contributor

Wanted to provide additional and recent context around how this is a pain point for folks with a great example from @kathrynwp. To set the stage, she tried to use the / inserter to add a new menu item, resulting in a / listed as the menu text:

I tried to add a menu item for Home, but wasn’t sure how to do it. I typed / in the link area, but then ended up with / in the menu text itself.

From there, this bug obstructed the view in order to edit it further and fix it. Eventually, she did the following:

What I had to actually do as a workaround is change the order of menu items to move / to the left, so it’s no longer covered by the block inserter. I was then able to edit the text.

When thinking about user expectations, trying to use the / inserter alone is an interesting call out (I wonder how often that happens). Separately though, it underscores how painful this current bug is to do very basic things, name and rename menu items, resulting in a level of fragility in the experience.

Currently, this is listed as normal priority in the tracking issue ahead of 6.2: #38275 but I'd be keen to see this iterated upon, especially since Javier did the work to find a possible solution cc @getdave for consideration.

@getdave
Copy link
Contributor

getdave commented Oct 26, 2022

I agree. This is another candidate for the Quick wins category on the Tracking Issue which I suggested elsewhere.

but I'd be keen to see this iterated upon, especially since Javier did the work to find a possible solution cc @getdave for consideration.

Also agree. See #43530 (comment) as I also noticed this hadn't been reviewed. Apologies to @javierarce for that oversight. It's been...busy 😄. We will get to it.

@getdave
Copy link
Contributor

getdave commented Nov 9, 2022

This one was fixed in #42010

@getdave getdave closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants