Skip to content

Add Tailwind and Shadcn#240

Merged
jerryzhou196 merged 4 commits into
mainfrom
add-tailwind-shadcn
Jun 1, 2026
Merged

Add Tailwind and Shadcn#240
jerryzhou196 merged 4 commits into
mainfrom
add-tailwind-shadcn

Conversation

@jerryzhou196

@jerryzhou196 jerryzhou196 commented May 29, 2026

Copy link
Copy Markdown
Member

After ejecting from CRA, we can easily add Tailwind and Shadcn to the config.

  • Mirrored GlobalTheme.tsx in theming for tailwind
  • Adds shadcn scaffolding (components.json, lib/utils.ts with cn(), initial Button component). The Button is included as a starter component for future use and is intentionally not rendered yet — actual component swap-in is planned for a follow-up PR (see review thread for order of operations).

Other Updates (post-merge with main #244):

Bump From → To Why
react / react-dom ^16.12 → ^18.3.1 Originally bumped to 16.14 in this branch because Radix imports react/jsx-runtime (added in 16.14). Subsequently merged main's React 18 upgrade (#244).
typescript ^3.8.3 → 4.9.5 Modern Radix .d.ts files use inline type export modifiers (export { type SlotProps }), added in TS 4.5. TS 3.8 cannot parse this syntax (TS1005 ',' expected); skipLibCheck does not help because it's a syntax error, not a type error.
@typescript-eslint/* 2.x/3.x → ^5.0.0 Pulled in from main #244.
autoprefixer — → ^10.4.19 Required by the Tailwind PostCSS pipeline.

New dependencies for Tailwind + shadcn: tailwindcss, tailwindcss-animate, @radix-ui/react-slot, class-variance-authority, clsx, tailwind-merge.

- Added Tailwind CSS configuration in `tailwind.config.js` and entry point in `src/index.css`.
- Updated ESLint configuration to include the new `lib` directory.
- Introduced a new `components.json` file for component configuration.
- Added utility functions for class name merging in `src/lib/utils.ts`.
- Created a reusable Button component in `src/components/ui/button.tsx`.
- Updated package dependencies to include Tailwind CSS and related libraries.

This commit enhances the styling capabilities of the application with Tailwind CSS and improves the component structure.
…configuration for .mjs files

- Upgraded `react` and `react-dom` from version 16.12.0 to 16.14.0.
- Updated `typescript` from version 3.8.3 to 4.9.5.
- Modified Webpack configuration to handle `.mjs` files as `javascript/auto` for better compatibility with CommonJS modules.

These changes enhance the project's compatibility with newer library versions and improve module handling.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates Tailwind CSS and shadcn/ui scaffolding into the ejected CRA-based frontend build, including the supporting PostCSS/Webpack configuration and a starter shadcn Button component, along with dependency upgrades needed for Radix/shadcn compatibility.

Changes:

  • Add Tailwind configuration + CSS entrypoint, and wire Tailwind into the existing PostCSS pipeline in config/webpack.config.js.
  • Introduce shadcn/ui basics (components.json, cn utility, initial Button component) and adjust ESLint import sorting config to recognize lib imports.
  • Upgrade React/ReactDOM to ^16.14.0 and TypeScript to ^4.9.5, and add Tailwind/shadcn-related dependencies.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
yarn.lock Locks new/updated dependencies for Tailwind + shadcn/Radix + TS/React bumps.
tailwind.config.js Adds Tailwind config (custom colors/screens mirroring GlobalTheme).
src/lib/utils.ts Adds cn() helper for clsx + tailwind-merge (shadcn convention).
src/index.tsx Imports Tailwind CSS entrypoint into the app.
src/index.css Tailwind directives (@tailwind base/components/utilities) entry file.
src/components/ui/button.tsx Adds initial shadcn-style Button component using Radix Slot + CVA.
package.json Adds Tailwind/shadcn deps and bumps React + TypeScript versions.
config/webpack.config.js Runs Tailwind in PostCSS and adds .mjs handling for Webpack 4 interop.
components.json Adds shadcn/ui generator configuration and import aliases.
.eslintrc.js Updates internal import-sort grouping to include lib.
.eslintignore Ignores Tailwind config and CSS files from ESLint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.tsx
Comment thread src/components/ui/button.tsx
Comment thread src/index.tsx
Comment thread src/components/ui/button.tsx
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread yarn.lock

@edwinzhng edwinzhng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, do you want me to help w this? i feel like a decent order of operations would be:

  1. upgrade react + all packages for security purposes
  2. migrate from yarn -> bun
  3. rebuild components w/ tailwind
  4. swap in new components
  5. add better graphql types

@jerryzhou196

Copy link
Copy Markdown
Member Author

yeah you should take over dawg - i have not really used these libraries that much

Resolve conflicts in package.json and yarn.lock from the React 18 +
dependency bump on main (#244). Take main's versions for React 18.3.1,
react-dom 18.3.1, react-apollo ^3.1.5, @typescript-eslint/* ^5.0.0, and
typescript 4.9.5. Keep autoprefixer ^10.4.19 from this branch (required
for tailwind). Regenerate yarn.lock from main + yarn install so the
tailwind/shadcn deps are present.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Comment thread package.json
@jerryzhou196 jerryzhou196 merged commit e9319e9 into main Jun 1, 2026
2 checks passed
@jerryzhou196 jerryzhou196 deleted the add-tailwind-shadcn branch June 1, 2026 14:49
jerryzhou196 added a commit that referenced this pull request Jun 1, 2026
Pull in Tailwind + shadcn (#240), which landed on main after the previous
merge. yarn.lock stays deleted; bun.lock regenerated by migrating main's
yarn.lock so the new deps (tailwindcss, @radix-ui/react-slot, clsx,
class-variance-authority, tailwind-merge, autoprefixer) resolve to the
versions main uses.

Verified: `bun install --frozen-lockfile`, `bun run lint-nofix`, and the
production build (now exercising tailwind/postcss) all pass under Bun.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

3 participants