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

Add custom JS to fix select all toggle on alerts list #1665

Merged

Conversation

marcinkrzeminski
Copy link
Collaborator

Fixes #1661

It turned the inline-edit-post script which is a dependency for wp-stream-alerts has a tags-suggest as a dependency which was causing issues with select all on the Alerts list screen. The solution was to deregister that script on that screen.

Checklist

  • Project documentation has been updated to reflect the changes in this pull request, if applicable.
  • I have tested the changes in the local development environment (see contributing.md).
  • I have added phpunit tests.

Release Changelog

  • Fix Select all on the Alerts list screen

* Remove the WP core tags - suggest script on the alerts list screen.
* This is not needed, but more importantly it was breaking the select all functionality.
*/
wp_deregister_script( 'tags-suggest' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗️issue
This causes the Alerts screen to not work for me. Which version of WP are you on? I've tested on 6.7.1 and 6.6.2.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG, great catch 🤦🏻‍♂️. I have reverted that and added a few lines of JS to re-enable the select all toggle.

@marcinkrzeminski marcinkrzeminski changed the title Remove unnecessary core script on the alerts list screen Add custom JS to fix select all toggle on alerts list Dec 23, 2024
Copy link
Contributor

@tharsheblows tharsheblows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcinkrzeminski I think some extra files have gotten in. This is working for me now but those files should probably be removed.

Copy link
Contributor

@tharsheblows tharsheblows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcinkrzeminski This looks good, thank you! There's a merge conflict but after that's resolved it's good to go.

…not-working

# Conflicts:
#	ui/js/alerts-list.js
@marcinkrzeminski marcinkrzeminski merged commit ac9aa3e into develop Jan 10, 2025
1 check passed
@marcinkrzeminski marcinkrzeminski deleted the fix/1661-select-all-alerts-in-table-view-not-working branch January 10, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select all alerts in table view not working
2 participants