Repository navigation
Fit a small control in every 36 row, put controls and text on one size scale and release Equality 7.0.0 - #247
matthewmr-eqty wants to merge 37 commits into
Conversation
Need: rows and icon buttons should read one set of shared sizes before the 7.0.0 row work builds on them. Problem: icon buttons drew their own icon sizes, rows pulled avatars and icon buttons into their padding, and every table was striped. Solution: icon buttons read the control icon sizes, extra-small included; rows pull nothing; body rows draw a faint line and `striped` brings the fill back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry row Need: tables and menus should hold an avatar, badge or ⋮ without growing, and some tables need more room per row. Problem: row padding was set by the line of text, so anything taller than the text made the row taller. Solution: rows pad to fit a small control and stay 36; TableContainer takes `density="comfortable"` for 44 rows and a 44 header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: a badge beside text should sit level with it, in a 20 row or a larger heading. Problem: the default badge was a fixed 20 whatever the text around it. Solution: the new default size `line` is as tall as the line it sits in, and 20 where the browser can't measure the line; `sm` and `md` stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nitials Need: an avatar in a row should sit level with its text, and a larger avatar should match the control beside it. Problem: avatar sizes were their own ladder, so rows and cards needed sizes picked by eye, and initials crowded the small ones. Solution: the new default `line` is as tall as the line it sits in; `xs` to `lg` match the control heights; one initial shows at line, xs and sm, two at md and lg. `xl` is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Equality 7.0.0 Need: teams upgrading to 7.0.0 should know which avatar size to pass, when to leave Badge and Avatar sizes off, and when a table should be comfortable. Problem: the docs, skill and changelog still described the old avatar sizes and fixed-height badges. Solution: the pages and skill say when to pass each size and when to use comfortable rows; the changelog maps every old avatar size to its new name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: an avatar in a narrow table column should stay a circle, and the docs and changelog should match how 7.0.0 rows behave. Problem: a row avatar could shrink into an oval, the Table page still said an icon button overhangs the row's padding, and the changelog didn't say wrapped rows got shorter. Solution: avatars never shrink, the Table page says a row has room for a default icon button, and the changelog gives the new wrapped-row height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a copy button Need: a table header or badge whose text wraps should stay readable, and teams should know when an ID in a table needs its own copy button. Problem: the header and the line badge had a fixed height, so wrapped text spilled out of them, and the docs had no rule for copy buttons in cells. Solution: both grow with their text like body rows do; the Table page and skill say to show an ID as plain text unless nothing else in the row can copy it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…king changes Need: teams upgrading to 7.0.0 should learn from the changelog everything that breaks their build or changes how a page draws. Problem: the changelog left out the removed row overhang utility and listed Badge's new default as an addition, and the height guard skipped every Badge size. Solution: the changelog says the overhang utility fails the build and the bare Badge now follows its line; the guard skips only the line badge's 20px fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atars on the line Need: teams placing an avatar should know which size fits a list, a card header or a field naming one person. Problem: the docs put every card avatar at 24, and the upgrade table moved the old 24 to the same size outside rows. Solution: avatars in a list or row take no size, even inside a card; a person shown on their own takes `md`; `xs` is only for beside an extra-small control. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: a badge beside a heading or in a sentence should sit on that line, at its height. Problem: the line badge was a block-level box, so in a paragraph it broke onto a line of its own; the docs also showed the default avatar at 24 instead of a row's 20. Solution: the line badge is inline and aligns to the top of its line, so it fills the line without making it taller; the docs demo avatars in small text and the changelog describes the badge without fixed numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: status icons such as ControlStatusBadge's should sit in the middle of their badge beside text of any size. Problem: in a line taller than 20 the icon-only badge grew to fit the line, but its icon stayed at the left edge. Solution: an icon-only line badge centres its icon both ways, at the same icon size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: a status marker such as ControlStatusBadge's icon should stay one size beside text of any size. Problem: an icon-only badge with no size followed its line, so it grew beside larger text. Solution: an icon-only badge with no size draws as the medium badge, 20 with its icon centred; text badges still follow their line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: apps choose badge sizes on purpose, so upgrading to 7.0.0 should leave every badge as it is. Problem: 7.0.0 changed Badge's default to follow its line of text, which moved badges apps had already placed. Solution: Badge returns to its 6.2.0 sizes and markup, and the docs, skill and changelog drop the line badge; a default Badge still fits a 36 row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: a profile or page hero needs an avatar larger than the large control. Problem: 7.0.0 dropped `xl`, so the largest avatar was 44. Solution: `xl` returns at 52, a default control with 8 on each side, with two initials; the upgrade table keeps the old 44 as `lg`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: 7.0.0 should add no shared size name that later releases would have to keep. Problem: the 52 name read as the shell size, which is 60 on touch screens, and nothing sizing the shell read it. Solution: xl works out 52 itself from the default control height until 52 joins the size scale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: a page or card title should line up with the controls beside it. Problem: control heights, line heights and text sizes were separate numbers, so nothing tied a title to a control. Solution: controls and four type roles read one scale, with text-title, text-section, text-body and text-caption utilities; Avatar xl and line size sit on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… new type roles Need: card headers, metric cards and section headings should match the sizes Studio already previews, so apps stop overriding them. Problem: the icon marks carried Icon's own padding and glyph size, and the titles used one-off text sizes. Solution: marks are now 28 and 36 circles with a 16 glyph, and the titles and descriptions read the section and body roles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: people building pages and agents in other repos should pick a text style that lines up with the controls beside it. Problem: nothing said when to use text-title, text-section, text-body or text-caption, and the skill still pointed every title at Heading. Solution: a Typography page, Section Heading guidance on descriptions and badges, skill rules and name translation rows, and the 7.1.0 changelog and version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… two headers Need: people pairing text-caption or text-title with a text colour, and apps passing a non-svg icon, get the intended look. Problem: cn read the new text styles as colours and dropped one of the pair; the glyph size rule only matched svg; the docs overstated the line heights and the live previews added extra headings. Solution: cn knows the text styles as sizes, the glyph rule targets the mark's child, docs say which steps match, previews use p. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: apps that merge classes with their own tailwind-merge use the four text styles beside a text colour. Problem: plain tailwind-merge reads text-title, text-section, text-body and text-caption as colours, so a text colour beside one removes it. Solution: the Typography page, the skill and the changelog say to register them as font sizes, with the snippet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: people building with Equality need to know which size a title, control, row or avatar takes, so parts line up. Problem: the scale was only in the code and scattered across component pages. Solution: a Sizing page lists the seven steps, what sits on each and when to use it, linked from Typography, the docs index and the skill; the merge snippets now list text-xxs too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry width Need: on a phone, a card's header should read as one line, like it does on a wide screen. Problem: in a narrow card the icon and "See All" shared the top row with nothing between them, and the title dropped to a line of its own. Solution: the icon sits beside the title at every width, "See All" stays at the end of the title's line, and a long title wraps beside the icon; the header is 28 when the title fits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: agents follow the Sizing page and changelog literally, so each claim has to hold. Problem: the page said no size may fall between steps though icons have their own, gave the touch rail a pixel value, and used "card header" for both a person's header and CardContentHeader. Solution: the page scopes steps to text lines, controls, rows and avatars, drops the touch value, names the two headers apart; the changelog says See All now follows the title for screen readers and keyboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: titles should read at sizes people expect, and still line up with the controls beside them. Problem: section and title lines were stretched to control heights (16 on 28, 24 on 36), which no other system does, and a section title over a description needed its own line height. Solution: section is 16 on 24 and title 28 on 36; CardContentHeader and SectionHeading centre the section line in a 28 row, and the docs, skill and changelog say rows centre text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: one scale every size comes from, so an app's plain text-sm is the same size as body and no value is Equality-only. Problem: the scale had a "line" step out of order, the title used a size Tailwind lacks, and Badge declared its own text size. Solution: steps run 3xs to xl in order; text styles and control labels read the same Tailwind sizes and steps (title 30 on 36); Badge reads the caption style, with no visible change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: agents read the Sizing page and skill literally, so the size-name rule has to list who follows it. Problem: they called Badge the one exception, though Icon, Switch, Checkbox and Timeline also use their own size names, and the scale comment said "pictures" where it meant boxes that aren't controls. Solution: controls and Avatar are named for their step, the other five are listed by name, and the comment names Avatar, Badge and the Timeline marker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: the Sizing page's ladder and table have to agree, since people read one against the other. Problem: the table put the section style at 24, but the ladder showed it only inside the 28 band. Solution: the 24 band holds the section line; the 28 band holds a section title's row, the line centred beside a small button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: anyone reading Equality's theme should tell raw values from the choices made with them. Problem: the scale sat in theme-decisions.css, so it read as a decision, and the rule that decisions never read decisions had no file to point at. Solution: theme-options.css holds the seven steps, with a scoped copy generated beside the decisions; decisions read options or Tailwind; a consumer-build test checks every step still resolves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: the decisions file should follow its own rule, and the docs should describe options and decisions as ideas an app can use. Problem: the list item's icon size read the default control's, a decision reading a decision under a header that forbids it, and the Sizing page and skill sent readers to file names they can't edit. Solution: it reads the 16 option directly, both file headers say a box that isn't a control may read an option, and the docs say "options" and "decisions" without naming files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: one way to size text, so apps and agents stop choosing between two names for the same size. Problem: the control font-size and line-height names equal the caption, body and section styles, and the Sizing page didn't say how options, decisions and components relate. Solution: the control text names are deprecated until the next major, the skill and changelog point to the text styles, and the Sizing page opens with the three rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: Studio and the docs should take one major for the scale work, not a major and a minor a day apart. Problem: the scale, text styles and component changes were built as 7.1.0 on top of an unreviewed 7.0.0. Solution: 7.0.0 carries them, with one changelog entry; the control text names are deprecated, and a later major removes them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ight Need: the deprecation note and skill must hold, since apps will swap one name for the other on its word. Problem: they said the control text names equal the text styles, but control labels are medium and the section style is semibold. Solution: they match in size and line height, and a label keeps its control's own weight, so a large label is text-section with font-medium. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This now includes the size scale and text styles (previously planned as 7.1.0), folded in before anyone had reviewed. The description and both before-and-after pages cover the whole release; the reviewer page has a new section on the scale and text styles. |
|
What is your thinking behind the non-striped table rows? What advantage do they have over striped rows? |
Need: an avatar showing a count such as "+3" should show all of it, and a screen reader should tell two people with the same first initial apart. Problem: the fallback cut any text to one or two characters, so "+3" showed "+", and screen readers heard only the shortened letter. Solution: only text made of letters is shortened; when it is, screen readers hear the full initials and the drawn letters stay as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: teams upgrading should learn every change that moves their own rows or icons. Problem: the changelog left out that the row padding utility halved and that IconButton's icon size now beats a className size; the skill gave two label weights and the Sheet example left its header avatar unsized. Solution: the changelog says both and how to keep the old look, the skill gives medium labels at every size, the Sheet header avatar is `md`, and the Avatar page says counts show whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Need: initials given with a space, such as "A C", should still draw two letters at md and above. Problem: the space counted as a character, so "A C" drew "A " at md and lg. Solution: spaces are left out of the drawn letters; screen readers still hear the initials as given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tmccoy14
left a comment
There was a problem hiding this comment.
Thanks for this. Putting controls and text on one size scale is a real step forward. Removing control-row-overhang, so rows no longer clip an avatar that's pulled into their padding, fixes a real problem. The upgrade table for avatar names that still compile but now draw at a different size is the right call. The CSS tests are thorough too: checking selector weight and the generated scoped theme files will catch the kind of drift that's easy to miss.
I know this is on hold while it's split into 6.3.0 / 6.4.0 / 6.5.0 / 7.0.0, so please read this as input for those PRs rather than a request to change this one. I've marked where each point would land. I ran pnpm build, pnpm test (382 / 218 / 8), pnpm lint and pnpm format:check on 003abe4; all passed and the build left the tree clean.
Decisions to settle before the tables release (6.4.0)
- Line vs stripes by default. I'd also like an answer in the thread to the earlier question about what the default line gains over stripes. This changes every existing table, including every markdown table on the docs site through
TableBridge, so it's worth agreeing on before release rather than leaving it to the reviewer page. - Docs prose tables (
packages/docs/src/runtime/components/TableBridge.astro:16): withcontrol-row-paddingat 4 instead of 8, a wrapped prose row (the "Use it" column inavatar.mdx, for example) has 4px of space above and below its text. I haven't checked this visually. If it reads as cramped, passingdensity="comfortable"inTableBridgewould bring back 8px for prose tables only.
Smaller suggestions
CHANGELOG.md: ignoring a consumer's[&_svg]:size-*onIconButtonsilently undoes their override. Consider listing it under Breaking (6.x → 7.0.0 avatars/rows PR).CHANGELOG.md"Added": apps can now read the new--eq-type-*,--eq-control-xs-icon-sizeand--eq-row-divider-color. Worth listing them.card-content-header.module.css:7-13andmetric-card.module.css:21-27both use stacked.x.x.x.xselectors to outrankIcon's styles. A size option (or a CSS variable) onIcon's circle background would stop both from breaking whenIcon's selectors change.table-components.module.css:57: the footer still usesborder-t, which adds 1px, while the header and rows moved to::afterlines to stay on the 36 scale. Could the footer match, or is there a reason it differs?table-components.module.css:103-104: the stripe and selected-row selectors weigh the same (0,3,0), so the selected row wins only because it comes later in the file. The comment could say order matters, so nobody moves them apart.avatar.tsx:46: initials likeO'BorA-Cskip shortening and show in full, which overflows alineavatar. Allow'and-, or document it.
Generated by Claude Code
| } | ||
|
|
||
| .command-dialog-content-inner { | ||
| @apply [&_[cmdk-item]_svg]:size-5; |
There was a problem hiding this comment.
Removing this shrinks icons in CommandDialog items from 20 to 16. The test this replaces was named "so 6.2.0 moves nothing there", so holding the change for a major looks deliberate, but the 7.0.0 changelog doesn't mention it. The PR says things match pixel for pixel where the changelog says nothing moves, so could you add a "Changed" line, something like "CommandDialog item icons are 16, from 20, the same as Command"?
Generated by Claude Code
| const letters = text.replace(/\s+/g, ''); | ||
| const graphemes = segmenter | ||
| ? Array.from(segmenter.segment(letters), ({ segment }) => segment) | ||
| : Array.from(letters); | ||
| if (graphemes.length <= count && letters === text) return { drawn: text, full: text }; | ||
| return { drawn: graphemes.slice(0, count).join(''), full: text }; |
There was a problem hiding this comment.
This keeps the first N letters once spaces are removed, not the first letter of each word. So if someone passes a name instead of initials, "José Díaz" draws "Jo" at md/lg/xl rather than "JD". (I ran it on its own; "J D" correctly gives "JD".) The docs do say to pass initials, but passing a name is an easy mistake. Before, it showed in full; now it turns into wrong initials with no warning. When the text has spaces, would it make sense to take the first grapheme of each word, and add tests for a full name at md and line?
Generated by Claude Code
Review focus
The reviewer page walks through each change and why. The risk is in the avatar sized to its line (
1lh).Need
A table row with a ⋮, an avatar or a badge should stay 36 without pulling anything into its padding, and a heading or card title should line up with the controls beside it. Today an avatar is pulled into the padding, so a cell that hides overflow clips it, and Studio lines up headings by hand.
Change
density="comfortable"makes rows and header 44.line, as tall as its line: 20 in a row. Sizes match the controls (xs24 tolg44), plusxl52.stripedbrings the fill back. IconButton icons are 16 and 20.text-title,text-section,text-bodyandtext-caption, each a Tailwind size on a step. Rows centre their text. CardContentHeader, MetricCard and SectionHeading use them.Breaking: avatar sizes, and the removed
control-row-overhangutility. The changelog has the upgrade table and the tailwind-merge note.Evidence
pnpm build,pnpm test(Equality 382, docs 218, site 8),pnpm lint,pnpm format:checkpass. A high-effort code review found six issues (Avatar shortening counts like +3, screen readers hearing one initial, two missing changelog lines, a demo, label weight); all are fixed in the last three commits.1lh. Matthew reviewed it live.Not covered
^7.0.0), then TitleBlock and HeroCard in a later release.🤖 Generated with Claude Code