-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Inline Commenting: Avoid querying comments when the experiment is disabled #68632
Conversation
const isBlockCommentExperimentEnabled = | ||
window?.__experimentalEnableBlockComment; |
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.
Maybe we should also add a check for globalThis.IS_GUTENBERG_PLUGIN
to tree-share the code for the WP core.
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.
Will this be addressed in a follow-up? Or in this PR, I think that's fine.
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 100% sure if it's needed. Looking at other experiments, none of them use globalThis.IS_GUTENBERG_PLUGIN
.
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.
My guess is that globalThis.IS_GUTENBERG_PLUGIN
prevents the experimental code itself from being shipped into core, but I'm not sure. In any case, I think it's okay to ship this PR for now
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the 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. |
Size Change: +6 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
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.
…abled (WordPress#68632) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
PR moves the experimental block comments check and avoids rendering the
CollabSidebar
component when the experiment is disabled.Why?
Testing Instructions
comments
endpoint.Testing Instructions for Keyboard
Same.
Screenshots or screencast