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

Hide Navigation Menus WPAdmin menu item #36589

Closed
Tracked by #36556
noisysocks opened this issue Nov 17, 2021 · 17 comments · Fixed by #37212
Closed
Tracked by #36556

Hide Navigation Menus WPAdmin menu item #36589

noisysocks opened this issue Nov 17, 2021 · 17 comments · Fixed by #37212
Assignees
Labels
[Block] Navigation Affects the Navigation Block Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress

Comments

@noisysocks
Copy link
Member

noisysocks commented Nov 17, 2021

Appearance → Navigation Menus isn't a particularly useful screen right now. For each Navigation, you can only edit the title or delete the menu.

We could consider hiding Appearance → Navigation Menus for WP 5.9.

Or, if possible, we could consider linking each Navigation Menu to an isolated template part editor.

Screen Shot 2021-11-18 at 10 43 24 am

@noisysocks noisysocks added the [Block] Navigation Affects the Navigation Block label Nov 17, 2021
@noisysocks noisysocks changed the title Hide Appearance → Navigation Menus or link each Navigation to an isolated template part editor Hide Navigation Menus or link each Navigation to an isolated template part editor Nov 17, 2021
@noisysocks
Copy link
Member Author

Or, if possible, we could consider linking each Navigation Menu to an isolated template part editor.

Is this feasible? @talldan @adamziel @getdave

@talldan
Copy link
Contributor

talldan commented Nov 18, 2021

Or, if possible, we could consider linking each Navigation Menu to an isolated template part editor.

I don't have a good understanding of how the isolated template part editor works, haven't been involved in it. But I'm guessing it shows an editor that uses useEntityBlockEditor.

If so, the things to solve are:

  • The navigation block has specific constraints for its inner block types, defined using allowedBlocks and parent properties. A generic editor for the nav block's inner blocks currently doesn't support that.
  • The navigation block applies styles to its inner blocks, so an editor that just renders the inner blocks will look bad
  • There's some custom appender and inserter logic within the navigation block that might need to be replicated
  • The navigation block uses a wp_navigation post type rather than a template part.

I also don't know how we can link a menu (from wp-admin) to the isolated template part editor, as I think that's a site editor feature?

@talldan
Copy link
Contributor

talldan commented Nov 18, 2021

I see now you're probably talking about the isolated editor in the context of this - #36379 (comment)

@getsource
Copy link
Member

getsource commented Nov 18, 2021

Thanks for writing up this issue!

I agree. I was a bit confused when I was testing this feature. It wasn't clear when I clicked on "edit" (or "add") for a menu whether it was broken or working as intended, and what to do to move forward to edit menus, as is expected with the "classic" menu editing flow.

If the classic menu support/block ends up landing (not 100% sure if it'd be linked to that issue?), then perhaps "classic" menus could link to the "classic" menu editor, and block style to an isolated editor (or whatever other place is possible to modify the menu)?

(Edit: More concise.)

@draganescu
Copy link
Contributor

I think that, unless we figure out all the problems mentioned by @talldan above, the immediate thing to do is hide the Navigation menus from under Appearance until it actually becomes useful.

@noisysocks noisysocks added the Needs Dev Ready for, and needs developer efforts label Nov 30, 2021
@noisysocks
Copy link
Member Author

@getdave: Do you think you could work on hiding this for beta 2? 🙏

@getdave
Copy link
Contributor

getdave commented Dec 1, 2021

Yes we can work on hiding this for Beta 2 👍

At this stage we can't add the Isolated Template Editor but that is on the roadmap for WP 6.0 😄

@getdave getdave changed the title Hide Navigation Menus or link each Navigation to an isolated template part editor Hide Navigation Menus WPAdmin menu item Dec 1, 2021
@anton-vlasenko
Copy link
Contributor

anton-vlasenko commented Dec 1, 2021

Appearance → Navigation Menus isn't a particularly useful screen right now. For each Navigation, you can only edit the title or delete the menu.

I don't mind to hide it (meaning we need to disable the show_ui option).
But I have a question.
If we hide that page, how are we going to delete wp_navigation type posts?
The reason to introduce Navigation Menus was this one:

It'd be great to have a way to manage these posts from WordPress admin. Particularly to delete a menu, without a specialized UI a user would have to assign a menu to a navigation block only to delete it.

I'm not very familiar with template parts. I'm not sure if they allow to do that.
But there could be an issue if we just hide Navigation Menus and don't provide a convenient way to delete wp_navigation posts.

@talldan @noisysocks @getdave

@getdave
Copy link
Contributor

getdave commented Dec 1, 2021

If we need them for removing posts only, an alternative might be to display a message in the single post view of wp_navigation explaining that Navigation Menus should be edited in the Site Editor.

@adamziel
Copy link
Contributor

adamziel commented Dec 1, 2021

If we need them for removing posts only, an alternative might be to display a message in the single post view of wp_navigation explaining that Navigation Menus should be edited in the Site Editor.

How would that help with deleting wp_navigation posts? I don't think there is any other UI supporting that at the moment. There is a "delete" button missing somewhere. Would it make sense to lean on the pre-publish step where you confirm which entities are being modified? Could we learn something from reusable blocks here? cc @javierarce @critterverse

CleanShot 2021-12-01 at 11 36 31@2x

@critterverse
Copy link
Contributor

Maybe similar to Reusable blocks, there's not a WPadmin menu item but the management screen is accessible from the ellipses menu in the Navigation block toolbar via a "Manage menus" item. That might be a good way to not overemphasize the admin screen until the isolated editing view is available.

@getdave
Copy link
Contributor

getdave commented Dec 2, 2021

the management screen is accessible from the ellipses menu in the Navigation block toolbar via a "Manage menus" item

Yup sounds like a plan.

How would that help with deleting wp_navigation posts?

I mean, if we're going to show the single post view for wp_navigation which is literally just a title box and everything else disabled, then perhaps we could/should also display a message below the title box which informs users that editing Menus happens in the Site Editor.

@spacedmonkey
Copy link
Member

I strongly believe that we should hide this menu item / admin UI. An edit screen with just title, looks broken. I had to check the box to make sure that was the intended behavior. Until you can edit the navigation block in the UI, this screen doesn't make an sense.

Also consider, that to some users, they will think that this screen has replaced the existing menu screen and it is quite the change, for a UI that isn't even functional.

@mtias
Copy link
Member

mtias commented Dec 3, 2021

I agree to hide this. Once we leverage the focused template part view for the purpose of showing just the navigation we can think of more entry points, if needed. For now, the editor should be the primary way to get there. We also have #36667 to scope future access better.

@paaljoachim
Copy link
Contributor

Yes. I also fully agree on what @spacedmonkey Jonny mentioned.
Let's hide it.

@noisysocks
Copy link
Member Author

Maybe similar to Reusable blocks, there's not a WPadmin menu item but the management screen is accessible from the ellipses menu in the Navigation block toolbar via a "Manage menus" item. That might be a good way to not overemphasize the admin screen until the isolated editing view is available.

This sounds reasonable. How about we add Manage menus underneath Create new menu? Then we can hide the link in Appearance.

Screen Shot 2021-12-08 at 11 09 11 am

I think at this stage we're just waiting for a dev to pick this up.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 8, 2021
@noisysocks
Copy link
Member Author

This sounds reasonable. How about we add Manage menus underneath Create new menu? Then we can hide the link in Appearance.

I opened #37212 which does just this.

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 Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.