-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Try: Only render LastRevision component if plugin is active #55253
Conversation
Size Change: 0 B Total Size: 1.65 MB ℹ️ View Unchanged
|
Flaky tests detected in f3569a0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6482371468
|
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've tested and confirmed this works as expected for me, thank you @mikachan for the fix! 🚀
I just cherry-picked this PR to the 6.4-rc1-2 branch to get it included in the next release: 707bf2a |
* Add selector as id to layout style overrides. (#55291) * Fix flickering when focusing on global style variations (#55267) * ProgressBar: use text color to ensure enough contrast against background (#55285) * Use text color at different opacities for track and indicator * Add high contrast mode styles * CHANGELOG # Conflicts: # packages/components/CHANGELOG.md * Remove empty attrs. (#54496) * Remove empty attrs. * Fix linter errors --------- Co-authored-by: Sarah Norris <[email protected]> * Add IS_GUTENBERG_PLUGIN flag to LastRevision (#55253) * useBlockPreview: Try outputting EditorStyles to ensure local style overrides are rendered (#55288) * useBlockPreview: Try alternative fix for displaying local style overrides * Avoid duplicate styles, fix rendering issues in Safari * Add more explanatory comments * Remove additional check for styles within the block preview, as it is not needed since EditorStyles handles its own style overrides retrieval * Bug: PHP notice when an image with lightbox is deleted (#55370) * Fix PHP notice when an image with lightbox is deleted * Fix PHP notice when an image with lightbox is deleted --------- Co-authored-by: tellthemachines <[email protected]> Co-authored-by: Aki Hamano <[email protected]> Co-authored-by: Marco Ciampini <[email protected]> Co-authored-by: Jonny Harris <[email protected]> Co-authored-by: Andrew Serong <[email protected]> Co-authored-by: Kishan Jasani <[email protected]>
What?
This adds a check for
IS_GUTENBERG_PLUGIN
to theLastRevision
component. Please see this Slack thread for more context: https://wordpress.slack.com/archives/C055Y7FKS7N/p1696947482790409.Why?
The API that enables this feature to work (i.e. populates
lastRevisionId
andrevisionsCount
) has recently been fixed in Core. Currently, theLastRevision
component renders if these variables are set, and will not render if these variables are not set. However, in order to provide more control of this feature from the Gutenberg plugin side, we should consider temporarily putting this behind theIS_GUTENBERG_PLUGIN
feature flag.How?
Adds a check for
! process.env.IS_GUTENBERG_PLUGIN
which will rendernull
if true, i.e. if the Gutenberg plugin is not active, render nothing.Testing Instructions
LastRevision
component in the Template side panel when the GB plugin is active