-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
"Manage Locations" doesn't work on the Navigation screen #33815
Comments
I'm not sure if this action was ever possible. The gutenberg/packages/edit-navigation/src/hooks/use-menu-locations.js Lines 44 to 62 in f53785f
I think these assignments should be handled by /cc @getdave, @talldan, @spacedmonkey. |
I tested this and indeed the modal does not set the location, only the UI is updated. |
Thanks for testing, @draganescu. Do you think we should update the |
@Mamaduka It may also be possible to use the batch API for this kind of thing. Would be good to get input from the REST API team. I see Jonny (spacedmonkey) has already been pinged. @TimothyBJacobs do you have any thoughts? |
A menu's location is managed via the menus endpoint. Is there a reason we can't use that endpoint here?
|
The menus endpoint should be used here. In my testing a request like this worked.
Menu locations are a static endpoint, like taxonomies or post types. Menu locations assignment happens at the menu level. |
I think the issue is that the UI allows for assigning multiple menus to locations at once. So I guess in this case it'd be best to batch multiple requests to the menus endpoint @TimothyBJacobs @spacedmonkey? The modal should probably also have its own save button: Because here we're managing multiple menus, but the save button at the top of the editor only saves the current menu (which is the root problem here). |
Yes, I agree. That's the root problem. |
I feel like a dedicated Save button could be a better experience, a bit like the current menu screen. But I'd defer to @javierarce's opinion. I noticed this morning there was some design feedback on the tracking issue mentioning the location of Manage Locations - #29102 (comment), so maybe this could be revisited anyway. edit: There's an issue to tidy up some of the rough edges of the editor's main save button - #31813. |
Yep! |
The sidebar (and its save button) should only affect the current menu, so I agree with @talldan: we need to have a save button inside the modal and we should also show a snackbar message to indicate that the locations were updated. Otherwise, it gets super confusing if, for example, I reassign locations and then click the edit button next to an item. In that case, I'm not sure if I'll need to click save in the new menu or what happened to the other locations. Did I lose those changes? It's difficult to tell. In any case, I think we'll need to revisit the interface of this modal and the corresponding section of the sidebar to make it less confusing. |
Description
Currently, it's not possible to assign menu locations to a different menu using the "Manage Locations" modal.
Step-by-step reproduction instructions
Tested using TT1 theme.
Expected Behavior
The editor shouldn't assign menu locations to the second menu.
Current Behavior
The editor doesn't assign menu locations to the second menu.
Screenshots or screen recording (optional)
CleanShot.2021-08-02.at.16.30.27.mp4
The text was updated successfully, but these errors were encountered: