docs: update frontend contributing guide for shadcn/ui and TailwindCSS migration by BrunoQuaresma · Pull Request #18702 · coder/coder · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

docs: update frontend contributing guide for shadcn/ui and TailwindCSS migration #18702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

BrunoQuaresma
Copy link
Collaborator

Update the frontend contributing guide to reflect the current architecture and ongoing migration from MUI to shadcn/ui and from Emotion to TailwindCSS.

Key changes:

  • Updated tech stack to include TailwindCSS, shadcn/ui, Lucide React, and Biome
  • Added migration status section with current progress (~210 MUI files, ~41 migrated)
  • Added development commands section with pnpm commands and pre-PR checklist
  • Rewrote UI components section to prioritize shadcn/ui over MUI
  • Completely updated styling section to focus on TailwindCSS
  • Enhanced accessibility section with TailwindCSS examples
  • Added comprehensive migration guide with practical examples and checklists
  • Documented semantic color system and best practices

…S migration

Update the frontend contributing guide to reflect the current architecture
and ongoing migration from MUI to shadcn/ui and from Emotion to TailwindCSS.

Key changes:
- Updated tech stack to include TailwindCSS, shadcn/ui, Lucide React, and Biome
- Added migration status section with current progress (~210 MUI files, ~41 migrated)
- Added development commands section with pnpm commands and pre-PR checklist
- Rewrote UI components section to prioritize shadcn/ui over MUI
- Completely updated styling section to focus on TailwindCSS
- Enhanced accessibility section with TailwindCSS examples
- Added comprehensive migration guide with practical examples and checklists
- Documented semantic color system and best practices

Co-authored-by: BrunoQuaresma <3165839+BrunoQuaresma@users.noreply.github.com>
@BrunoQuaresma BrunoQuaresma requested review from f0ssel and a team July 1, 2025 19:19
@BrunoQuaresma BrunoQuaresma self-assigned this Jul 1, 2025
@BrunoQuaresma BrunoQuaresma requested review from brettkolodny and removed request for a team July 1, 2025 19:19
blink-so bot and others added 2 commits July 1, 2025 19:24
Ran make fmt and frontend linting to ensure code quality:
- Go formatting: passed
- Terraform formatting: passed
- Frontend formatting (Biome): passed (1124 files, no fixes needed)
- Frontend linting (Biome): passed (1124 files, no issues)

No changes were required as the code already meets all formatting standards.

Co-authored-by: BrunoQuaresma <3165839+BrunoQuaresma@users.noreply.github.com>
Fixed 11 markdown linting errors found by markdownlint-cli2:
- MD022: Added blank lines around headings
- MD032: Added blank lines around lists (9 instances)
- MD031: Added blank lines around fenced code blocks
- MD040: Added language specification to fenced code block

All markdown linting rules now pass with 0 errors.

Co-authored-by: BrunoQuaresma <3165839+BrunoQuaresma@users.noreply.github.com>
@Parkreiner Parkreiner self-requested a review July 2, 2025 12:26
@Parkreiner
Copy link
Member

@BrunoQuaresma Forgot to message you about this earlier, but I added myself as a reviewer for this PR. I figured that I might be a good guinea pig, since I've been away from coder/coder for so long, and am just now getting back to contributing more consistently

@BrunoQuaresma
Copy link
Collaborator Author

@Parkreiner sure thing! Welcome back my friend.

Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Not approving just yet, because I don't know what we want our goals for the README to be. Just pointed out things that looked funny so far

```bash
# Development
pnpm dev # Start Vite development server
pnpm storybook --no-open # Run Storybook for component development
Copy link
Member

Choose a reason for hiding this comment

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

I think we should remove the --no-open part. I'd imagine that most people running Storybook locally would want it to open in the browser

pnpm lint # Run complete linting suite (Biome + TypeScript + circular deps + knip)
pnpm lint:fix # Auto-fix linting issues where possible
pnpm format # Format code with Biome (always run before PR)
pnpm check # Type-check with TypeScript
Copy link
Member

Choose a reason for hiding this comment

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

I think this is wrong, and we need to swap it out for pnpm lint:types

Comment on lines +89 to +94
### Current State

- **~210 files** still use MUI components (`@mui/material`)
- **~41 components** have been migrated to use TailwindCSS classes
- **shadcn/ui components** are being added incrementally to `src/components/`
- **Emotion CSS** is deprecated but still present in legacy components
Copy link
Member

Choose a reason for hiding this comment

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

I think we should delete this section entirely, because it will quickly get out of date

Comment on lines +567 to +577
// ❌ Before: MUI Button
import { Button } from "@mui/material";

<Button
variant="contained"
color="primary"
sx={{ margin: 2 }}
onClick={handleClick}
>
Click me
</Button>
Copy link
Member

Choose a reason for hiding this comment

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

This shows an example of not using tree-shaking, right? Wouldn't this need to be:

import Button from "@mui/material/Button";

?

import { Button } from "components/Button";

<Button
variant="primary"
Copy link
Member

Choose a reason for hiding this comment

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

Our buttons don't have a primary variant, right?

<Label htmlFor="email">Email</Label>
<Input
id="email"
className={errors.email ? "border-border-destructive" : ""}
Copy link
Member

Choose a reason for hiding this comment

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

We don't have the border-border-destructive class, right? It's just border-destructive?


1. **Check existing implementations** in `src/components/` for patterns
2. **Refer to shadcn/ui documentation** at [ui.shadcn.com](https://ui.shadcn.com/)
3. **Ask in Discord** - the team is happy to help with migration questions
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to add a link to the Discord here?

Comment on lines +663 to +671
When a shadcn/ui equivalent doesn't exist:

1. **Check the shadcn/ui registry** for the component
2. **Copy the component code** (don't use the CLI)
3. **Adapt to our theme** using semantic color tokens
4. **Add to `src/components/`** with proper folder structure
5. **Create Storybook stories** for documentation
6. **Add TypeScript types** for props
7. **Include accessibility features** (ARIA attributes, keyboard support)
Copy link
Member

Choose a reason for hiding this comment

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

I don't now if this section should even be here

@BrunoQuaresma
Copy link
Collaborator Author

@Parkreiner would you be able to commit the suggested changes? 🙏

Co-authored-by: Michael Smith <throwawayclover@gmail.com>
@BrunoQuaresma BrunoQuaresma requested a review from Parkreiner July 3, 2025 18:44
Copy link

Choose a reason for hiding this comment

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

🚫 [linkspector] reported by reviewdog 🐶
Cannot reach https://stackoverflow.com/questions/69711888/react-testing-library-getbyrole-is-performing-extremely-slowly Status: 403

- <https://stackoverflow.com/questions/69711888/react-testing-library-getbyrole-is-performing-extremely-slowly>

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

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.