Repository navigation
Conversation
The document detail page example used render={<span />} and
render={<p />} in four places. The app-shell-patterns skill now says to
use render only to compose with another component, so the example uses
Text.span and Text.p. The rendered elements and classes do not change.
Refs tailor-inc/platform-planning#2225
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppShell components passed a plain h1-h6, p, span, or div to Text's render prop in 43 places. They now use Text.h1 to Text.h6, Text.p, Text.span, and Text.div with the same explicit variant, so the rendered element and classes do not change. This removes the 13 jsx-a11y/heading-has-content disable comments. render stays for Base UI parts, other components, and other elements. The component-design reference and the decision record follow the same rule. Refs tailor-inc/platform-planning#2225 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Seven element components passed the same role as their default (Text.h1 heading-lg, Text.h3 heading-sm, Text.p and Text.div body-md, Text.span label-md). Drop it, as the docs examples do. The rendered classes do not change. The component-design reference now says to write variant only when the role differs from the element's default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IzumiSy
reviewed
Oct 29, 2026
Contributor
There was a problem hiding this comment.
I felt changes in this PR are all internal changes, and visual changes are already shipped earlier, right?
If so we don't have to have changeset. Consumers won't do anything reading this. What do you think?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use the
Textelement components (added in #654) where AppShell passed a plain HTML element torenderonly to choose the element.jsx-a11y/heading-has-contentdisable comments.app-shell-patternsskill: 4 places. feat(text): add element components Text.h1 to Text.h6, Text.p, Text.span, and Text.div #654 changed the skill rule to "userenderonly to compose with another component", and this example is part of the same skill..agents/references/component-design.md: the typography rule and the "Good" example use the element components.decisions/typography-roles.md: the fourth change records this change, and the lint items of the second and third changes note what remains.Refs tailor-inc/platform-planning#2225 (part of tailor-inc/platform-planning#2214).
No change in rendered output
Each place keeps its role. It writes
variantonly where the role differs from the element's default (36 places). In the other 7 places, the default is the same role, sovariantis omitted, as in the docs examples. Adata-slotor other attribute on the render element moves to the element component, where it still wins overdata-slot="text".I checked this in three ways:
document.bodyat the end of each test onmain(eee5b85) and on this branch (ee6ff42), and compared them. 2,524 of 2,541 tests rendered the same HTML. In 15, the only difference is the numbers of auto-generated Base UI ids (for example,base-ui-_r_a_andbase-ui-_r_c_). The ids are renumbered one to one, and where another element refers to an id, the reference changes with it. In the last 2 (a Dialog test and theField.Errortest ofText), the only difference is thedata-starting-styleattribute that Base UI sets for one frame. This depends on timing: theField.Errortest showed it in 1 of 6 runs on the same code, and the Dialog files do not import any file that this PR changes. 40 of the 43 changed places are rendered by these tests.render={<p />},render={<h1 />}, orrender={<div />}with no attributes. A temporary test showed that each pattern used here renders the same DOM in the old and the new form.distare byte-for-byte the same as onmain.I did not commit the temporary tests. The existing snapshot tests also pass without changes.
What keeps
renderBaseDialog.Title,Drawer.Title,BaseField.Error, andLink.dt,dd,code,pre,caption,address, anda.renderon components other thanText, such asTooltip.TriggerandSidebarMenuButton.Checks
pnpm fmt:check,lint,type-check,test,build, anddocs:checkpass locally.🤖 Generated with Claude Code