Repository navigation
feat(SegmentedControl): slide the selected background between options (3.0) - #418
Merged
lorant-one merged 1 commit intoNov 3, 2026
Conversation
One pill behind the options is measured onto the selected one and slides
there with transform and width, so options of different widths morph.
The selected ToggleButton shows the pill through it once it is placed;
until then (and on the server) it keeps its own background. A
ResizeObserver follows fonts, labels and resizes without the slide.
Off with sliding={false}; compact never slides; reduced motion jumps.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJty6FMRnUVKztbSyrQj
Thegreatsura
pushed a commit
to Thegreatsura/one-ui-core
that referenced
this pull request
Nov 4, 2026
…e-ui-system#414) A production build of the bare Chakra scaffold failed hydration (React once-ui-system#418) on every page, so every Chakra run failed the render gate for a reason in our setup. The registry comes from Chakra's Next.js App Router guide. Claude-Session: https://claude.ai/code/session_016gNJtvsRNgTvSmKe7yTUtF Co-authored-by: Claude <[email protected]>
lorant-one
pushed a commit
that referenced
this pull request
Nov 13, 2026
A Calendar with no date or defaultDate read the clock during its first render, so a page prerendered on one day and opened on the next hydrated a different grid (React #418), which the docs render check caught. It now starts on a fixed day, hidden, and moves to today once mounted, without calling onDateChange, the way DatePicker already does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
lorant-one
pushed a commit
that referenced
this pull request
Nov 17, 2026
A date-only string was parsed at local midnight while new Date("2025-01-01")
is midnight UTC, so outside UTC a date range dropped its first row and the
browser rendered different rows from the server (React #418 on the docs'
interaction page in Budapest). Calendar days now parse and format as UTC
days everywhere; dates with a time keep the reader's time zone.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
lorant-one
added a commit
that referenced
this pull request
Nov 17, 2026
#541) A date-only string was parsed at local midnight while new Date("2025-01-01") is midnight UTC, so outside UTC a date range dropped its first row and the browser rendered different rows from the server (React #418 on the docs' interaction page in Budapest). Calendar days now parse and format as UTC days everywhere; dates with a time keep the reader's time zone. Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1 Co-authored-by: Claude <[email protected]>
Thegreatsura
pushed a commit
to Thegreatsura/one-ui-core
that referenced
this pull request
Nov 20, 2026
…ual) into the 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 once-ui-system#418 in check:render). Resolved toward 3.0: the 3.0 side of each field component, with once-ui-system#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
Thegreatsura
pushed a commit
to Thegreatsura/one-ui-core
that referenced
this pull request
Nov 20, 2026
…nce-ui-system#375) A DatePicker with no value showed this month, read from the clock while rendering. A page prerendered in one month and opened in the next drew a different month on the server and in the browser, and hydration failed (React once-ui-system#418). The docs check visits pages 25 hours after the build, so every PR's Docs build fails from 30 October 23:00 UTC to the end of the 31st. Without a date, Calendar and the range calendars start on a fixed month, hidden, and move to this month in an effect. Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq Co-authored-by: Claude <[email protected]>
Thegreatsura
pushed a commit
to Thegreatsura/one-ui-core
that referenced
this pull request
Nov 20, 2026
… horizontal bars (3.0) (once-ui-system#367) * feat(charts): xKey, series labels, valueFormat and locale, stacks and horizontal bars (3.0) Step 1 of the 3.0 chart plan: the props the renderer swap keeps. - xKey names the x column (guessed before); series take label and format. - valueFormat (compact, percent, Intl options or a function) and locale write the value axis and tooltip; without them charts draw as 2.x did. The value axis widens to fit its longest label. - stack (true or "percent") on LineChart and BarChart; BarChart orientation="horizontal", with category labels sized to fit. - C8: date.onChange becomes date.onRangeChange; the codemod renames it in an inline date and reports one built elsewhere. - CurveType and ValueFormat types; curveType stays as a deprecated alias. - Fixes: PieChart gradient ids are scoped to each chart; with no series the x column is no longer drawn as a series; ticks find their row in a map instead of scanning the data. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * docs(charts): describe the shared chart props on the setup page only check-props lists inherited ChartProps rows on the mixin's table, so a component page describing xKey, valueFormat or locale is reported. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * test(ai-spec): charts name CurveType and ValueFormat in the spec The chart props now use CurveType (curveType stays as a deprecated alias), so the regenerated spec resolves CurveType, not curveType. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * fix(charts): legend starts where the plot does; horizontal bar names line up with the title A top-left legend was inset a fixed 80px, the old 64px axis plus 16, so a wider value axis (currency) or the category column of horizontal bars put it over the axis labels. Legend takes the axis width. Horizontal bars' category names start 20px in, where the title does, in one column. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * style(charts): format the chart impls Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * test(legend): the top-left inset follows the axis width Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * fix(DatePicker): an undated calendar picks this month once mounted A DatePicker with no value showed this month, read from the clock while rendering. A page prerendered in one month and opened in the next drew a different month on the server and in the browser, and hydration failed (React once-ui-system#418). The docs check visits pages 25 hours after the build, so every PR's Docs build fails from 30 October 23:00 UTC to the end of the 31st. Without a date, Calendar and the range calendars start on a fixed month, hidden, and move to this month in an effect. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq --------- Co-authored-by: Claude <[email protected]>
Thegreatsura
pushed a commit
to Thegreatsura/one-ui-core
that referenced
this pull request
Nov 20, 2026
….0) (once-ui-system#377) * feat(charts): xKey, series labels, valueFormat and locale, stacks and horizontal bars (3.0) Step 1 of the 3.0 chart plan: the props the renderer swap keeps. - xKey names the x column (guessed before); series take label and format. - valueFormat (compact, percent, Intl options or a function) and locale write the value axis and tooltip; without them charts draw as 2.x did. The value axis widens to fit its longest label. - stack (true or "percent") on LineChart and BarChart; BarChart orientation="horizontal", with category labels sized to fit. - C8: date.onChange becomes date.onRangeChange; the codemod renames it in an inline date and reports one built elsewhere. - CurveType and ValueFormat types; curveType stays as a deprecated alias. - Fixes: PieChart gradient ids are scoped to each chart; with no series the x column is no longer drawn as a series; ticks find their row in a map instead of scanning the data. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * docs(charts): describe the shared chart props on the setup page only check-props lists inherited ChartProps rows on the mixin's table, so a component page describing xKey, valueFormat or locale is reported. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * test(ai-spec): charts name CurveType and ValueFormat in the spec The chart props now use CurveType (curveType stays as a deprecated alias), so the regenerated spec resolves CurveType, not curveType. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * fix(charts): legend starts where the plot does; horizontal bar names line up with the title A top-left legend was inset a fixed 80px, the old 64px axis plus 16, so a wider value axis (currency) or the category column of horizontal bars put it over the axis labels. Legend takes the axis width. Horizontal bars' category names start 20px in, where the title does, in one column. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * style(charts): format the chart impls Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * test(legend): the top-left inset follows the axis width Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * fix(DatePicker): an undated calendar picks this month once mounted A DatePicker with no value showed this month, read from the clock while rendering. A page prerendered in one month and opened in the next drew a different month on the server and in the browser, and hydration failed (React once-ui-system#418). The docs check visits pages 25 hours after the build, so every PR's Docs build fails from 30 October 23:00 UTC to the end of the 31st. Without a date, Calendar and the range calendars start on a fixed month, hidden, and move to this month in an effect. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * feat(charts): accessible chart summaries and a Sparkline component Charts: each plot region is role="img", named by the title and a plain-language summary of the data written in the chart's valueFormat and locale ("Revenue and Cost, Jan to Dec. Revenue: highest 12,400 in Aug, lowest 3,100 in Feb."; a pie: "Share by browser: Chrome 62%, ..."). The data sits next to it, inside the card, as a visually hidden table (x values as rows, a column per series label). `summary` replaces the generated text, `aria-label` the whole name. While a chart loads, fails or is empty the plot is no image, so its status is read. The public shells (LineChart.tsx etc.) provide the description context from their props; a renderer only hands its plot the rows it draws through `<ChartPlot data={filteredData}>`, so the *.impl.tsx files change by an import and the plot Row's opening and closing tag. - utils/chartSummary.ts: chartSummary() and chartSummaryTable() - ChartSummary: the hidden table, exported from /data - Sparkline: pure-SVG trend line, area or bars (no recharts, renders on the server), viewBox stretched with preserveAspectRatio="none" and a non-scaling stroke; data as numbers or rows with valueKey, curve (linear, natural, monotone, step), showLast, min/max, width/height (a number is px), and a generated aria-label ("Trend from 120 to 340, high 360"). Exported from /data and the root barrel. - Catalog seed entries for both; catalog size budget 25,500 -> 25,800. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * docs(charts): Sparkline page, chart accessibility section, changelog - data/sparkline.mdx: usage, stat tile, table cell (a client example, since a Table cell is a function), bars, curves and range, rows with valueKey, accessibility and the PropsTable; listed in the Data-viz nav. - setup.mdx: the Accessibility section and the summary / aria-label rows. - CHANGELOG [3.0.0] Added: chart summaries and Sparkline. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * fix(docs): the streaming LineChart's first window is fixed, so it hydrates The chart's hidden summary table now writes the rows out on the server, and the example seeded them with Math.random, so the server and browser differed (React once-ui-system#418 on /data/lineChart). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq --------- Co-authored-by: Claude <[email protected]>
Thegreatsura
pushed a commit
to Thegreatsura/one-ui-core
that referenced
this pull request
Nov 20, 2026
…ui-system#376) A picker with no date opens on the current month. Prerendered in one month and opened in the next, its header hydrated the server's month against the visitor's and threw React once-ui-system#418, which fails the docs build's browser check on /form-controls/datePicker whenever the check's clock crosses a month. Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1 Co-authored-by: Claude <[email protected]>
Thegreatsura
pushed a commit
to Thegreatsura/one-ui-core
that referenced
this pull request
Nov 20, 2026
once-ui-system#378) * feat(charts): xKey, series labels, valueFormat and locale, stacks and horizontal bars (3.0) Step 1 of the 3.0 chart plan: the props the renderer swap keeps. - xKey names the x column (guessed before); series take label and format. - valueFormat (compact, percent, Intl options or a function) and locale write the value axis and tooltip; without them charts draw as 2.x did. The value axis widens to fit its longest label. - stack (true or "percent") on LineChart and BarChart; BarChart orientation="horizontal", with category labels sized to fit. - C8: date.onChange becomes date.onRangeChange; the codemod renames it in an inline date and reports one built elsewhere. - CurveType and ValueFormat types; curveType stays as a deprecated alias. - Fixes: PieChart gradient ids are scoped to each chart; with no series the x column is no longer drawn as a series; ticks find their row in a map instead of scanning the data. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * docs(charts): describe the shared chart props on the setup page only check-props lists inherited ChartProps rows on the mixin's table, so a component page describing xKey, valueFormat or locale is reported. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * test(ai-spec): charts name CurveType and ValueFormat in the spec The chart props now use CurveType (curveType stays as a deprecated alias), so the regenerated spec resolves CurveType, not curveType. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * fix(charts): legend starts where the plot does; horizontal bar names line up with the title A top-left legend was inset a fixed 80px, the old 64px axis plus 16, so a wider value axis (currency) or the category column of horizontal bars put it over the axis labels. Legend takes the axis width. Horizontal bars' category names start 20px in, where the title does, in one column. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * style(charts): format the chart impls Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * test(legend): the top-left inset follows the axis width Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * fix(DatePicker): an undated calendar picks this month once mounted A DatePicker with no value showed this month, read from the clock while rendering. A page prerendered in one month and opened in the next drew a different month on the server and in the browser, and hydration failed (React once-ui-system#418). The docs check visits pages 25 hours after the build, so every PR's Docs build fails from 30 October 23:00 UTC to the end of the 31st. Without a date, Calendar and the range calendars start on a fixed month, hidden, and move to this month in an effect. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * Draw the charts with Once UI's own SVG renderer, drop recharts LineChart, BarChart, LineBarChart and PieChart render through a shared CartesianPlot and a PiePlot instead of recharts. Their props are unchanged. - utils/scale.ts ports what the charts used from recharts and d3: nice and fixed-domain ticks, stacking (and percent stacking), bar slots, tick thinning, rounded bars, pie sectors and d3's curves. - The chart is in the server HTML: one SVG with a viewBox, drawn at 640x320 until a ResizeObserver measures the container. No lazy chunk, no fonts.ready wait, no MissingDependency fallback. - Tooltip (DataTooltip), crosshair and band hover, arrow keys / Home / End / Escape through the points, legend entries are buttons that hide a series or slice, and the mount animations are CSS that prefers-reduced-motion turns off. - Pie and LineBarChart legends list series in data order with their own colours; pie gradients are scoped per chart. - recharts leaves peerDependencies, peerDependenciesMeta, the lockfile, the spec generator and the agent rules. - The charts' own code is 13.1 KB gz (minified, React external) against recharts' 126 KB. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * Document the chart renderer: setup, curve, migration and changelog The data setup page no longer asks for recharts, the curve and animation props describe the new renderer with d3's curve names, MIGRATING tells readers to uninstall recharts, and CHANGELOG [3.0.0] records the renderer and the removed peer. The streaming example starts from deterministic noise so its server and client HTML match. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * Lock in the lint baseline at 118 errors The renderer and the rebased base branch together leave two fewer Biome errors than the recorded baseline. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq * chore(core): record ./data at 86.1 KB gzipped with the chart renderer The renderer's code is now inside ./data, where recharts (126 KB gzipped) was an external peer the size gate never counted. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq --------- Co-authored-by: Claude <[email protected]>
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.
Requested by Lorant · project thread
What
The selected background of
SegmentedControlnow slides along the rail to the picked option instead of jumping, and morphs its width when options differ in width. ToggleButton is unchanged; this lives entirely in SegmentedControl.How
aria-hiddenpill sits behind the options (after them in the DOM, so option sibling indices are unchanged). A layout effect measures the selected button (offsetLeft/Top/Width/Height, computed radius) and moves the pill withtransform+widthtransitions (0.32s, iOS-like ease).ResizeObserverfollows font loads, label changes and resizes without the slide. It ignores the observer's initial report: touching the pill's inlinetransitionthere cancelled the running slide in Chrome (caught in a browser check).prefers-reduced-motion: reducegets no transition.compact(joined outline segments) keeps today's static look.sliding(defaulttrue), sosliding={false}brings back the jump.Checks
vitest: 26/26 SegmentedControl tests, including 3 new ones (pill placed and follows the selection, hands over the background, absent incompact/sliding={false}). Full core suite: only the 3 AI-spec drift failures already on this branch (ai-catalog,ai-spec-typesValueFormat/CurveType). They fail the same way without this change.tsc: no errors in SegmentedControl. biome: clean apart from pre-existing infos.segmentedControl.mdx.Non-breaking. The preview port is a separate PR.
Generated by Claude Code