Repository navigation
Commit dcf1d96
authored
chore: delete 23 unused shadcn/ui components and 17 orphaned deps (#34)
None of these components were imported anywhere outside src/components/ui.
Two had an inbound reference, and both traced back to something also dead:
- toggle.tsx: only importer was toggle-group.tsx, itself unused
- skeleton.tsx: only importers were sidebar.tsx, itself unused, and a
one-assertion render test in ui.test.tsx
The other 21 had no importer at all. Checked for dynamic reachability with
`import(` rather than only `lazy(`: every dynamic import in the codebase is
an explicit page import in App.tsx or offline-route-preload.ts.
Removed the dependencies that only these components used. recharts stays:
AdminPage and SparringScorecard use it directly, only the shadcn chart.tsx
wrapper around it was dead.
Also cleans up everything the deletion orphaned:
- the Skeleton test block and import in ui.test.tsx
- src/hooks/use-mobile.tsx, whose only importer on main was sidebar.tsx
- the sidebar color scale in tailwind.config.ts and all 18 --sidebar-*
custom properties in index.css, which sidebar.tsx referenced 32 times and
nothing else uses: there are no bg-/text-/border-/ring-sidebar utilities
anywhere in src, e2e, or public
- the [cmdk-input] focus selector in index.css
- the @radix-ui/react-dropdown-menu entry in the vendor-radix manual chunk
Noted but deliberately not touched: --chart-1 through --chart-5 in index.css
are also unused, but chart.tsx never referenced them and there is no tailwind
chart scale, so they were already dead on main rather than orphaned here.
Verified on main fe679fd, from a clean npm ci: docs:check, lint, typecheck,
955 unit tests, 121 edge tests, build, and 126 Chromium e2e tests pass.
Selected coverage scope excludes src/components/ui, so thresholds are
unaffected.1 parent 3857ca5 commit dcf1d96
30 files changed
Lines changed: 1 addition & 3195 deletions
File tree
- src
- components/ui
- hooks
- test/components
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | 43 | | |
46 | | - | |
47 | | - | |
48 | 44 | | |
49 | | - | |
50 | | - | |
51 | 45 | | |
52 | | - | |
53 | | - | |
54 | 46 | | |
55 | 47 | | |
56 | | - | |
57 | 48 | | |
58 | 49 | | |
59 | 50 | | |
| |||
62 | 53 | | |
63 | 54 | | |
64 | 55 | | |
65 | | - | |
66 | | - | |
67 | 56 | | |
68 | 57 | | |
69 | 58 | | |
| |||
77 | 66 | | |
78 | 67 | | |
79 | 68 | | |
80 | | - | |
81 | 69 | | |
82 | 70 | | |
83 | | - | |
84 | 71 | | |
85 | 72 | | |
86 | 73 | | |
87 | 74 | | |
88 | 75 | | |
89 | | - | |
90 | 76 | | |
91 | 77 | | |
92 | 78 | | |
| |||
95 | 81 | | |
96 | 82 | | |
97 | 83 | | |
98 | | - | |
99 | 84 | | |
100 | 85 | | |
101 | 86 | | |
102 | 87 | | |
103 | 88 | | |
104 | | - | |
105 | 89 | | |
106 | 90 | | |
107 | 91 | | |
108 | 92 | | |
109 | 93 | | |
110 | 94 | | |
111 | 95 | | |
112 | | - | |
113 | 96 | | |
114 | 97 | | |
115 | 98 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments