Repository navigation
feat(ui): release 6.5.0 with TitleBlock - #252
Conversation
tmccoy14
left a comment
There was a problem hiding this comment.
Nice work on this one. TitleBlock fills a real gap. Sizing blocks by what they hold, with the mark setting the height, is easy to explain, and moving CardContentHeader, SectionHeading and MetricCard onto the text styles removes a lot of drift. CardContentHeader's "See All" also gets better for assistive tech: it now comes after the heading in DOM order and is named by it ("See All Activity Logs"), and the name still contains the visible label. The docs, the skill's translation table and the changelog are thorough.
I built the docs and measured the pages at 1280 and 360px. Blocks come out at 28/36/44 with marks of 28/36/44. Badges and buttons centre on the block, and a long title wraps beside the mark. Card Content Header shows a 28 circle with a 16 icon. MetricCard's circle is 36 with a 16 icon. The skeleton matches its block's height. pnpm build, pnpm test (359), lint and format all pass locally. Nothing here blocks merging. My main concerns are below and inline.
Worth addressing before merge
- Tests don't cover the geometry this release is about.
title-block.test.tsxchecks how the mark gets its size and the DOM order, but nothing checks the 28/36/44 sizes, the padding math, or that the overrides beat Icon's padding. The repo already has a pattern for this (compile-css.ts+ruleBody, as inicon-size-css.test.ts).CardContentHeader's behaviour changes also have no tests: the "See All {heading}" name, the button coming after the heading, noaria-labelwithout a heading, and renderingnullwith no props. The same goes forTitleBlockSkeleton, the skipped empty title row, and MetricCard's 36/16 circle. - The overrides that out-rank Icon's padding are fragile (see inline). The same trick appears in
card-content-header.module.css:3-6andmetric-card.module.css:20-27.
Smaller suggestions
title-block.tsx:66,73:title && …anddescription && …on aReactNodeprint a stray0fordescription={0}and droptitle={0}. Checking!= null && !== falseavoids that.TitleBlockSkeletonandTitleBlockMarkdon't pass throughrefor other HTML attributes the wayTitleBlockandIcondo, so an app can't addaria-busy,data-testidorstyle.- The PR body says "every block sits on the size scale", but that only holds with a mark.
lgwith a description and no mark is 40, because the padding rule needs.with-mark, andmdwith onlytrailingis 20. Either qualify the sentence or add the padding for blocks without a mark, if 44 is what you want. - The
SKILL.mdrow "Card or section title beside a small button" now lists four options with no hint of which to pick. A short rule would steer agents better: Card Content Header for a card's top, Section Heading for a page section,TitleBlock size="sm"when it also needs a badge or description. CardContentHeaderProps.classNameis the only prop without a doc comment.- The changelog dates 6.5.0 the same day as 6.4.0. Since both are queued behind #251, it'll probably need re-dating when it's released.
Generated by Claude Code
3d79c72 to
d683ff0
Compare
captjt
left a comment
There was a problem hiding this comment.
Safe to merge: TitleBlock measures 28, 36 and 44 as described, and CardContentHeader keeps its props, its h3 and its null case while See All now follows the heading and is named by it. The three notes below are worth a follow-up: size rules that reach into a nested block, a busy block that squeezes its title to nothing on a phone, and docs examples with unnamed actions.
Non-blocking
- A TitleBlock or CardContentHeader placed in another block's
childrentakes the outer block's title size and padding instead of its own; details in the inline comment ontitle-block.module.css:114. - On a phone, a block with two badges and two actions, within the docs' own limit, squeezes its title to 0px wide and overflows the card; details in the inline comment on
title-block.module.css:55. - The Title Block docs teach a bare "See All" and "Edit" in
actions, the pattern this PR just fixed in CardContentHeader; details in the inline comment ontitle-block.mdx:104.
Checked at the head: pnpm build, pnpm test (353 ui tests) and lint pass, and the built docs pages were measured in headless Chromium at 1280 and 360px.
Merge risk: medium
Alignment: decent 👀
- No Linear issue is linked, so alignment is judged against the description alone.
- The description says every block sits on the size scale, but the padding rules need a mark or actions, so lg with a description and no mark comes out at 40 rather than 44:
equality/packages/ui/src/components/title-block/title-block.module.css
Lines 112 to 134 in d683ff0
- TitleBlockSkeleton documents a round avatar mark that no TitleBlock can render yet, since TitleBlockMark is always square and Avatar marks wait for 7.0.0:
- The PR targets release/equality-6.4.0 and depends on #251 merging first, and the 6.5.0 changelog entry carries the same date as 6.4.0:
equality/packages/ui/CHANGELOG.md
Line 5 in d683ff0
Impact: medium 👀
- Ships as a minor version, so apps on a ^6 range pick up the visual changes to CardContentHeader (circle 36 to 28, icon 20 to 16, title 18 to 16) without opting in:
- CardContentHeader's DOM is rebuilt on TitleBlock and See All moves after the heading, so any app styling its old internals through className or descendant selectors breaks.
- SectionHeading's title drops from 20 medium to 16 semibold on every page that uses it:
- MetricCard's icon shrinks from 20 to 16 across every dashboard that uses it:
Verification: decent 👀
- Tests check only the mark's size class and DOM order, not the 28/36/44 geometry or padding math, though the repo has a compiled-CSS test pattern for this: https://github.com/eqtylab/equality/blob/d683ff003abcb927c50ddc286c34786b4f565160/packages/ui/tests/title-block.test.tsx
- CardContentHeader's new behavior has no tests: the 'See All {heading}' name, the button after the heading, no aria-label without a heading, and returning null with no props:
- TitleBlockSkeleton, the skipped empty title row, SectionHeading's new sizes and MetricCard's 36/16 circle have no tests.
- The before-and-after evidence is a link to an external page rather than screenshots embedded in the PR, so it may not stay readable for every reviewer.
Rollback cost: low ✅
- Once 6.5.0 reaches npm through the main publish workflow, the version can't be withdrawn; undoing it means a revert and a 6.5.1 release, and consumers that adopt TitleBlock in the meantime would break on a removal.
Error detection: decent 👀
- Mark sizes rely on repeated-class selectors outweighing Icon's padding rule; if Icon's selector gains weight, marks silently grow from 28 to 32 with no test or warning:
- The same specificity override is repeated in CardContentHeader and MetricCard, so a change to Icon's CSS would shift three components unnoticed:
- Truthy checks on ReactNode silently drop title={0} and print a stray 0 for description={0}:
equality/packages/ui/src/components/title-block/title-block.tsx
Lines 66 to 73 in d683ff0
- No visual regression check exists, so layout drift in consumers surfaces only when someone looks at the page.
d683ff0 to
2703ce3
Compare
|
Thanks both. All of it is in this push: the round mark, compiled-CSS and behaviour tests, ref and attribute passthrough on |
2703ce3 to
2bd9ec2
Compare
Need: card, item and section headers need one way to set a title beside an icon, with status and actions placed the same everywhere. Problem: each header drew its own mark and title, at sizes off the scale, so a long title fell under its icon and controls reached above the block. Solution: TitleBlock, TitleBlockMark and TitleBlockSkeleton in three sizes; CardContentHeader is its small size; MetricCard and SectionHeading take the shared icon and section text sizes; Skeleton can be styled in one rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: people need to know when to use Title Block, Card Content Header or Section Heading, and what 6.5.0 changes on screen. Problem: there was no Title Block page, and the header pages, Sizing, Typography, the skill and the changelog described the old headers. Solution: a Title Block page with icon tiles, updated header and Skeleton pages, the 28 section-title row on Sizing, skill rows that route headers to Title Block, and a changelog that names each visible change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es match Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s end Need: a badge beside a button at the end of a title block should line up with it. Problem: trailing items sat on the title's first line while actions centred on the block, so a badge sat higher than the button next to it. Solution: trailing items and actions share one group at the end of the block, badges first, centred on the block; the skeleton matches, and the docs and changelog say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g the height Need: cards side by side should share one title size, a person or item should fit beside its mark, and a sentence should stay readable. Problem: md set its fact at body size, making 40 blocks beside a 36 mark, and lg used a 16 title that made neighbouring cards differ. Solution: md sets its fact as a caption in a 36 block, lg sets a 14 title over a 14 sentence centred in its 44 mark, sm is unchanged; the skeleton follows, and the description renders as a div so it can hold block content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: people choosing a TitleBlock size need to pick by content, not by where the block sits. Problem: the page, skill and changelog described sizes by placement, Long Title had no code, More Content had no demo, and two other pages overstated where centring applies. Solution: the size table says what each size holds and that only sm takes the larger title; Long Title gets code, More Content a demo; Card Content Header and Typography wording are corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… row Need: screen reader users moving between buttons should hear which card a See All opens, and a block with no title should render no empty row. Problem: every See All read the same two words, and TitleBlock rendered its title row even with no title. Solution: See All's accessible name adds the heading after the visible words, and the title row renders only with a title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he skeleton height claim Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: card headers should keep the round tinted icon people know from 6.4.0, at the size of the small title row. Problem: 6.5.0 moved the icon onto TitleBlockMark's square tile. Solution: the header renders Icon's overlay circle at the small mark size, 28 with a 16 icon, on TitleBlock's small row; no new props. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…zes in tests Need: CardContentHeader and apps that want a round mark, and reviewers who rely on tests for the sizes this release is about. Problem: `round` had no round mark, CardContentHeader copied the small size to draw its circle, the skeleton and mark dropped refs and HTML attributes, and nothing checked the mark sizes or that they out-rank Icon's padding. Solution: TitleBlockMark takes shape="round" and CardContentHeader uses it; the skeleton and mark forward refs and attributes; tests pin the 28/36/44 marks against Icon's rules, MetricCard's circle, and CardContentHeader's and the skeleton's behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…title Need: readers and agents choosing a title for a card or section, or a mark for a block. Problem: the skill listed four ways to title a card with no rule for picking one, and the docs called the skeleton's round mark an avatar that 6.5.0 can't draw. Solution: the skill gives a rule per case, and the docs describe TitleBlockMark's shape and the skeleton's round mark as a circle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…up on a phone Need: apps that put item blocks inside a section block, and blocks with several badges and actions on a phone. Problem: size rules reached into a nested block, so an sm block inside an md one grew to 40; and with two badges and two actions at 360 the title shrank to nothing and the block overflowed its card. Solution: size rules reach only the block's own parts, and the title keeps a minimum width while badges and actions wrap under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s wrap Need: screen reader and voice-control users on pages with a block per row or card. Problem: the examples and demos taught a bare "See All" and "Edit", the pattern CardContentHeader just fixed. Solution: the examples name each action by its title with the visible text first, Accessibility says to, and the page says actions wrap under the title when space runs out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2bd9ec2 to
673f484
Compare
Do not merge until #251 merges.
Need
Apps set a title beside an icon, with a line under it, on almost every card and section, and each builds its own: Studio has five. Their marks, titles and buttons drift, and a control often reaches above the block it sits in.
Problem
Equality had no part for a title beside a mark. CardContentHeader, MetricCard and SectionHeading each set their own sizes instead of using the text styles 6.3.0 added.
Change
TitleBlocksets a title beside a mark, with an optional description. Its sizes say what the block holds, and the mark sets its height:sma title alone (28),mda name and a short fact (36 mark, a 14 title over a 12 caption),lga title and a sentence (44 mark, 14 over 14). Neighbouring blocks share one title size, and every block with a mark sits on the size scale. A block nested in another keeps its own size. Badges intrailingand buttons inactionscentre together on the block, as in a table row, so nothing overhangs it; when space runs out, as on a phone, they wrap under the title instead of crushing it. A long title wraps beside the mark, never under it.TitleBlockMarkputs an icon on a square tile, or a circle withshape="round", sized by the block, andTitleBlockSkeletonholds its height while data loads.Skeletongainsdata-slot="skeleton"so an app can restyle every placeholder in one rule. CardContentHeader is now built on TitleBlock's small size and its round mark, with the same props, and its See All is named by its heading for screen readers. MetricCard's icon is 16, from 20; SectionHeading's title moves onto the section text style.What moves: CardContentHeader's icon sits in a 28 circle, from 36, at 16, from 20, beside a 16 semibold title, from 18; SectionHeading's title is 16 semibold, from 20 medium.
Third of four Equality releases split from #247. A TitleBlock with an Avatar as its mark waits for 7.0.0, where Avatar sizes take the block's size names.
Evidence
lgin its own PR.pnpm build,pnpm test(ui 375), lint and format pass.🤖 Generated with Claude Code