Repository navigation
Add a 32px field size (xxs) for toolbars - #229
Merged
Merged
Conversation
Field heights run a step above the button scale (xs 40px, s 48px, m 56px), so a dashboard toolbar could not be all small controls: the shortest field was as tall as an m Button. xxs is 32px, the height of a size="s" Button. - New `FieldSize` type (`TShirtSizes | "xxs"`) on Input, Textarea, Form and the field context; Select, NumberInput, DateInput, DateRangeInput, PasswordInput, ColorInput and TagInput take it through Input. - xxs: body-s type, 12px text inset, radius-m, prefix/suffix 8px in, as a small Button. No touch height floor. - No floating label at xxs: `label` shows as the placeholder (unless one is set) and stays the accessible name through a visually hidden <label>. ColorInput, which draws no placeholder, shows it in its text overlay. - A searchable xxs Select opens an xxs search field (s otherwise, as before); NumberInput puts its steppers side by side; Textarea's inset floor drops to 0 so its first line fits 32px; a stacked Form at xxs rounds at radius-m. - Existing sizes and the m default are unchanged. Docs: a toolbar-size example on the Input, Select, Textarea, Form, NumberInput, DateInput, DateRangeInput, PasswordInput, ColorInput and TagInput pages. AI harness: `field.size` gotcha, FieldSize listed in the spec's token aliases (generated artifacts left for the release regen). Tests: field-size-xxs.test.tsx. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
…dration CI's check:render failed on this branch with React #418 (a hydration text mismatch) at load, on /contexts/themeProvider and, on the rerun, on /modules/codeBlock: a race, not a page. Prism highlights every code[class*="language-"] in the document a frame after its module evaluates, unless Prism.manual is set beforehand. A CodeBlock imports Prism once it hydrates; the automatic pass then reached the server-rendered CodeBlocks still waiting to hydrate (each sits in its own Suspense boundary, hydrated a slice at a time) and replaced their text with token spans, so their hydration failed. Page order and runner load decide who loses, which is why it moved between pages and did not show locally. getPrism now sets window.Prism.manual before the import. Each CodeBlock already highlights its own element in an effect, so nothing loses highlighting (checked on /modules/codeBlock: 39 of 62 code elements highlighted with and without the automatic pass; the rest are plain diff rows and empty lines). codeblock-prism-manual.test.tsx renders a CodeBlock beside a foreign <code class="language-js">; without the fix Prism tokenises it. Also merges origin/preview (0482e2d), resolving CHANGELOG. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
Resolves Input, Textarea, TagInput and NumberInput against #210/#232: keeps preview's type-only imports and NumberInput's clamped stepBy, with this branch's FieldSize and the xxs stepper layout on top. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
Member
Author
|
Visual check: 5 shots differ, labelled
Generated by Claude Code |
Merged
30 tasks done
lorant-one
pushed a commit
that referenced
this pull request
Oct 18, 2026
…3.0 branch Brings in Input size "xxs" (32px, the height of a small Button) for every text field and Form, and CodeBlock setting window.Prism.manual before Prism loads, which stops Prism's automatic pass rewriting CodeBlocks before they hydrate (the intermittent React #418 in check:render). Resolved toward 3.0: the 3.0 side of each field component, with #229's changes re-applied by hand (ESM .js imports, plain ref prop, FieldSize through useFieldSize/useFieldSizing so the density "auto" path keeps working). ColorInput's icon buttons leave their size out above xxs so the theme density still sets it. NumberInput's minWidth stays a rem string. The preview-side tests and docs got one codemod pass on copies, then hand fixes: PasswordInput -> Input type="password", DateRangeInput -> DateInput range, onChange/onSelect -> onValueChange, and the Button height check reads the `s` mixin 3.0's `.s` includes. The DateRangeInput and PasswordInput pages stay 3.0 stubs; their toolbar-size examples moved to DateInput's page and Input's text. The field.size gotcha no longer lists the two folded components. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
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.
Before: Input and every field built on it could go no lower than 40px (
size="xs", as tall as anmButton). So a dashboard toolbar couldn't be all small controls: a search field or status filter stood 8px taller than thesize="s"buttons beside it.After:
size="xxs"gives a 32px field, the same height as a small Button.radius-m, a 12px text inset, and the prefix and suffix 8px in.Form size="xxs".<label>keeps it as the field's accessible name.Existing sizes and the
mdefault are unchanged. Each docs page gets a toolbar example, andfield-size-xxs.test.tsxcovers the classes and heights.Generated by Claude Code