Post Navigation Link : Migrate to Text-Align Block Support#75557
Post Navigation Link : Migrate to Text-Align Block Support#75557
Conversation
|
Size Change: +59 B (0%) Total Size: 6.85 MB
ℹ️ View Unchanged
|
|
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. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I have a question: how do you generate fixture files? Because when I run npm run fixtures:regenerate locally, there are code differences.
The only file that needs to be created manually is tcore__post-navigation-link__deprecated-v1.html. The other three files are created automatically when you run npm run fixtures:regenerate.
|
Thank you for highlighting this. The file was added manually. I will regenerate the fixtures properly and update the PR accordingly to resolve the issue. |
5de4c5d to
d5be563
Compare
|
I’ve regenerated the fixtures with |
|
The issue has been resolved. It was due to Windows CRLF (\r\n) line endings being used instead of the required LF (\n) format. |
|
Flaky tests detected in 45ef23a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22106794664
|
* Post Navigation Link : Migrate to Text-Align Block Support * Fix Unit Test * Fix Unit Test * Fix: Lint Error * Updated Unit test data * Check unit test issue Co-authored-by: shail-mehta <shailu25@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
* Post Navigation Link : Migrate to Text-Align Block Support * Fix Unit Test * Fix Unit Test * Fix: Lint Error * Updated Unit test data * Check unit test issue Co-authored-by: shail-mehta <shailu25@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
* Post Navigation Link : Migrate to Text-Align Block Support * Fix Unit Test * Fix Unit Test * Fix: Lint Error * Updated Unit test data * Check unit test issue Co-authored-by: shail-mehta <shailu25@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
Part of #60763
Migrates the
Post Navigation Linkblock to use the textAlign block support instead of a customtextAlignattribute. As a consequence it also enables global styles support fortextAlignfor thePost Navigation Link.Why?
The
Post Navigation Linkblock currently implements its own text alignment logic with a custom align attribute, duplicating code that should be handled by the centralizedPost Navigation Linkblock support. This migration reduces code duplication and consolidates alignment handling across blocks.How?
Replaces the custom logic with the block supports, adds deprecation and fixes transforms.
Testing Instructions
Post Navigation Linkblock and test text alignment (left, center, right)Post Navigation Linkblocks that have alignment set