Desktop App Tailwind 4#1771
Conversation
Also fix accidental renames inside strings Update tailwind-scrollbar Update Kobalte Use Tailwind 3's default border color selection Remove Kobalte's tailwind plugin as it's no longer needed with Tailwind 4
|
please review the pr @greptileai |
| @@ -759,7 +759,7 @@ export function ExportPage() { | |||
| /> | |||
| <Show when={previewLoading()}> | |||
| <div class="absolute inset-0 z-50 overflow-hidden pointer-events-none"> | |||
| <div class="absolute inset-y-0 w-full animate-shimmer bg-gradient-to-r from-transparent from-30% via-white/60 via-50% to-transparent to-70%" /> | |||
| <div class="absolute inset-y-0 w-full animate-shimmer bg-linear-to-r from-transparent from-30% via-white/60 via-50% to-transparent to-70%" /> | |||
There was a problem hiding this comment.
Missing
shimmer keyframe definition
animate-shimmer is still used here, but the shimmer keyframe was only defined in apps/desktop/tailwind.config.js, which was deleted as part of this migration. No replacement definition was added to packages/ui-solid/src/main.css or apps/desktop/src/styles/theme.css. The loading skeleton shimmer effect on the export preview will be a no-op — the element will have the animation class but no matching @keyframes block, so nothing will animate.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/routes/editor/ExportPage.tsx
Line: 747-762
Comment:
**Missing `shimmer` keyframe definition**
`animate-shimmer` is still used here, but the `shimmer` keyframe was only defined in `apps/desktop/tailwind.config.js`, which was deleted as part of this migration. No replacement definition was added to `packages/ui-solid/src/main.css` or `apps/desktop/src/styles/theme.css`. The loading skeleton shimmer effect on the export preview will be a no-op — the element will have the animation class but no matching `@keyframes` block, so nothing will animate.
How can I resolve this? If you propose a fix, please make it concise.| @@ -503,7 +503,7 @@ export const CameraPreviewWindow = ({ | |||
| setSize((s) => (s === "sm" ? "lg" : "sm")); | |||
| }} | |||
| className={clsx( | |||
| "p-2 rounded-lg ui-pressed:bg-gray-3 ui-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
| "p-2 rounded-lg data-pressed:bg-gray-3 data-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
| size === "lg" && "bg-gray-3 text-gray-12", | |||
| )} | |||
| > | |||
| @@ -522,7 +522,7 @@ export const CameraPreviewWindow = ({ | |||
| ); | |||
| }} | |||
| className={clsx( | |||
| "p-2 rounded-lg ui-pressed:bg-gray-3 ui-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
| "p-2 rounded-lg data-pressed:bg-gray-3 data-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
| shape !== "round" && "bg-gray-3 text-gray-12", | |||
| )} | |||
| > | |||
| @@ -539,7 +539,7 @@ export const CameraPreviewWindow = ({ | |||
| setMirrored((m) => !m); | |||
| }} | |||
| className={clsx( | |||
| "p-2 rounded-lg ui-pressed:bg-gray-3 ui-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
| "p-2 rounded-lg data-pressed:bg-gray-3 data-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
| mirrored && "bg-gray-3 text-gray-12", | |||
| )} | |||
| > | |||
| @@ -553,7 +553,7 @@ export const CameraPreviewWindow = ({ | |||
| handleTogglePictureInPicture(); | |||
| }} | |||
| className={clsx( | |||
| "p-2 rounded-lg ui-pressed:bg-gray-3 ui-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
| "p-2 rounded-lg data-pressed:bg-gray-3 data-pressed:text-gray-12 hover:bg-gray-3 hover:text-gray-12", | |||
There was a problem hiding this comment.
data-pressed: variant not supported in Tailwind v3
The web app (apps/web) uses Tailwind v3 (declared as "tailwindcss": "^3" in its package.json). Tailwind v3 requires bracket syntax for arbitrary data-attribute variants: data-[pressed]:bg-gray-3, not data-pressed:bg-gray-3. The shorthand data-pressed: without brackets is a Tailwind v4-only feature. Since the old ui-pressed: variant (from @kobalte/tailwindcss, which was also removed from packages/ui/style/tailwind.config.js) has been replaced with the v4 syntax, these five toolbar buttons will never show their pressed/active state background highlight.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/app/(org)/dashboard/caps/components/web-recorder-dialog/CameraPreviewWindow.tsx
Line: 495-556
Comment:
**`data-pressed:` variant not supported in Tailwind v3**
The web app (`apps/web`) uses Tailwind v3 (declared as `"tailwindcss": "^3"` in its `package.json`). Tailwind v3 requires bracket syntax for arbitrary data-attribute variants: `data-[pressed]:bg-gray-3`, not `data-pressed:bg-gray-3`. The shorthand `data-pressed:` without brackets is a Tailwind v4-only feature. Since the old `ui-pressed:` variant (from `@kobalte/tailwindcss`, which was also removed from `packages/ui/style/tailwind.config.js`) has been replaced with the v4 syntax, these five toolbar buttons will never show their pressed/active state background highlight.
How can I resolve this? If you propose a fix, please make it concise.|
|
||
| const toggleControlStyles = cva( | ||
| "rounded-full bg-gray-6 ui-disabled:bg-gray-3 ui-checked:bg-blue-500 transition-colors outline-2 outline-offset-2 outline-blue-300", | ||
| "rounded-full bg-gray-6 data-disabled:bg-gray-3 data-checked:bg-blue-500 transition-colors", | ||
| { |
There was a problem hiding this comment.
Focus ring styles removed from Toggle
The outline-2 outline-offset-2 outline-blue-300 classes were dropped from the base toggleControlStyles. These set the shape, width, and color of the focus indicator used by keyboard and assistive-technology users. Verify that an equivalent focus-visible:outline-* ring is applied via another mechanism; otherwise toggling elements will lose their focus state entirely.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/components/Toggle.tsx
Line: 4-7
Comment:
**Focus ring styles removed from Toggle**
The `outline-2 outline-offset-2 outline-blue-300` classes were dropped from the base `toggleControlStyles`. These set the shape, width, and color of the focus indicator used by keyboard and assistive-technology users. Verify that an equivalent `focus-visible:outline-*` ring is applied via another mechanism; otherwise toggling elements will lose their focus state entirely.
How can I resolve this? If you propose a fix, please make it concise.
|
| Dimension | Score | What it measures |
|---|---|---|
| Identity | 30 | Account age, contribution history, GPG keys, org memberships |
| Behavior | 80 | PR patterns, unsolicited contribution ratio, activity cadence |
| Content | 100 | PR body substance, issue linkage, contribution quality |
| Graph | 30 | Cross-repo trust, co-contributor relationships |
Analyzed by Brin · Full profile
This was mostly handled with Tailwind's auto upgrade utility.
It fixes one issue where the
cursor-defaultwasn't respected.Now using
antialiasedfont smoothing for better visual clarity.Updated related packages:
Removed tailwind-animate in favor of tw-animate-css due to lacking v4 support.
Greptile Summary
This PR migrates the desktop app from Tailwind CSS v3 to v4, replacing
tailwind.config.jswith CSS-native@themetokens, switching from@kobalte/tailwindcssui-*variants to standarddata-*variants, and swappingtailwindcss-animatefortw-animate-css. The auto-upgrade tool handled most of the mechanical conversion.shimmerkeyframe was only defined in the deletedapps/desktop/tailwind.config.js.animate-shimmeris still used inExportPage.tsx(lines 747, 762) with no replacement@keyframesblock inmain.cssortheme.css.data-pressed:invalid in Tailwind v3 (web app):CameraPreviewWindow.tsxwas updated to usedata-pressed:bg-gray-3/data-pressed:text-gray-12, butapps/webstill runs Tailwind v3, which requires bracket syntax (data-[pressed]:). All five toolbar buttons will silently lose their pressed-state highlight.outline-2 outline-offset-2 outline-blue-300were dropped from the base toggle control styles without afocus-visible:replacement.Confidence Score: 3/5
Not safe to merge as-is — two P1 regressions affect visible user-facing behavior.
Two P1 bugs are present: the shimmer loading animation is broken in the export page, and pressed-state toolbar button styles are silently dropped in the web app due to a Tailwind v3/v4 version mismatch. The rest of the migration looks mechanically correct.
apps/desktop/src/routes/editor/ExportPage.tsx(missing shimmer keyframe) andapps/web/app/(org)/dashboard/caps/components/web-recorder-dialog/CameraPreviewWindow.tsx(data-pressed:incompatible with Tailwind v3).Important Files Changed
animate-shimmeron loading skeleton overlays, but theshimmerkeyframe definition was removed with the deleted tailwind config — animation will be broken.ui-pressed:todata-pressed:on toolbar buttons, but the web app uses Tailwind v3 which requires bracket syntax (data-[pressed]:); pressed-state styles will be silently omitted.shimmerkeyframe is still referenced in ExportPage.tsx with no replacement definition.@tailwind base/components/utilitieswith@import "tailwindcss", migrates all color/shadow tokens to CSS custom properties in@theme, replacestailwindcss-animatewithtw-animate-css, and adds@apply antialiasedon:root.@cap/ui-solid/main.css, registers@tailwindcss/typographyandtailwind-scrollbaras@plugin, and adds a@layer baseoverride to preserve Tailwind v3's default border color.ui-*variants todata-*and simplifies spacing to Tailwind tokens; removes the focus ring outline classes from the base toggle styles.@kobalte/tailwindcssplugin from the shared web config; still uses Tailwind v3, so any remainingui-*variant usage in web code should have been updated.ui-*Kobalte variants todata-*Tailwind v4 variants and arbitrary value classes to named tokens across all shared UI primitives.@cap/ui/postcssconfig with an inline@tailwindcss/postcss+autoprefixerconfig appropriate for Tailwind v4.tailwindcss@^4.2.2, replacestailwindcss-animatewithtw-animate-css, upgradestailwind-scrollbarto^4.0.2, and removes@kobalte/tailwindcssandtailwindcssfrom peer deps.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "format" | Re-trigger Greptile