Skip to content

Term Name: Migrate to textAlign block support#76581

Open
huzaifaalmesbah wants to merge 1 commit intoWordPress:trunkfrom
huzaifaalmesbah:migrate/term-name-text-align-block-support
Open

Term Name: Migrate to textAlign block support#76581
huzaifaalmesbah wants to merge 1 commit intoWordPress:trunkfrom
huzaifaalmesbah:migrate/term-name-text-align-block-support

Conversation

@huzaifaalmesbah
Copy link
Member

What?

Part of #60763

Migrates the Term Name block to use the textAlign block support instead of a custom textAlign attribute. As a consequence, it also enables global styles support for textAlign on the Term Name block.

Why?

The Term Name block currently implements its own text alignment logic with a custom textAlign attribute and a manual AlignmentControl in the toolbar, duplicating code that should be handled by the centralized textAlign block support.

This migration reduces code duplication and consolidates alignment handling across blocks.

How?

  • Replaces the custom textAlign attribute and manual alignment logic with block supports.
  • Adds a deprecation entry to migrate existing blocks using the old textAlign attribute.

Testing Instructions

  1. Create a new Term Name block and test text alignment (left, center, right).
  2. Verify alignment works correctly in both the editor and the frontend.
  3. Open a post with existing Term Name blocks that have alignment set.
  4. Verify they migrate correctly (no console errors, no visual changes).
  5. Confirm the block is valid after migration by checking there are no block validation warnings in the console.

@github-actions
Copy link

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.

  • Required label: Any label starting with [Type].
  • Labels found: .

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.

@github-actions
Copy link

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: huzaifaalmesbah <huzaifaalmesbah@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the [Package] Block library /packages/block-library label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant