Repository navigation
Open
Labels
[Package] Block editor/packages/block-editor[Package] Edit Site/packages/edit-site[Type] EnhancementA suggestion for improvement.
Description
Now that the required tooling is in place (#64340) and has been allowlisted, we can start applying consistent text styling across the site and block editor. This can be done by replacing instances of __experimentalText and __experimentalHeading, as well as any ad hoc styled text, with the Text component from the UI package.
Note
This todo list with generated with AI assistance and may not be 100% exhaustive.
Migrate existing __experimentalText / __experimentalHeading to @wordpress/ui Text
edit-site
- Add template suggestion rows —
add-new-template/add-custom-template-modal-content.jsusesTextfor suggestion titles, no-results, instructional paragraphs, button labels. - Add template list item —
add-new-template/index.jsusesTextfor template titles. - Pagination —
pagination/index.jsusesText variant="muted"for totals and page indicator. - Legacy add template —
add-new-template-legacy/*mirrors the above.
block-editor
- Block card description —
block-card/index.jsusesTextfor block description. migrated __experimentalText, __experimentalHStack, and __experimentalVStack to Text and Stack #78155 - Block switcher bindings hint —
block-switcher/index.jsusesTextinsideMenuGroup. - Block patterns paging —
block-patterns-paging/index.jsusesText variant="muted"for counts/page. - Inspector popover header —
inspector-popover-header/index.jsusesHeading+Text. - Block bindings —
hooks/block-bindings.jsusesText as="div" variant="muted". - Attribute control —
block-bindings/attribute-control.jsusesText truncate/variant="muted". - Block styles menu items —
block-styles/menu-items.jsusesText as="span"withtruncate/limit. - Pattern overrides dropdown —
block-toolbar/pattern-overrides-dropdown.jsusesTextfor description. - Allowed blocks modal —
block-allowed-blocks/modal.jsusesTextfor intro copy. - Pattern category previews —
inserter/block-patterns-tab/pattern-category-previews.jsusesHeading+Text. - Shadow panel —
global-styles/shadow-panel-components.jsusesHeading level={5}. - Sidebar navigation screen title —
sidebar-navigation-screen/index.jsuses__experimentalHeadingwithsize,level, and inlinecolor.
Text component migrations
edit-site
- Welcome guide headings + body copy —
editor.js,page.js,template.jsuse raw<h1>+<p>with BEM classes (edit-site-welcome-guide__heading/__text). Migrate toHeading+Text. - Save panel copy —
save-panel/index.jsuses<p>wrappingsprintftheme-activation text. Migrate toText as="p". - Sidebar navigation screen description —
sidebar-navigation-screen/index.jsrenders thedescriptionprop in a<div>. Migrate toText. Fixes all routes using this screen (stylebook, main nav, etc.). - Pattern sync status label —
page-patterns/fields.jsuses<span>with class-based sync status styling. Migrate toTextwith appropriate variant. - Pattern author name —
page-patterns/fields.jsuses<span className="fields-controls__author-name">. Migrate toTextwith truncation. - Template author name —
page-templates/fields.jsduplicates the author name<span>pattern. Migrate toTextwith truncation. - Site hub title —
site-hub/index.jsstyles the site title via SCSS (font-size, weight, color, manual ellipsis). Migrate toTextwith truncation prop.
block-editor
- Layout constrained helptext —
layouts/constrained.jsuses<p className="…__layout-constrained-helptext">. Migrate toText. - Grid layout help —
layouts/grid.jsuses<p className="components-base-control__help">. Migrate toText. - Block hooks helptext —
hooks/block-hooks.jsuses<p className="…__block-hooks-helptext">. Migrate toText. - List view no blocks message —
hooks/list-view.jsuses<p className="…__no-blocks">. Migrate toText. - Duotone control description —
duotone-control/index.jsuses plain<p>for explainer. Migrate toText. (Duplicated inglobal-styles/filters-panel.js— centralise.) - Duotone filters panel description —
global-styles/filters-panel.jsduplicates the same<p>explanation. Migrate toTextand share with duotone control. - Link control help —
link-control/index.jsuses<p className="…__help">. Migrate toText as="p"(preserveidforaria-describedby). - Media preview modal copy —
inserter/media-tab/media-preview.jsuses two<p>elements for external-image warning. Migrate toText. - Block visibility modal descriptions —
block-visibility/modal.jsuses multiple<p className="…__description">withcreateInterpolateElement+<strong>. Migrate toText. - Block removal warning modal —
block-removal-warning-modal/index.jsuses<p>+<strong>for warning copy. Migrate toText. - Block navigation label —
block-navigation/dropdown.jsuses<p className="…__label">. Migrate toText. - Warning message —
warning/index.jsuses<p className="…__message">. Migrate toText. @kushagra-goyal-14 Refactor warning component to use Text component #78094 - Text indent control help —
text-indent-control/index.jsuses<p className="components-base-control__help">. Migrate toText. - URL popover description —
url-popover/image-url-input-ui.jsuses<p>+<p className="description">. Migrate toText. - Link preview info —
link-control/link-preview.jsuses<span className="…__preview-info">+ error span. Migrate toTextwith appropriate variant. - Block card name —
block-card/index.jsuses<span className="…__name">. Migrate toText. - Variation picker label —
block-variation-picker/index.jsuses<span className="…__variation-label">. Migrate toText. - Media replace flow label —
media-replace-flow/index.jsuses<span className="…__image-url-label">. Migrate toText. - Block fields link title —
hooks/block-fields/link/index.jsuses<span className="…__link-title">(long URLs — truncation candidate). Migrate toTextwith truncation. - Block fields media title —
hooks/block-fields/media/index.jsuses<span className="…__media-title">(has existing TODO about truncation). Migrate toTextwith truncation. - Multi-selection card title —
multi-selection-inspector/index.jsuses<div className="…__card-title">. Migrate toTextorHeading. - Pattern list item titles —
block-patterns-list/index.jsuses<div className="…__item-title">. Migrate toText. @kushagra-goyal-14 Migrate pattern list item titles to Text from @wordpress/ui #77656 - Pattern transformations title —
block-switcher/pattern-transformations-menu.jsuses<div className="…__item-title">. Migrate toText. - Pattern setup title —
block-pattern-setup/index.jsuses<div className="…__item-title">. Migrate toText. - Patterns filter help —
inserter/block-patterns-tab/patterns-filter.jsuses<div className="…__patterns-filter-help">for a body paragraph. Migrate toText as="p".
Heading component migrations
block-editor
- Block compare heading —
block-compare/block-view.jsuses<h2 className="…__heading">. Migrate toHeading. - Inserter panel title —
inserter/panel.jsuses<h2 className="…__panel-title">. Migrate toHeading. - Block fields header title —
hooks/block-fields/index.jsuses<h2 className="…__header-title">(one branch wrapsTruncate). Migrate toHeading.
Reacted by Yash Jawale, Aditya Singh, Shreya, Gautam Mehta, Kushagra Goyal, Shivam Jha, Saransh Sinha, RITHESH S, Tushar Bharti and Sukhendu Sekhar Guria
Metadata
Metadata
Assignees
Labels
[Package] Block editor/packages/block-editor[Package] Edit Site/packages/edit-site[Type] EnhancementA suggestion for improvement.
Activity
kushagra-goyal-14 commentedon Apr 20, 2026
Hi @jameskoster
I’m working through the migration of
block-bindings/attribute-control.jsand had some questions as it usestruncate,variant="muted", andisDestructiveon__experimentalText, none of which have direct equivalents on the newText.__experimentalTruncateviaText'srenderprop the expected interim pattern, or is there a preferred alternative already?--wpds-color-fg-content-neutral-weak, or is there a shared utility I've missed?@wordpress/uiButton: undodestructivetone variant #74540 scoped destructive out of generalButtonuse, should invalid-binding text still render in error color, or is a different treatment preferred?jameskoster commentedon Apr 20, 2026
@kushagra-goyal-14 I think truncation is a feature we should add to
Text, so we might consider any instances dependent on that blocked for now.That's the right token, but let's got a confirmation from @WordPress/gutenberg-components.
Probably okay to maintain roughly the same appearance for now, using a token from the Theme package.
--wpds-color-fg-content-errorshould be available.aduth commentedon Apr 20, 2026
Related: #77391
mirka commentedon Apr 20, 2026
Personally I don't think it's a given that truncation features should be included in
Textdirectly, so I wouldn't necessarily block for that.If we're talking about local styles in
edit-siteandblock-editor, I don't think they're using CSS modules anywhere yet. I think it's fine to stick to normal Sass stylesheets until someone decides to modernize the CSS strategies in those packages.kushagra-goyal-14 commentedon Apr 21, 2026
Thanks for the clarification @mirka . I'll use a Sass stylesheet rather than a CSS module for attribute-control.js. Noted that the truncation question isn't settled; I'll wait for a resolution before proceeding on that file.
ciampo commentedon Apr 30, 2026
@saranshsinhaa @kushagra-goyal-14 @Sukhendu2002 please coordinate your efforts before opening many PRs to make sure you don't overlap on the same item. You may even add your name next to the single bullet point in this issue's description to claim ownership.
mirka commentedon Apr 30, 2026
Note that in most situations we're going to need before/after screenshots and testing instructions for review.
Another point is that if there are any differences between the existing typography design and the replacement
Textvariant, a lot of those are going to require design decisions as to whether we need to keep the exception or we can consolidate to the standardTextvariant.ciampo commentedon Apr 30, 2026
I'm also going to add that we'll have to close PRs that don't meet those requirements. Reviewing and testing changes can take a considerable amount of time; the least PR authors should do is to prove that they tested their changes in the browser before asking for a review (instead of just throwing an AI agent at the problem), providing screenshots and testing instructions.
Absolutely. I anticipate there will be many of those decisions. My preference would be to always use one of
Textpresets, which will help ensure a more consistent approach to typography throughout the editor — but we'll realisticaly often need design feedback (more than code feedback).kushagra-goyal-14 commentedon May 8, 2026
Can a maintainer please add my name to the following items in the description, as I don't have access to add that?
I have PRs open for both:
Warning message
(warning/index.js)— #78094Pattern list item titles
(block-patterns-list/index.js)— #77656Thanks!