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

Delete widgets that have been removed from all sidebars. #26303

Conversation

TimothyBJacobs
Copy link
Member

Description

After the widget areas have been saved, delete any widgets that had their blocks removed.

How has this been tested?

Manually tested.

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@TimothyBJacobs TimothyBJacobs added REST API Interaction Related to REST API [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Package] Edit Widgets /packages/edit-widgets labels Oct 19, 2020
@TimothyBJacobs TimothyBJacobs self-assigned this Oct 19, 2020
@draganescu draganescu mentioned this pull request Feb 18, 2021
53 tasks
Base automatically changed from master to trunk March 1, 2021 15:44
@draganescu
Copy link
Contributor

I wonder what is the role of inactive widgets area (see #26232) if we merge this behavior?

@TimothyBJacobs
Copy link
Member Author

I think that's a valid product question to explore. But in the current widgets area, deleting a widget deletes the widget, it doesn't move it to the inactive widgets area. That happens if the widget is moved there manually, or if the widgets can't be moved automatically by retrieve_widgets when the theme changes. The intent of this PR was to restore that behavior IIRC.

@kevin940726
Copy link
Member

kevin940726 commented Mar 26, 2021

This needs a rebase since we don't rely on clientId anymore. See #28379 and #29111.

@draganescu
Copy link
Contributor

Yes, after rebase, given the news from @kevin940726 the PR needs a rewrite :(

@TimothyBJacobs
Copy link
Member Author

👍 I don't have too much time this cycle, so I'll go ahead and close this out.

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. [Package] Edit Widgets /packages/edit-widgets REST API Interaction Related to REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants