Repository navigation
feat(ui): release 6.3.0 with text styles, size steps and a 60 nav rail - #250
Conversation
Need: apps should size text and custom marks from the same steps Equality's controls use, without hand-written line heights. Problem: sizes were spread across control decisions as raw values, and text had no styles that line up with controls. Solution: an options file holds seven size steps, decisions read them, and text-title, text-section, text-body and text-caption pair a Tailwind size with a step; nothing moves on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: people need to know which text style and size step to reach for, and that the control text names are on their way out. Problem: the new options and text styles had no pages, no skill guidance and no release entry. Solution: Typography and Sizing pages, linked from the docs home and the skill; the skill teaches the text styles and the tailwind-merge setup; the changelog adds them and deprecates the control text names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tmccoy14
left a comment
There was a problem hiding this comment.
Nice work on this. Moving the scale into its own options file, with control heights and line heights reading it, is a clean split. Building the four text styles on Tailwind sizes means text-sm and text-body really are the same thing. The consumer-build test that catches undefined theme variables is especially good to have. I ran the CI steps locally on 5968827 and got the same results: lint, format, build (generated files don't change) and tests (ui 325, docs 218 + 8) all pass. I also checked that the Badge padding and minimum sizes still work out to the same pixels.
Two things I'd like settled before this leaves draft (inline): how the deprecation reads while Equality's own controls still use those names, and keeping heading semantics when the skill steers titles to text-title and text-section.
Needs a decision, outside the diff: packages/demo/src/content/docs/components/heading.mdx:23 still shows <Heading as="h1">Page title</Heading>, which renders as text-4xl font-bold. Typography now says a page title is text-title, 30 semibold. Which should apply when? At least a link from the Heading page to Typography would help. Longer term, Heading could render the text styles.
Smaller, optional:
packages/ui/src/theme/theme-options.css:7: the comment names Avatar as an option reader, but Avatar still usessize-6/size-9/size-11. Either move Avatar onto the steps or drop it from the comment.--eq-size-xlis described as "the nav rail", but nothing reads it. The rail width is computed separately (nav.module.css:27:max(md-height, touch-target) + 16), so changing the step doesn't move the rail. Either call 52 "matches the rail" or tie the two together.packages/ui/src/theme/theme-decisions.css:12:--eq-list-item-icon-sizechanged fromvar(--eq-control-md-icon-size)to--spacing(4). It's the same 16px, but the list icon no longer follows the control icon size. A line in the PR body would help.build-decisions.js:scopeDecisionsandbuild:decisionsnow generate the options file too, so the names are a bit out of date.packages/ui/tests/type-utilities-css.test.ts: only the global entry is compiled. A matching test case fortheme.module.csswould cover the.rootscoped build too.packages/demo/src/content/docs/getting-started/sizing.mdx:10: the Overview opens with the options/decisions model, before saying what the page is for. It also says decisions "read only options", but they also read Tailwind (--theme(),--spacing()). Starting with the scale might read better.SKILL.md:73: "Page title level with its actions" → "Page title beside its actions".
Generated by Claude Code
Generated by Claude Code
Need: apps that set their logo over the rail's column, beside the rail's items. Problem: at 52 the rail left 8 either side of its 36 items, too tight a column for the logo above them. Solution: the rail is 60, or 68 on touch, and an app header keeps its own height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: readers building an app header beside the nav rail, and picking a step on the Sizing page. Problem: Nav told them to make the header as tall as the rail is wide, and Sizing put the rail on 52; neither holds for a 60 rail. Solution: Nav says the header keeps its height with the logo centred on the rail's column, and Sizing keeps 52 for a large picture or mark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
captjt
left a comment
There was a problem hiding this comment.
Safe to merge: the size steps and text styles compile to the same pixels as 6.2.0 in both the global and the scoped build, and only the rail moves, as the description says. Three notes on the guidance that ships with them: the rail and deprecation entries leave out what an upgrading app has to change, and the skill should keep titles on heading elements.
Non-blocking
- The rail entry leaves 6.2.0's advice to make the header 52 standing, and the rail's width exists only inside
.nav-rail, so apps can't line a logo up with it without copying thecalc; details in the inline comment onCHANGELOG.md:22. - Swapping the large control text names for
text-section, as the deprecation note says, turns a label semibold, and the--eq-type-*replacements for CSS readers are named nowhere; details in the inline comment onCHANGELOG.md:28. - +1 to tmccoy14's point on keeping heading elements with
text-titleandtext-section: This matters most in the skill, which other repos' agents install straight from main with no version.
At the head, lint, format, build and the tests (ui 325, docs 218 and 8) pass, the build leaves the generated files unchanged, and a compile of the scoped theme declares the size steps and text styles on .root.
Merge risk: medium
Alignment: decent 👀
- No Linear issue is linked; alignment is judged against the description alone, which names #247 as the parent it was split from.
- The title covers text styles and size steps but not the NavRail widening from 52 to 60 (68 on touch), the one change that moves on screen:
- The CHANGELOG deprecates the control font-size and line-height names and says to use the text styles, but nine components and theme-utilities.css still read them, so overriding the text styles doesn't change control labels:
- The list-item icon size no longer follows the control icon size (now a fixed 16). This drive-by change isn't mentioned in the description or the CHANGELOG:
- The options file says Avatar reads a step, but Avatar is unchanged and still uses Tailwind sizes:
Impact: medium 👀
- Every app using NavRail gets a rail 8px wider in a minor release. Apps that followed the old docs and sized their header to the rail's width (52, more on touch) lose the square corner:
- Control heights and line heights in the shared theme files, which every component reads, now resolve through a new options layer and a new import in both the global and scoped entries:
cnnow uses an extended tailwind-merge config, which changes class merging for every component that passestext-xxsor the new styles:equality/packages/ui/src/lib/utils.ts
Line 6 in 566248e
- New global utilities
text-title,text-section,text-bodyandtext-captioncan collide with consumer theme names, and apps that merge with plain tailwind-merge silently drop them next to a text colour unless they register them. - The published agent skill now steers other repos toward
text-titleandtext-section, and its demos put them on<p>, so heading semantics can be lost downstream:
Verification: decent 👀
- The 17-page layout comparison with 0 differences ran before the rail went to 60, and the evidence doesn't list before-and-after images of the rail at desktop or touch width, which is the one visible change.
- The consumer-build test only compiles the global entry. The scoped
.rootbuild that brings in theme-options-scoped.css isn't compiled: - The only rail test is a regex match on the compiled rail rule, with no check of how the rail and an app header render together:
- The visual evidence is a private claude.ai artifact, not embedded in the PR, so reviewers without access can't see it.
- The only earlier review, a comment, ran at 5968827, before the two nav commits.
Rollback cost: medium 👀
- Merging bumps packages/ui/package.json, so publish.yaml ships 6.3.0 to npm on push to main. Undoing it takes a follow-up release, not a revert:
- Once apps adopt
text-*styles,--eq-size-*steps or the tailwind-merge registration, removing them is a breaking change for those apps.
Error detection: decent 👀
- An undefined CSS variable fails silently in the browser, so a missing option in a consumer's scoped build would show up only as wrong sizes, and no scoped-build test guards it.
- When a consumer's own tailwind-merge drops a text style next to a colour class, the text quietly falls back to the inherited size, with no warning.
Need: apps that follow the deprecation and override the text styles, and the major that removes the control text names. Problem: Button, Input, Select and six other parts still read the deprecated names, so overriding a text style missed them and the removal would have been an unplanned migration. Solution: every Equality reader uses the text style with the same value, and a test compiles the scoped theme as well as the global one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the scale Need: agents and readers who copy the skill and the Typography page into apps. Problem: "takes text-title instead" read as instead of a heading element, the Heading page never pointed to the text styles, and Sizing opened with the options model before saying what it is for. Solution: the skill and Typography put title styles on an h1 to h6, Heading links to Typography, and Sizing opens with its purpose and the scale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: apps that line their header's logo up with the rail, and apps moving off the deprecated control text names. Problem: the rail's width lived only inside .nav-rail, so an app had to copy its calc or sit 4 off on touch screens; the deprecation named no CSS replacement and hid that text-section is semibold; the list icon had stopped following the control icon. Solution: --eq-nav-rail-width holds the width and the rail reads it; the changelog and Nav page tell apps to size the logo column with it, the deprecation names each --eq-type-* replacement and the weight, and the list icon follows the default control icon again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: readers swapping a label onto a text style. Problem: the page never said title and section are semibold, so a label moved to text-section turned bold unexpectedly. Solution: the overview says which styles carry a weight and to add font-medium for a medium label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks both. Everything above is in this push, and the title now names the rail. On the Heading page, it now points to Typography for a title beside controls; making |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need
Apps hand-pair a text size with a control's line height (
text-2xl leading-(--eq-control-md-height)) to line a title up with the buttons beside it, and build their own marks on pixel values. They need named text styles and named size steps, from the same scale Equality's controls use.Problem
Equality's sizes lived as raw values inside its control settings. It had no text styles that line up with controls, and nothing an app could build a custom mark on.
Change
NavRail is 60 wide, 68 on touch, so its 36 items have room on both sides. An app header keeps its own height, and a logo column above the rail takes the new
--eq-nav-rail-width, so it follows the rail. Seven size steps (16 to 52) now sit in their own options file. Equality's control heights and line heights read them, with the same values as before. Four text styles pair a Tailwind size with a step:text-title30/36,text-section16/24,text-body14/20 andtext-caption12/16. Equality's owncntreats them as font sizes; apps that merge classes with tailwind-merge register them the same way (the Typography page has the snippet). Badge and the small Timeline marker read the steps with the same pixels. The control text names are deprecated in favour of the styles and still work; Equality's own controls already read the styles, and the changelog names each replacement. New Typography and Sizing pages say when to use each, and the skill teaches them.This is the first of four Equality releases split from #247; the before-and-after page below lists the merge order. Only the rail moves on screen.
Evidence
mainand of this branch, at 1280: every element's box, font size, line height, weight and padding on 17 component pages (Button, Badge, Timeline, Table, Select, Icon Button, Card Content Header, Section Heading, Metric Card, Avatar, Input, Dropdown Menu, Tabs, Segmented Controls, Nav, Pagination, Command). 0 differences across about 10,000 elements. Repeated against 6.2.0 on all 61 component pages: only Nav's rail moves (52 to 60, 68 on touch) and the Heading page gains a link to Typography.pnpm build,pnpm test(ui 336, docs 218 and 8), lint and format pass.🤖 Generated with Claude Code