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

Provide ability to Clear Inactive Widgets #26232

Closed
garretthyder opened this issue Oct 17, 2020 · 7 comments
Closed

Provide ability to Clear Inactive Widgets #26232

garretthyder opened this issue Oct 17, 2020 · 7 comments
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@garretthyder
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Stemming from - https://make.wordpress.org/core/2020/09/30/call-for-testing-the-widgets-screen-in-gutenberg-9-1/#comment-40072

Provide ability to clear inactive widgets, this was available in legacy.
| - Does “clear” mean delete them from the area? If so, this can be done by selecting them all and clicking delete.

This would bring feature parity with the legacy widget editor;
Screen Shot 2020-10-16 at 5 23 06 PM

This is useful when there's alot of inactive widgets from switching themes. You currently can remove them one at a time in the new Widget Editor, but a button to clear them all would be helpful.

Describe the solution you'd like
Add a button to 'Clear Inactive Widgets' to the Inactive Widgets section of the new Widget Editor.

@carolinan carolinan added the [Feature] Widgets Screen The block-based screen that replaced widgets.php. label Oct 17, 2020
@garretthyder
Copy link
Contributor Author

If we do add the clear button maybe it can be in the sidebar settings and thus available to any sidebar not only the inactive widgets allowing users to clear a sidebar and start from scratch.

@draganescu draganescu added Needs Design Needs design efforts. Needs Design Feedback Needs general design feedback. labels Nov 10, 2020
@mapk
Copy link
Contributor

mapk commented Dec 7, 2020

In the case of adding this feature to all widget areas, here's an example of how that might work using the Browser's notification modal.

remove

@mapk mapk removed the Needs Design Needs design efforts. label Dec 7, 2020
@garretthyder
Copy link
Contributor Author

That's awesome @mapk, and looks great. Is saving the current widgets to session/local a huge overhead? Just thinking even with the AYP message that storing in browser memory the previous state will allow an undo.

@mapk
Copy link
Contributor

mapk commented Dec 8, 2020

Oh maybe? I'm not entirely sure.
I noticed the original message when removing them from the Inactive area indicated that the customizations could not be restored.
How that applies here requires some technical feedback.

@paaljoachim paaljoachim added the Needs Technical Feedback Needs testing from a developer perspective. label Jan 6, 2021
@draganescu draganescu changed the title Widgets Screen: Provide ability to Clear Inactive Widgets Provide ability to Clear Inactive Widgets Feb 18, 2021
@draganescu draganescu added [Type] Enhancement A suggestion for improvement. and removed Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. labels Feb 18, 2021
@kevin940726
Copy link
Member

Maybe worth noting that if we fix #28267 then it could be done by selecting all the widgets and delete them at once.

IMHO, the widgets editor is a complete different editing experience, it requires the users to hit "Update" manually rather than relying on auto-saving as in the original screen. We should provide a shortcut to allow them to delete all widgets in a widget area at once, but I don't think that we should auto-save it. A benefit of this approach is that the users could preview the changes and potentially restore back before updating.

@noisysocks
Copy link
Member

I agree with @kevin940726. Could we use existing block editor patterns (select all) here? cc. @critterverse

@noisysocks noisysocks added the Needs Design Feedback Needs general design feedback. label Apr 19, 2021
@noisysocks
Copy link
Member

noisysocks commented May 17, 2021

Closing this in lieu of #28267. I think selecting multiple blocks and pressing Remove blocks, or pressing Cmd+A and then Del is a much more natural way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants