fix(dashboard): Import vendored shadcn CSS from design-tokens - #5081
Conversation
The dashboard stylesheet imported "shadcn/tailwind.css", but shadcn was never a declared dependency — it only reached the dashboard transitively via @vendure-io/design-tokens. Version 2.0.0-beta.8 of design-tokens dropped that dependency, so any install resolving the ^2.0.0-beta.7 range forward lost the package entirely and the stylesheet failed to build. design-tokens 2.0.0-beta.9 vendors the same CSS and exposes it as ./css/shadcn, so import it from there and raise the minimum to beta.9.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Dashboard Preview: https://admin-dashboard-dso5dp9os-vendure.vercel.app |
|



packages/dashboard/src/app/styles.cssimportedshadcn/tailwind.css, butshadcnwas never a declared dependency of@vendure/dashboard. It reached the dashboard only transitively:@vendure-io/design-tokens@2.0.0-beta.8, published today at 12:01 UTC, removedshadcnfrom its dependencies. Since^2.0.0-beta.7resolves forward across prereleases (>=2.0.0-beta.7 <3.0.0-0), every fresh install from that point lost the package and the stylesheet failed to build.@vendure-io/design-tokens@2.0.0-beta.9vendors the same CSS and exposes it as./css/shadcn, so this imports it from there and raises the minimum accordingly. That also makes line 4 consistent with line 1, which already imports@vendure-io/design-tokens/css/fonts.The import stays in its current position, after
tw-animate-css, because the vendored file relies on that ordering for its accordion keyframes to win the cascade.Symptom
The
test (ubuntu-latest, 22.x)job of the Publish & Install workflow fails. The reported error is a Playwright timeout waiting for the login form, but the cause appears four seconds earlier in the log:The stylesheet fails to build, the dashboard renders nothing, and there is no input for Playwright to fill.
This only shows up in the freshly scaffolded test app, which installs without a lockfile. Inside the monorepo,
bun.lockpinned design-tokens at beta.7, which still carriedshadcn, so local builds and the in-repo dashboard tests kept passing.masteris unaffected: it depends on@vendure-io/design-tokens: ^1.1.2, which excludes the 2.0.0 prerelease line, and its stylesheet has noshadcnimport.Lockfile
bun.lockhas to move to beta.9 as well. Without it the monorepo would install beta.7, which has no./css/shadcnexport, and the new import would fail in-repo.The rest of the lockfile churn follows from the same change: with
shadcngone from the hoisteddesign-tokens,postcss-selector-parser@7.1.1takes the top-level slot and seven nested duplicates collapse.Verification
require.resolve('@vendure-io/design-tokens/css/shadcn')frompackages/dashboard/src/appresolves to the vendored file;shadcn/tailwind.cssno longer resolves, confirming the lockfile bump was required rather than incidental.vite buildof the dashboard succeeds.accordion-downkeyframes and itsno-scrollbarutility, so the stylesheet is being applied rather than silently skipped.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.