Skip to content

refactor(appkit-ui): remove unused recharts ChartContainer, drop recharts dep#473

Merged
MarioCadenas merged 4 commits into
mainfrom
refactor/appkit-ui-drop-recharts-chart
Jul 8, 2026
Merged

refactor(appkit-ui): remove unused recharts ChartContainer, drop recharts dep#473
MarioCadenas merged 4 commits into
mainfrom
refactor/appkit-ui-drop-recharts-chart

Conversation

@MarioCadenas

Copy link
Copy Markdown
Collaborator

Summary

Removes the unused shadcn ChartContainer component and drops the recharts dependency from @databricks/appkit-ui.

src/react/ui/chart.tsx (the shadcn ChartContainer / ChartTooltip / ChartLegend / ChartStyle wrapper) was exported from @databricks/appkit-ui/react but is not used anywhere in the repo. It imported the entire recharts library via import * as RechartsPrimitive, and recharts was declared as a peerDependency — so consumers were told to install a whole charting library for a component the public API never actually wired up. The echarts-based components in react/charts/ are the charting API.

Changes

  • Delete src/react/ui/chart.tsx and its barrel re-export from ui/index.ts
  • Remove recharts from peerDependencies and devDependencies
  • Drop the decorative recharts chart from the drawer example
  • Regenerate component docs (removes ChartContainer.mdx, updates the examples registry)

Non-breaking

The removed exports are dead code — unused across apps/, template/, and tests. dev-playground uses recharts through its own dependency and is unaffected. No shipped/used API surface changes.

Verification

  • pnpm --filter=@databricks/appkit-ui build:package — pass
  • pnpm --filter=@databricks/appkit-ui typecheck — pass
  • recharts removed from pnpm-lock.yaml
  • docs regenerated; only ChartContainer.mdx removed + drawer example source updated (no unrelated MDX churn)

@MarioCadenas MarioCadenas requested a review from a team as a code owner July 7, 2026 15:23
@MarioCadenas MarioCadenas requested a review from pkosiec July 7, 2026 15:23
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🔬  Run evals on this PR  ·  Go to Evals Monitor →

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle size report

Compared against bundle-size-baseline.json (main).

@databricks/appkit

npm tarball (packed): 658 KB — gzipped download (dist + bin; excludes release-only docs/NOTICE).

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>
@MarioCadenas MarioCadenas force-pushed the refactor/appkit-ui-drop-recharts-chart branch from ea9db71 to 2d33484 Compare July 7, 2026 15:41
@MarioCadenas MarioCadenas enabled auto-merge (squash) July 7, 2026 16:05
@MarioCadenas MarioCadenas requested a review from atilafassina July 7, 2026 16:40
@MarioCadenas MarioCadenas merged commit 62fbf19 into main Jul 8, 2026
10 checks passed
@MarioCadenas MarioCadenas deleted the refactor/appkit-ui-drop-recharts-chart branch July 8, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants