fix the problem with new Guttenberg Inline comments feature#9869
Conversation
…count post editor admin inline coments alongside with user comments
…mment for compatibility with other comments types
|
Hi @risto987! 👋 Thank you for your contribution to WordPress! 💖 It looks like this is your first pull request to No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making. More information about how GitHub pull requests can be used to contribute to WordPress can be found in the Core Handbook. Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook. If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook. The Developer Hub also documents the various coding standards that are followed:
Thank you, |
Trac Ticket MissingThis pull request is missing a link to a Trac ticket. For a contribution to be considered, there must be a corresponding ticket in Trac. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. More information about contributing to WordPress on GitHub can be found in the Core Handbook. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
Hey @risto987 - thanks for the PR! This did fix the issue in my testing. The red bubbles disappeared, unless I had front end comments awaiting approval. Since this is a core issue we need a trac ticket for it, can you please open one? We may also want to consider a way to fix this in Gutenberg directly for users running earlier versions of WordPress. The only way I can think of doing this would be to remove and re-add the comments column using One other nice to have would be a new column for "Editorial Comments" showing resolved/unresolved using the same pattern as the front end approved/pending. This could be added in Gutenberg for now using filters in a separate PR. |
Started work on this in WordPress/gutenberg#71622 |
I went ahead and created https://core.trac.wordpress.org/ticket/64012 for this PR. |
|
Hi @adamsilverstein, @jeffpaul, @adamsilverstein , one more question related to your proposal: should I work on this part as well?
|
I already started work on adding in Gutenberg in WordPress/gutenberg#71622 We probably need another Trac ticket to work on adding the new "Editorial Comments" screen. cc: @jeffpaul |
| $post_id_in = "'" . implode( "', '", $post_id_array ) . "'"; | ||
|
|
||
| $pending = $wpdb->get_results( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM $wpdb->comments WHERE comment_post_ID IN ( $post_id_in ) AND comment_approved = '0' GROUP BY comment_post_ID", ARRAY_A ); | ||
| $pending = $wpdb->get_results( "SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM $wpdb->comments WHERE comment_post_ID IN ( $post_id_in ) AND comment_approved = '0' AND comment_type != 'block_comment' GROUP BY comment_post_ID", ARRAY_A ); |
There was a problem hiding this comment.
This looks ok for core, although we may be adding additional types so lets hold off until we fine tune the implementation in Gutenberg with a filter.
Avoid count post editor admin inline comments alongside with user comments
Related issue WordPress/gutenberg#71621