Fix unlist button and add reasons to email#747
Open
MaggieCabrera wants to merge 2 commits into
Open
Conversation
Combine the editor-package imports so there is a single import per package (no-duplicate-imports) and let prettier format them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
The Unlist button and its modal were not showing up on production. The editor plugin imports
PluginPostStatusInfoandPluginDocumentSettingPanelfrom@wordpress/edit-post, but those were moved to@wordpress/editorin newer WordPress. On versions where the old location no longer provides them, the import is empty and the whole pattern editor plugin fails to render, so the button, the modal, and the Pattern Details panel all disappear at once. We now import from both packages and use whichever the running version provides, so it works on old and new WordPress.While fixing this, we also made the modal's textarea actually useful to the author. Before, that field was saved as an internal note that only moderators could see, even though moderators often want to tell the author what is wrong so they can fix it and resubmit. Now the text is included in the unlisted email that goes to the author. We renamed the field to "Message to the pattern author" so it is clear the content will be sent to them.
How to test
This was working locally before my fix, and I don't know if I can reproduce the failure locally with the environment from this repo, so this fix is done a bit in the dark.