Group Editorial Notes and Updates controls in editor sidebar#605
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the Summarization experiment to enqueue its editor assets via the block editor-specific hook instead of the general admin hook, and adds an integration test to prevent regressions.
Changes:
- Switch asset enqueuing from
admin_enqueue_scriptstoenqueue_block_editor_assets. - Update
enqueue_assets()to no longer accept$hook_suffixand to useget_current_screen()for gating. - Add an integration test asserting the correct hook usage and ensuring cleanup of registered actions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| includes/Experiments/Summarization/Summarization.php | Moves editor asset loading to the block editor hook and updates the enqueue gate accordingly. |
| tests/Integration/Includes/Experiments/Summarization/SummarizationTest.php | Adds coverage to ensure editor assets are registered on the correct hook (and not on the generic admin hook). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #605 +/- ##
=============================================
+ Coverage 74.45% 74.50% +0.04%
Complexity 1740 1740
=============================================
Files 85 85
Lines 7521 7522 +1
=============================================
+ Hits 5600 5604 +4
+ Misses 1921 1918 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c0b2ed2 to
de05781
Compare
|
@jeffpaul I have made the changes. Please review them |
jeffpaul
left a comment
There was a problem hiding this comment.
Tested well on Playground, thanks!
dkotter
left a comment
There was a problem hiding this comment.
Left a few minor comments.
But I'm wondering if this is overcomplicating things? Can we not just change the priority order of the enqueue hooks to ensure the Summarization script is always loaded either first or last? In doing a quick test, seems if I set the priority to 5 on the enqueue_assets hook for Summarization, it always loads before Editorial Notes
Changed - Ensure the Editorial Notes and Editorial Updates controls stay grouped together in the post editor sidebar Co-authored-by: macayu17 <ayushhoff@git.wordpress.org> Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org> Co-authored-by: dkotter <dkotter@git.wordpress.org>

What?
Closes #601
Moves the Content Summarization sidebar control so the Editorial Notes and Editorial Updates controls stay
grouped together in the post editor sidebar.
Why?
The summary action currently appears between Generate Editorial Notes and Apply Editorial Updates. That splits
two related editorial actions and makes the notes/updates flow feel disconnected.
How?
enqueue_block_editor_assetswith priority5so the Summary control loads before the Editorial Notes and Editorial Updates controls.Use of AI Tools
AI assistance: Yes
Tool(s): OpenAI Codex
Model(s): GPT-5.5
Used for: Test updates, and local verification. I reviewed the changes and take responsibility for the final submission.
Testing Instructions
Automated checks run locally:
Manual verification: