-
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
Remove pattern override experiment completely #58105
Conversation
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/experimental/block-bindings/index.php ❔ lib/experimental/blocks.php ❔ lib/experimental/editor-settings.php ❔ lib/experiments-page.php |
withPartialSyncingControls | ||
// Split into a separate component to avoid a store subscription | ||
// on every block. | ||
function ControlsWithStoreSubscription( props ) { |
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.
This is the only bit that I refactored a little bit, as otherwise it would've added a store subscription for every paragraph, heading, image and button. Now it'll only do so when one of those blocks is selected.
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.
it would've added a store subscription for every paragraph, heading, image and button.
Was that coming from a noticeable performance impact? My impression was that a store subscription should be cheap. But this is still a good refactor!
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.
Yep, apparently there have been good performance improvements from making these kind of changes, so this follows the trend: https://github.com/WordPress/gutenberg/pulls?q=is%3Apr+label%3A%22%5BType%5D+Performance%22+is%3Amerged+store+subscription+
Size Change: -341 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
aca9b90
to
cd183cc
Compare
5cc3643
to
40a050e
Compare
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 think we should restore this file to the upper level?
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.
It's deleted
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.
Oh wait, I see what you mean.
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.
withPartialSyncingControls | ||
// Split into a separate component to avoid a store subscription | ||
// on every block. | ||
function ControlsWithStoreSubscription( props ) { |
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.
it would've added a store subscription for every paragraph, heading, image and button.
Was that coming from a noticeable performance impact? My impression was that a store subscription should be cheap. But this is still a good refactor!
Flaky tests detected in 40a050e67d75cbf0e4617215968e2eb34ba4fd2b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7622221790
|
9eda353
to
4109ef9
Compare
This pretty close now, but there are some puppeteer tests that need to be updated to account for pattern blocks no longer being directly editable. |
…sable block no longer uses controlled inner blocks)
3b8e52c
to
61d48da
Compare
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.
Tests passed! It must be a good thing!
} ); | ||
|
||
// Check for regressions of https://github.com/WordPress/gutenberg/issues/33072. | ||
it( 'can be saved when modified inside of a published post', async () => { |
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.
This was refactored into a playwright test below.
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.
Should we migrate tests from this file into various/patterns.spec.js
, or does it make sense to keep a separate file?
P.S. I think various/patterns.spec.js
should be blocks/patterns.spec.js
.
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.
Should we migrate tests from this file into
various/patterns.spec.js
, or does it make sense to keep a separate file?
I think there's no point in keeping separate files, TBH. Eventually we should migrate this file but that's for a follow-up 😅.
P.S. I think
various/patterns.spec.js
should beblocks/patterns.spec.js
.
Good point. No idea why the original test is in various
? 😅
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.
Sounds good. I'm planning to handle the migration for this test file today.
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.
Thank you! We've done some changes to this block recently though (see #53705), so some parts might be outdated or confusing. Please reach out if you have any questions! Or feel free to punt it and I can give it a try maybe next week!
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.
Sounds good.
I noticed this PR was merged after I raised the PHP Sync Tracking Issue for WP 6.5 and has changed PHP files that may need backporting to WP Core. Please forgive the ping, but I marked as |
Thanks for flagging @getdave, I think the block bindings backport PR (WordPress/wordpress-develop#5888) takes care of any required backporting. From what I could tell there's no additional backporting for pattern overrides, as the rest of the implementation is in the block-library package (which is auto-backported). |
✅ I updated the PHP Sync Tracking Issue for WP 6.5 to note this PR does not require a backport for WP 6.5. The code here will be backported as part of WordPress/wordpress-develop#5888 |
What?
Builds on #58102 (ideally ship that PR first)
Dovetails with #58089
Removes the pattern overrides experiment flag completely.
The block bindings and custom field experiment flag will still need to be checked to use the pattern overrides feature
Why?
Aims to stabilize the feature ahead of the upcoming gutenberg and WordPress 6.5 release.
How?
Mostly just removes unused experiment flag code.
Testing Instructions