-
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
Patterns: Change the pattern block overrides attribute name to content
#58285
Conversation
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
Size Change: -3 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
I like |
Doesn't this change break all the blocks that are already using the overrides currently on their websites? Because the old attributes aren't caught? |
Yeh, my vote would be to keep it as |
Yes, but up until this point this feature has been experimental, so subject to change, so shouldn't really have been used on production sites. But we will still take into account the potential impact on sites that were using it anyway before making a final decision on this. |
I don't think it impacts any decision, as a migration can be added for the attribute. That's something that should probably be included in this PR anyway, especially if this PR doesn't land in the plugin release tomorrow (since the release will remove the experiment flag for pattern overrides). |
41d397f
to
5d45364
Compare
Flaky tests detected in 5d45364. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7718760913
|
closing for now as we are looking at changing this data structure. |
What?
Changes the override attributes name from
overrides
tocontent
Why?
Feedback was received that this would be a more appropriate name.
How?
Renamed all the instances of the attribute in editor and frontend code.
Testing Instructions
content
Before:
<!-- wp:block {"ref":233,"overrides":{"WZUl8h":{"content":[1,"my new content"]}} /-->
After:
<!-- wp:block {"ref":233,"content":{"WZUl8h":{"content":[1,"my new content"]}} /-->