Repository navigation
Conversation
S1 of docs/specs/tanstack-charts: - @tanstack/charts 1.5.0 (solid peer); vendor-chart bundle group takes the new regex and moves ahead of vendor-tanstack (first match wins) - src/styles/tanstack-charts.scss: palette + tooltip tokens off the theme variables on the .ts-chart-host element, imported in vendor.scss - dev-only chart renderer parity flag (dev/chart-parity.ts): defaults to Chart.js, persisted, dev-gated; DevOptions button shows the active renderer, exposed on __mt Prod build verified: with a temporary probe import, the core + d3 modules land in vendor-chart (+41.2 kB gzip for core + solid adapter, +66.4 kB for the full planned surface); no new chunks, vendor-tanstack unchanged.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
fehmer
marked this pull request as draft
November 24, 2026 18:09
Signed-off-by: Christian Fehmer <cfe@sexy-developer.com>
@fehmer) Signed-off-by: Christian Fehmer <cfe@sexy-developer.com>
…ts empty (@fehmer) The host follows the container width, keeps a fixed 192 px height like the section and the canvas it replaces, and seeds the first frame with initialWidth, per the TanStack responsive-charts guide. Zero-count buckets render empty (accepted minBarLength deviation); tiny buckets keep the 2 px clamp. Spec updated: a tiny row exercises the clamp, a zero row stays zero.
fehmer
marked this pull request as ready for review
November 25, 2026 14:42
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.
Overview
Adds the TanStack Solid Charts foundation (roadmap S1,
docs/specs/tanstack-charts/) and the first chart behind the parity flag (roadmap S3): the about page speed histogram now renders through a dual-rendererSpeedHistogramcomponent, with the TanStack half asserted by a real definition contract spec.@tanstack/charts1.5.0 (solid peer dep)vendor-chartbundle group widened to/node_modules\/(chart|@tanstack\/charts|d3-)/and moved ahead ofvendor-tanstack(first match wins)src/styles/tanstack-charts.scss: hostcolor+--ts-chart-1…4+--ts-chart-tooltip-*from our theme variables, imported invendor.scss__mthandle, Chart.js default); it now controls which rendererSpeedHistogramusesbuildSpeedHistogramDefinition): band x scale, zero-based nice linear y, group-x focus/tooltip,--ts-chart-1bar paint, themed grid lines and axis labelinitialWidthseeds the first frame; rotated bucket labels thin collision-aware at narrow widths (built-in thinning, ends kept)minBarLengthdeviation, recorded in the spec); tiny buckets keep the 2 px clampAboutPagerenders the new component; the Chart.js options moved into it verbatim (kept until S12)Implementation Sketch
The parity branch and the kept Chart.js half are S12 stepping stones; S3 lands on this branch, so the chart is dev-visible on
integration/chartsfrom this PR.Evidence
No screenshots in this repo — measured on the dev server, about page, parity flag both ways:
#e2b714→#ff9900; ticks and grid follow thecurrentColor/scss tokens ✓Users: 75942+top 57.21%✓Definition contract spec after the responsive/zero-bucket refinements:
pnpm vitest run→__tests__/components/pages/SpeedHistogram.spec.tsx4/4 pass (scale domains; one bar per row; 2 px clamp on a tiny bucket; zero bucket stays zero; flag wiring both ways).How to test
pnpm iinfrontend, start the dev server, open abouttop XX%line (TanStack half: check the whole column highlights, as with Chart.js index mode today)Post-Draft Parity Fixes
Three commits after the initial draft, each verified in the browser against both renderers (parity flag both ways):
<svg>tabindex 0for keyboard focus, and Chrome paints the UA focus ring on mouse click; the old canvas wasn't focusable. The host suppresses the ring for pointer focus (svg:focus:not(:focus-visible)); the keyboard ring stayssvg text(family still inherits from the body, like chart.js)stroke-opacity: 1on the.ts-chart__grid/.ts-chart__axeslines (marks keep their own). S3's grid/axis stroke movessub→subAlt, matching the spec and the chart.js wrapper (addColorsToOptions)Bundle
vendor-chartWithin the spec's budget;
vendor-tanstackunchanged (no leakage); Chart.js goes in S12. The responsive/zero-bucket commits add no modules.Checks
pnpm vitest run— 131 files / 2002 tests pass (new:__tests__/components/pages/SpeedHistogram.spec.tsx— scene scale domains, one bar per row in the theme colour with the 2 px clamp / zero-bucket behaviour, flag wiring both ways)pnpm oxlint --type-aware --type-checkpnpm lint-styles,npx oxfmton the diffvendor-chartonlyMerge Danger
Door: two-way — the TanStack half is dev-visible only (flag defaults to Chart.js, always false in production); the production effect is the bundle. Revert is clean; S12 removes the whole branch's machinery at the move.
Blast Radius: about page (dev render + production bundle).