Migrate pattern list item titles to Text from @wordpress/ui#77656
Conversation
|
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. |
|
As mentioned in #77265 (comment), please update the PR description to include more details (especially around testing instructions) and a comprehensive before/after screenshots. |
|
Hi @ciampo, I’ve updated the PR description to include detailed testing instructions and added a section for before/after screenshots. Also, since the |
|
From the “After” screenshot alone, I’m wondering why the height is 18.2px. Based on the |
@jameskoster, you’re right, as it looks like the issue was due to caching when I captured the earlier “after” screenshot, which is why the height appeared incorrect. Updated with a fresh one, and now it correctly reflects the applied changes (including the expected classes and styles). |
| <div className="block-editor-block-patterns-list__item-title"> | ||
| <Text | ||
| render={ <div /> } | ||
| className="block-editor-block-patterns-list__item-title" |
There was a problem hiding this comment.
Is this an ad hoc override, or a redundant font size style, or is the Text variant wrong?
There was a problem hiding this comment.
Thanks for catching that @mirka . I checked both variants:
body-sm: 12px font-size, 16px line-height, removes CSS override entirely.
body-md: would require keeping the CSS override, with 20px line-height.
Since the original font styling was effectively 12px and the original height of the div was 18.2px, I am leaning towards body-sm for a clean look. Please share your thoughts if that works.
There was a problem hiding this comment.
Thanks, made the changes.

What?
Part of: #77265
Migrates pattern list item titles in
block-patterns-list/index.jsfrom a<div>to theTextcomponent from@wordpress/ui.Why?
This change is part of the ongoing effort to standardize typography across the editor using shared primitives from
@wordpress/ui. Replacing ad hoc elements withTextensures consistency and alignment with the design system.How?
<div className="block-editor-block-patterns-list__item-title">with<Text>Testing Instructions
Open the block editor:
Open the Inserter (➕ button) and switch to the Patterns tab.
Verify the following:
Inspect the DOM
Screenshots
Before
After
Use of AI Tools