fix: use the declared class name utility - #26
Open
lindixu6-hash wants to merge 1 commit into
Open
Conversation
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.
Problem
Issue #22 reports that generated components crash when they render
Typographybecause it importsclassnames, which is not declared by the@react-agent/shadcn-uiworkspace.The same undeclared direct import also exists in the exported
JsonSkeletonexample.classnamesappears inyarn.lockonly as a transitive dependency, so relying on it is not a stable workspace contract.Change
Use the design system's existing
cnhelper in both locations:components/ui/typography.tsxcomponents/examples/json-skeleton/demo.tsxThat helper is already used throughout the component library and is backed by the workspace's declared
clsxandtailwind-mergedependencies. No dependency or lockfile changes are needed.Closes #22.
Verification
cnimports resolve tofrontend/shadcn-ui/src/lib/utils.tsclsxandtailwind-mergeare direct workspace dependenciesclassnamesimports remain underfrontend/shadcn-ui/srcgit diff --checkpassesI could not claim a full workspace build: two clean Yarn v1 install attempts remained in the dependency-fetch stage, and an offline retry identified an incomplete cached package. This PR therefore reports the deterministic source-level checks above rather than presenting a partial install as a green build.