refactor(appkit-ui): remove unused recharts ChartContainer, drop recharts dep#473
Merged
Merged
Conversation
Contributor
|
Contributor
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 686 KB | 240 KB |
| Type declarations | 268 KB | 91 KB |
| Source maps | 1.3 MB | 445 KB |
| Other | 11 KB | 3.7 KB |
| Total | 2.3 MB | 779 KB |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
74 KB | 2.5 KB | 76 KB | external | 243 KB |
./beta |
39 KB | 231 B | 39 KB | external | 117 KB |
./type-generator |
18 KB | 0 B | 18 KB | external | 53 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 70 KB |
. |
utils.js |
initial | 4.0 KB |
. |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./beta |
beta.js |
initial | 30 KB |
./beta |
databricks.js |
initial | 5.7 KB |
./beta |
service-context.js |
initial | 3.1 KB |
./beta |
client-options.js |
initial | 220 B |
./beta |
databricks.js |
lazy | 128 B |
./beta |
index.js |
lazy | 103 B |
./type-generator |
index.js |
initial | 18 KB |
@databricks/appkit-ui
npm tarball (packed): 290 KB (-7.5 KB) — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 346 KB (-8.0 KB) | 115 KB (-2.5 KB) |
| Type declarations | 199 KB (-4.5 KB) | 72 KB (-1.4 KB) |
| Source maps | 659 KB (-16 KB) | 215 KB (-5.0 KB) |
| CSS | 16 KB | 3.3 KB |
| Total | 1.2 MB (-29 KB) | 404 KB (-9.0 KB) |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
4.2 KB | 49 KB | 54 KB | 208 KB | 11 KB |
./js/beta |
20 B | 0 B | 20 B | 0 B | 0 B |
./react |
427 KB (-1.5 KB) | 49 KB | 476 KB (-1.5 KB) | 1.3 MB (-19 B) | 162 KB (-4.3 KB) |
./react/beta |
20 B | 0 B | 20 B | 0 B | 0 B |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 4.1 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 20 B |
./react |
index.js |
initial | 425 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 20 B |
MarioCadenas
added a commit
that referenced
this pull request
Jul 7, 2026
recharts was only present in the template transitively via appkit-ui's recharts peerDependency, which #473 removes. The template declares no recharts dependency and no template component imports it, so keeping it in optimizeDeps.include would make scaffolded apps fail to start with "Failed to resolve dependency: recharts, present in optimizeDeps.include" once the template syncs to the recharts-free appkit-ui. Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
…arts dep The shadcn ChartContainer/ChartTooltip/ChartLegend/ChartStyle wrapper (src/react/ui/chart.tsx) was exported from @databricks/appkit-ui/react but unused anywhere in the repo, and it imported the entire recharts library via `import * as RechartsPrimitive`. The echarts-based components in react/charts are the charting API, so recharts can be dropped entirely. This removes dead, unused code — no shipped or used API surface changes. - delete src/react/ui/chart.tsx and its barrel re-export - remove recharts from peerDependencies and devDependencies - drop the decorative recharts chart from the drawer example - regenerate component docs (removes ChartContainer.mdx, updates examples registry) Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
recharts was only present in the template transitively via appkit-ui's recharts peerDependency, which #473 removes. The template declares no recharts dependency and no template component imports it, so keeping it in optimizeDeps.include would make scaffolded apps fail to start with "Failed to resolve dependency: recharts, present in optimizeDeps.include" once the template syncs to the recharts-free appkit-ui. Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Running docs:build regenerates docs/docs/api/ and styles.gen.css: - styles.gen.css drops 130 lines of orphaned .recharts-* utility classes that only the removed chart.tsx produced. - Seven Radix-based component MDX files (ContextMenu, DropdownMenu, HoverCard, Menubar, Popover, Select, Tooltip) pick up a pre-existing positioning-prop type reordering that had drifted on main. The docs CI drift check (git diff --exit-code docs/docs/api/) requires these to be committed. Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
ea9db71 to
2d33484
Compare
atilafassina
approved these changes
Jul 8, 2026
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.
Summary
Removes the unused shadcn
ChartContainercomponent and drops therechartsdependency from@databricks/appkit-ui.src/react/ui/chart.tsx(the shadcnChartContainer/ChartTooltip/ChartLegend/ChartStylewrapper) was exported from@databricks/appkit-ui/reactbut is not used anywhere in the repo. It imported the entirerechartslibrary viaimport * as RechartsPrimitive, andrechartswas declared as apeerDependency— so consumers were told to install a whole charting library for a component the public API never actually wired up. The echarts-based components inreact/charts/are the charting API.Changes
src/react/ui/chart.tsxand its barrel re-export fromui/index.tsrechartsfrompeerDependenciesanddevDependenciesChartContainer.mdx, updates the examples registry)Non-breaking
The removed exports are dead code — unused across
apps/,template/, and tests.dev-playgrounduses recharts through its own dependency and is unaffected. No shipped/used API surface changes.Verification
pnpm --filter=@databricks/appkit-ui build:package— passpnpm --filter=@databricks/appkit-ui typecheck— passrechartsremoved frompnpm-lock.yamlChartContainer.mdxremoved + drawer example source updated (no unrelated MDX churn)