-
Notifications
You must be signed in to change notification settings - Fork 843
Code Editor: Fix after private-api removal #46127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
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 SummaryCoverage changed in 1 file.
|
2bb32c4 to
471ac3d
Compare
projects/packages/jetpack-mu-wpcom/src/features/code-editor/code-editor/code-editor.tsx
Show resolved
Hide resolved
|
BTW IIUC this was a regression that wasn't detected by tests. Would it make sense to add some minimal e2e coverage (as a follow-up) to make sure it's the improved editor that's being used? |
ockham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to do an in-depth review of the code due to lack of familiarity, but I can confirm that this tests as advertised 👍
It was using a private API and designed to fail gracefully falling back to the regular editor. This worked perfectly.
That's a good idea. I am concerned about making any tests very coupled to the implementation. It may need to examine whether one editor or another is used where the UI is a code editor with the same contents. |
13dd3b9 to
12f49cf
Compare


Proposed changes:
Fixes the improved code editor feature after the
EditorContentSlotFillprivate API it relied on was removed in WordPress/gutenberg#72681.This implements the code editor replacement using the same technique that was used for the CSS editors.
Other information:
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
Test this out on a WordPress.com simple site.
Without this patch, the improved editor is unavailable and the regular editor is used.
With this patch, the improved editor is shown.
Interact with the improved editor and ensure that changes are correctly synced between the visual and code editors.