Skip to content

Commit e55079e

Browse files
authored
feat(code): upgrade Tailwind CSS v3 to v4 (#1540)
1 parent 1735579 commit e55079e

7 files changed

Lines changed: 543 additions & 122 deletions

File tree

apps/code/.storybook/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import path, { dirname } from "node:path";
33
import { fileURLToPath } from "node:url";
44
import type { StorybookConfig } from "@storybook/react-vite";
5+
import tailwindcss from "@tailwindcss/vite";
56
import react from "@vitejs/plugin-react";
67
import { mergeConfig } from "vite";
78

@@ -22,7 +23,7 @@ const config: StorybookConfig = {
2223
framework: getAbsolutePath("@storybook/react-vite"),
2324
async viteFinal(config) {
2425
return mergeConfig(config, {
25-
plugins: [react()],
26+
plugins: [tailwindcss(), react()],
2627
resolve: {
2728
alias: {
2829
"@": path.resolve(__dirname, "../src"),

apps/code/package.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
"@vitejs/plugin-react": "^4.2.1",
6767
"@vitest/ui": "^4.0.10",
6868
"adm-zip": "^0.5.16",
69-
"autoprefixer": "^10.4.17",
7069
"drizzle-kit": "^0.31.9",
7170
"electron": "^41.0.0",
7271
"fuse.js": "^7.1.0",
@@ -77,7 +76,7 @@
7776
"memfs": "^4.56.10",
7877
"postcss": "^8.4.33",
7978
"storybook": "10.2.0",
80-
"tailwindcss": "^3.4.18",
79+
"tailwindcss": "^4.2.2",
8180
"tsx": "^4.20.6",
8281
"typed-openapi": "^2.2.2",
8382
"typescript": "^5.9.3",
@@ -88,6 +87,7 @@
8887
"yaml": "^2.8.1"
8988
},
9089
"dependencies": {
90+
"@base-ui/react": "^1.3.0",
9191
"@codemirror/lang-angular": "^0.1.4",
9292
"@codemirror/lang-cpp": "^6.0.3",
9393
"@codemirror/lang-css": "^6.3.1",
@@ -113,6 +113,7 @@
113113
"@codemirror/state": "^6.5.4",
114114
"@codemirror/view": "^6.39.17",
115115
"@dnd-kit/react": "^0.1.21",
116+
"@fontsource-variable/inter": "^5.2.8",
116117
"@lezer/common": "^1.5.1",
117118
"@lezer/highlight": "^1.2.3",
118119
"@modelcontextprotocol/ext-apps": "^1.1.2",
@@ -129,10 +130,15 @@
129130
"@posthog/electron-trpc": "workspace:*",
130131
"@posthog/git": "workspace:*",
131132
"@posthog/hedgehog-mode": "^0.0.48",
133+
"@posthog/quill-blocks": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/blocks",
134+
"@posthog/quill-components": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/components",
135+
"@posthog/quill-primitives": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/primitives",
136+
"@posthog/quill-tokens": "link:/Users/adamleithp/Dev/posthog/packages/quill/packages/tokens",
132137
"@posthog/shared": "workspace:*",
133138
"@radix-ui/react-collapsible": "^1.1.12",
134139
"@radix-ui/react-icons": "^1.3.2",
135140
"@radix-ui/themes": "^3.2.1",
141+
"@tailwindcss/vite": "^4.2.2",
136142
"@tanstack/react-query": "^5.90.2",
137143
"@tiptap/core": "^3.13.0",
138144
"@tiptap/extension-mention": "^3.13.0",
@@ -150,6 +156,8 @@
150156
"@xterm/xterm": "^5.5.0",
151157
"better-sqlite3": "^12.8.0",
152158
"chokidar": "^5.0.0",
159+
"class-variance-authority": "^0.7.1",
160+
"clsx": "^2.1.1",
153161
"cmdk": "^1.1.1",
154162
"detect-libc": "^1.0.3",
155163
"dotenv": "^17.2.3",
@@ -164,6 +172,7 @@
164172
"immer": "^11.0.1",
165173
"inversify": "^7.10.6",
166174
"is-glob": "^4.0.3",
175+
"lucide-react": "^1.7.0",
167176
"micromatch": "^4.0.5",
168177
"node-addon-api": "^8.5.0",
169178
"node-machine-id": "^1.1.12",
@@ -182,7 +191,10 @@
182191
"smol-toml": "^1.6.0",
183192
"sonner": "^2.0.7",
184193
"striptags": "^3.2.0",
194+
"tailwind-merge": "^3.5.0",
185195
"tippy.js": "^6.3.7",
196+
"tw-animate-css": "^1.4.0",
197+
"vaul": "^1.1.2",
186198
"vscode-icons-js": "^11.6.1",
187199
"zod": "^4.1.12",
188200
"zustand": "^4.5.0"

apps/code/postcss.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/code/src/renderer/main.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import "reflect-metadata";
2-
import "@radix-ui/themes/styles.css";
32
// Side effect: attaches window focus/visibility listeners so `focused` is accurate before inbox queries mount.
43
import "@stores/rendererWindowFocusStore";
54
import { Providers } from "@components/Providers";

apps/code/src/renderer/styles/globals.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@layer theme, base, radix, components, utilities;
2+
@import "@radix-ui/themes/styles.css" layer(radix);
3+
@import "tailwindcss";
4+
@config "../../../tailwind.config.js";
45

56
@font-face {
67
font-family: "Berkeley Mono";

apps/code/vite.renderer.config.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { readFileSync } from "node:fs";
22
import path from "node:path";
33
import { fileURLToPath } from "node:url";
4+
import tailwindcss from "@tailwindcss/vite";
45
import react from "@vitejs/plugin-react";
56
import { defineConfig, loadEnv } from "vite";
67
import tsconfigPaths from "vite-tsconfig-paths";
@@ -20,6 +21,7 @@ export default defineConfig(({ mode }) => {
2021

2122
return {
2223
plugins: [
24+
tailwindcss(),
2325
react(),
2426
tsconfigPaths(),
2527
createPosthogPlugin(env, "posthog-code-renderer"),

0 commit comments

Comments
 (0)