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

Editing Navigation shows small sub menu area #66582

Closed
3 of 6 tasks
paaljoachim opened this issue Oct 30, 2024 · 7 comments · May be fixed by #66788
Closed
3 of 6 tasks

Editing Navigation shows small sub menu area #66582

paaljoachim opened this issue Oct 30, 2024 · 7 comments · May be fixed by #66788
Labels
[Block] Navigation Affects the Navigation Block Needs Design Feedback Needs general design feedback. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@paaljoachim
Copy link
Contributor

Description

I am seeing very little of the submenu and need to scroll.
Image

Associated issue: #65195

Step-by-step reproduction instructions

  1. Site Editor: Edit a navigation with a submenu.
  2. Click to edit the submenu.
  3. How much of the submenu is visible?

Screenshots, screen recording, code snippet

.

Environment info

WordPress 6.6.2
Gutenberg plugin: 19.5.0
WooCommerce plugin: 9.3.3

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@paaljoachim paaljoachim added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block labels Oct 30, 2024
@t-hamano
Copy link
Contributor

Thanks for the report.

You're probably inserting a Navigation block inside a pattern, right? Here's a video showing the steps I took to reproduce it:

048a25929bdcdf71617879d9d068ee43.mp4

Pattern editors, i.e. resizable editors, change height depending on their content. But navigation menus can have absolutely positioned submenus, which I think is not taken into account when determining the editor height.

I definitely think the current editing UX is not ideal.

@paaljoachim
Copy link
Contributor Author

Thank you for making the video Aki. It is very appreciated!

You're probably inserting a Navigation block inside a pattern, right?

Yes. I was editing the header pattern (see header title) and noticed the problem with editing the submenu.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Nov 9, 2024

@t-hamano and @getdave I see that @rohitmathur-7 has made a PR here:
#66788

Personally I believe it would be better to make the whole editing experience bigger. As currently it is very small and expending it to become a larger editing experience would help. Using much more of the screen canvas space.

@t-hamano
Copy link
Contributor

I'm not sure if going ahead with #66788 is ideal. #66788 changes the canvas to full height when a Navigation block is present on the canvas, but this issue can occur with more than just the Navigation block. Block developers may have custom blocks with absolutely positioned elements or blocks.

The best approach I can imagine would be to determine the canvas height based on the visually displayed blocks, but I'm not sure if this is easily achievable.

Image

@getdave
Copy link
Contributor

getdave commented Nov 12, 2024

@t-hamano As you know we had the work to place the block toolbar in the correct location. However that relies on the elements being active/visible in the DOM. Having the canvas height dynamically calculated based on a potential element becoming visible is going to be extremely challenging/impossible. I guess you are thinking along the same lines?

When we had a dedicated Navigation editor it used to force the canvas to full height. However, in that scenario we could guarantee we'd have only the Navigation block. Patterns are deliberately made smaller height canvas.

I think we need some wider input here to help determine if there's a compromise to be had.

@getdave getdave added the Needs Design Feedback Needs general design feedback. label Nov 12, 2024
@getdave
Copy link
Contributor

getdave commented Nov 20, 2024

@paaljoachim This seems related to #49339. If it's the same Issue could we/you close this one out in favour of that one?

@paaljoachim
Copy link
Contributor Author

Of course. Closing this issue.

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 Needs Design Feedback Needs general design feedback. [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.

3 participants