Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1222 +/- ##
==========================================
Coverage 84.90% 84.90%
Complexity 4727 4727
==========================================
Files 182 182
Lines 17572 17572
==========================================
Hits 14920 14920
Misses 2652 2652
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
dkotter
left a comment
There was a problem hiding this comment.
In addition to the backwards compat item I flagged, the changes here also break Editorial Updates. So I know the PR description mentions handling those changes separately but I think we'd want those bundled here so we don't merge code that breaks a feature
0121177 to
1e79111
Compare
59ed032 to
2d9a495
Compare
Previously, all helpers were within the same file as the hook, which bloated the hook file and made it hard to read. This commit separates the concerns by moving relevant pieces of code into their own sub-modules within the package.
7d07b6a to
fd5c4b2
Compare
What?
Closes #1221
Editorial Notes and Editorial Updates now support blocks with more than one Note thread.
Why?
Since WordPress/gutenberg#75147, a block can have several Note threads, so core stores metadata.noteId as an array of IDs instead of a single number.
Both features still expected a single number, which caused these bugs:
How?
Shared helpers (
src/utils/notes.ts)getNoteIds()readsnoteIdin either format and returns a clean list of unique IDs.addNoteId()adds a new thread ID without removing existing ones. It keeps the single-number format unless the block already uses an array, so older WordPress versions keep working.collectThreadTexts()gathers the root and reply texts for a set of threads, and both features use it.The block and note types, the review/note-creation helpers and the revisions helpers moved out of the hooks into
types/andutils/folders for each feature. The hooks now hold only the hook logic.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 5.5
Used for: Drafting the changes, and stress testing them. I've reviewed the code and self-tested the changes.
Screencast
pr.mov
Changelog Entry