Repository navigation
Enhanced inserter notice handling for block patterns - #127
Merged
Merged
Conversation
Contributor
pirate-bot
approved these changes
Dec 4, 2026
Contributor
There was a problem hiding this comment.
🟢 Approved
This approves the fix: the Design Pack card now follows core's pattern-inserted snackbar on WordPress 6.3 through 7.1, on English and translated sites.
Validation details
- Files reviewed: 1/1 changed files.
- Core sources for 6.4, 6.7, 6.8, 6.9, 7.0 and 7.1 show both notice ids and both wordings. Each uses
__()in thedefaultdomain. - The real matcher ran with core's i18n bundle and German 7.1 and Japanese 6.8 translations:
cp /deps/wordpress/7.1/wp-includes/js/dist/hooks.js /workspace/checks/L1/hooks.js && timeout 30 node /workspace/checks/L…printedDEVIATIONS=0; CASES=24(run R8) - A check over 218 core language packs (6.8 and 7.1) found no missed pattern notice and no matched image or error notice [R5].
- On WordPress 7.1.5 with PHP 8.3.37, a pattern click showed the card, and it stayed after the snackbar faded. Image insertions showed no card.
Untested areas
- WordPress versions before 7.1 were not run in the browser. Source reads and the isolated run cover them.
- The browser did not produce core's
Image inserted.snackbar. The isolated run covers it. - The theme has no JavaScript test suite, so no test was required.
- The variant pass did not settle these places, where the fixed cause may still reach:
assets/js/src/components/DesignPackNotice.js:58— unverified: no store/selector rename found in WordPress 5.5, 6.4, 6.8 or 7.1: /deps/wordpress/5.5/wp-includes/js/dist/notices.js:538-558, /deps/wordpress/6.4/wp-includes/js/dist/notices.js:640…assets/css/src/common/generic.scss:38-60— unverified: these depend on core DOM/classes, but no changed-class-to-broken-layout path was established. The suspected title-wrapper rename is not supported: edit-post-visual-editor__post-tit…assets/css/src/editor.scss:3-9— unverified: these depend on core DOM/classes, but no changed-class-to-broken-layout path was established. The suspected title-wrapper rename is not supported: edit-post-visual-editor__post-tit…assets/css/src/blocks/navigation.scss:2-24— unverified: these depend on core DOM/classes, but no changed-class-to-broken-layout path was established. The suspected title-wrapper rename is not supported: edit-post-visual-editor__post-tit…- not reached: wp.updates.ajax compatibility
assets/js/src/design-pack-notice.js:5-10— unverified: The mount identifier is theme-owned, but the broader compatibility cause exposes another lead: unconditional createRoot() prevents mounting if supplied by WordPress 5.5, whose elem…
🤖 Automated review · run code-review-agent_6b128dca7f3fd5.20824181.
🤖 Review agent — review posted ✅ on 01ebe792 · approved · 0 findings · 30 min
Run code-review-agent_6b128dca7f3fd5.20824181 · trail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improved pattern-inserted notice detection in the
DesignPackNoticecomponent by supporting different WordPress core notice IDs and message formats, ensuring compatibility with WordPress versions before and after 6.8, including 6.8 itself.Closes #117
Why no test case
This fix is JavaScript-only (
DesignPackNotice.js), and Neve FSE has no test suite that can run it:How it was verified instead. I ran a Playwright script against the real block editor on WordPress 7.1.5:
%1$s, matched, and a translated image notice did not.