Repository navigation
Comments: Fix the comment editor crashing on paragraphs, lists, quotes, and code - #53658
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
Proposed changes
constrainedlayout in the comment editor bundle. Since the block-editor 18.1 bump in Update wordpress monorepo #53004, the align toolbar looks upconstrainedfor every block withalignsupport. The stub made that lookup returnundefined, so paragraphs, lists, quotes, and code blocks crashed withCannot read properties of undefined (reading 'name')once selected.The editor chunk grows by about 7.6 KB. Expect more
jetpack_comments_editor_errorevents withstage: renderafter deploy, since these crashes now get logged.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jp build packages/comments.TypeError.-for a list,>for a quote, and```for code. Each block renders with no warning and no console error.'constrained'back to the layouts list inprojects/packages/comments/tools/editor-stubs.js, rebuild, and click into the comment box. The editor should go away and the plain textarea should come back, editable.