Site Tagline: Fix block error when migrating deprecated textAlign attribute#76821
Site Tagline: Fix block error when migrating deprecated textAlign attribute#76821
Conversation
…ribute Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
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: -3 B (0%) Total Size: 7.69 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 612f6f4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23583990863
|
|
@shimotmk Thanks for the review! |
…ribute (#76821) * Site Tagline: Fix block error when migrating deprecated textAlign attribute Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update fixture --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: shimotmk <shimotomoki@git.wordpress.org>
…ribute (#76821) * Site Tagline: Fix block error when migrating deprecated textAlign attribute Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update fixture --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: shimotmk <shimotomoki@git.wordpress.org>
…ribute (#76821) * Site Tagline: Fix block error when migrating deprecated textAlign attribute Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update fixture --------- Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: shimotmk <shimotomoki@git.wordpress.org>
Follow-up on #75690
What?
Fix a React error (
<hundefined>) in the Site Tagline block when it contains the deprecatedtextAlignattribute.Why?
When a Site Tagline block with the old
textAlignattribute (e.g.<!-- wp:site-tagline {"textAlign":"center"} /-->) is parsed through the v2 deprecation path, thelevelattribute remainsundefinedbecause itsdefault: 0was missing from the deprecated definition. This causesh${undefined}→hundefinedto be rendered as a tag name, triggering a React error.How?
Added the missing
default: 0for thelevelattribute in the v2 deprecated block definition.Testing Instructions
<!-- wp:site-tagline {"textAlign":"center"} /-->Screenshot
Before
ba468e67260a76ed5be2169c7daa3b00.mp4
After
a35ee0df30fa681f79a807e9c4c4c365.mp4
Use of AI Tools
Claude Code was used to assist with investigating the root cause and authoring this fix.