Skip to content

feat(ui): release 6.5.0 with TitleBlock - #252

Merged
matthewmr-eqty merged 15 commits into
mainfrom
release/equality-6.5.0
Nov 26, 2026
Merged

matthewmr-eqty merged 15 commits into
mainfrom
release/equality-6.5.0

Conversation

@matthewmr-eqty

@matthewmr-eqty matthewmr-eqty commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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

TitleBlock sets a title beside a mark, with an optional description. Its sizes say what the block holds, and the mark sets its height: sm a title alone (28), md a name and a short fact (36 mark, a 14 title over a 12 caption), lg a 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 in trailing and buttons in actions centre 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. TitleBlockMark puts an icon on a square tile, or a circle with shape="round", sized by the block, and TitleBlockSkeleton holds its height while data loads. Skeleton gains data-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

  • Before-and-after page, 6.5.0 section, light and dark.
  • Docs build: blocks measure 28, 36 and 44 with their marks; badges and buttons centre on the block; a long Card Content Header title wraps beside its 28 tile with See All centred on the block.
  • Guardian Studio on a local 6.5.0 build: configuration and hero specs pass, with the dashboard, metric cards and settings checked in light and dark, 267 passed and 0 failed. Studio's headers that hold a sentence move to lg in its own PR.
  • Tests pin the mark sizes and padding against Icon's rules, CardContentHeader's See All name and order, and the skeleton.
  • pnpm build, pnpm test (ui 375), lint and format pass.

🤖 Generated with Claude Code

@tmccoy14 tmccoy14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.tsx checks 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 in icon-size-css.test.ts). CardContentHeader's behaviour changes also have no tests: the "See All {heading}" name, the button coming after the heading, no aria-label without a heading, and rendering null with no props. The same goes for TitleBlockSkeleton, 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-6 and metric-card.module.css:20-27.

Smaller suggestions

  • title-block.tsx:66,73: title && … and description && … on a ReactNode print a stray 0 for description={0} and drop title={0}. Checking != null && !== false avoids that.
  • TitleBlockSkeleton and TitleBlockMark don't pass through ref or other HTML attributes the way TitleBlock and Icon do, so an app can't add aria-busy, data-testid or style.
  • The PR body says "every block sits on the size scale", but that only holds with a mark. lg with a description and no mark is 40, because the padding rule needs .with-mark, and md with only trailing is 20. Either qualify the sentence or add the padding for blocks without a mark, if 44 is what you want.
  • The SKILL.md row "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.className is 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

@matthewmr-eqty
matthewmr-eqty marked this pull request as ready for review November 25, 2026 20:21

@captjt captjt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 children takes the outer block's title size and padding instead of its own; details in the inline comment on title-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 on title-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:
    .size-md:not(.with-description):is(.with-mark, .with-actions) .line {
    padding-block: calc((var(--eq-control-md-height) - var(--eq-type-body-line-height)) / 2);
    }
    .size-lg {
    @apply gap-4;
    }
    .size-lg .title {
    @apply text-body font-semibold;
    }
    .size-sm .title > .placeholder-line {
    @apply h-(--eq-type-section-line-height);
    }
    .size-lg.with-description.with-mark .stack {
    padding-block: calc((var(--eq-control-lg-height) - 2 * var(--eq-type-body-line-height)) / 2);
    }
    .size-lg:not(.with-description):is(.with-mark, .with-actions) .line {
    padding-block: calc((var(--eq-control-lg-height) - var(--eq-type-body-line-height)) / 2);
    }
  • 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 mark's shape: a square tile, a round avatar, or none. */
  • 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:
    ## 6.5.0 - 2026-11-25

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:
    if (!heading && !onButtonClick) {
    return null;
    }
    return (
    <TitleBlock
    ref={ref}
    size="sm"
    className={className}
    mark={
    <Icon
    icon={icon}
    size="sm"
    background="circle"
    elevation="overlay"
    aria-hidden
    className={styles.mark}
    />
    }
    title={heading}
    actions={
    onButtonClick && (
    <Button
    variant="tertiary"
    size="sm"
    aria-label={heading ? `See All ${heading}` : undefined}
    onClick={onButtonClick}
    >
    See All
    </Button>
    )
    }
    {...props}
    />
    );
    }
    );
  • 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:
    .heading {
    @apply text-section;
    }
    .heading--row {
    padding-block: calc((var(--eq-control-sm-height) - var(--eq-type-section-line-height)) / 2);
    }
  • MetricCard's icon shrinks from 20 to 16 across every dashboard that uses it:
    /* Quadrupled class: it has to outrank Icon's circle padding, and a tripled one its glyph size */
    .icon.icon.icon.icon {
    @apply size-(--eq-control-md-height) p-0;
    }
    .icon.icon.icon > * {
    @apply size-(--eq-control-md-icon-size);
    }

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:
    if (!heading && !onButtonClick) {
    return null;
    }
    return (
    <TitleBlock
    ref={ref}
    size="sm"
    className={className}
    mark={
    <Icon
    icon={icon}
    size="sm"
    background="circle"
    elevation="overlay"
    aria-hidden
    className={styles.mark}
    />
    }
    title={heading}
    actions={
    onButtonClick && (
    <Button
    variant="tertiary"
    size="sm"
    aria-label={heading ? `See All ${heading}` : undefined}
    onClick={onButtonClick}
    >
    See All
  • 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:
    /* Quadrupled class: it has to outrank Icon's padding, and a tripled one its glyph size and square radius */
    .mark.mark.mark.mark {
    @apply p-0;
    }
  • The same specificity override is repeated in CardContentHeader and MetricCard, so a change to Icon's CSS would shift three components unnoticed:
    /* Quadrupled class: it has to outrank Icon's padding, which would make the circle 32 */
    .mark.mark.mark.mark {
    @apply size-(--eq-size-sm) p-0;
    }
  • Truthy checks on ReactNode silently drop title={0} and print a stray 0 for description={0}:
    {title && (
    <div className={styles.line}>
    <Title id={titleId} className={styles.title}>
    {title}
    </Title>
    </div>
    )}
    {description && <div className={styles.description}>{description}</div>}
  • No visual regression check exists, so layout drift in consumers surfaces only when someone looks at the page.

Claude Code (Opus 5.5) on behalf of @captjt · checked by Claude Code (Opus 5.5)

@matthewmr-eqty

Copy link
Copy Markdown
Contributor Author

Thanks both. All of it is in this push: the round mark, compiled-CSS and behaviour tests, ref and attribute passthrough on TitleBlockMark and TitleBlockSkeleton, a rule in the skill's card-title row, the doc comment, nested blocks keeping their size, wrapping on a phone and named actions. The description now says only blocks with a mark sit on the scale. A 0 as title or description stays for 7.0.1: every slot and the skeleton test truthiness, so it isn't a two-line fix. The changelog date gets set on the merge day.

Base automatically changed from release/equality-6.4.0 to main November 26, 2026 03:11
matthewmr-eqty and others added 11 commits November 25, 2026 22:11
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>
matthewmr-eqty and others added 4 commits November 25, 2026 22:11
…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>
@matthewmr-eqty
matthewmr-eqty merged commit 05159c7 into main Nov 26, 2026
1 check passed
@matthewmr-eqty
matthewmr-eqty deleted the release/equality-6.5.0 branch November 26, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants