-
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
[ experimental/nav-menus ] Delete menus in nav menus screen #21486
Conversation
Size Change: +3.57 kB (0%) Total Size: 822 kB
ℹ️ View Unchanged
|
For me, this wouldn't be a button and I think we should avoid this. There are a few issues in the implementation:
A very easy win here I think is just to make this simply have the text 'delete', this aligns more with the wp-admin interface. What there is now: Let's bring this in with the save button at the top, right and then a simple text 'Delete Navigation' at the bottom: |
Sure @karmatosed that is a great observation! I just went ahead and implemented "a button to click on" :) This mockup is a lot better. It also solves #21523 |
e4102a5
to
f74c24e
Compare
@noisysocks take this for a new spin and check out the current state code, I've added your suggestions. Thanks! |
f74c24e
to
239fe59
Compare
Given deleting entities is a complex endeavor, that will eventually allow to undo deletes before saving, this approach advances the navigation screen and allows for user testing.
removes extra getEntities call
239fe59
to
a3d44c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! Nice work.
packages/edit-navigation/src/components/menu-editor/block-editor-panel.js
Outdated
Show resolved
Hide resolved
Howdy @noisysocks this is ready for re-reviewing :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some minor notes but nothing blocking, good job!
Description
Adds delete button to #21281
Given deleting entities is a complex endeavor, that will eventually allow to undo deletes before saving, this approach advances the navigation screen and allows for user testing.
It is not the best way to implement this, but it allows the new screen to have this behavior now and not wait on some technicalities to be solved.
How has this been tested?
Tested locally by:
Screenshots
Types of changes
Non breaking change that adds a delete call to the API inside the
MenuEditor
component and creates a state from initial menus insideMenusEdtior
component.