Skip to content

Conversation

@kyrers
Copy link

@kyrers kyrers commented Oct 23, 2025

Resolves #88.


PR-Codex overview

This PR focuses on replacing styled-components with Tailwind CSS for styling, enhancing the overall styling consistency and maintainability. It also removes unused styles and components, streamlining the codebase.

Detailed summary

  • Removed styled-components and associated styles.
  • Integrated Tailwind CSS for styling across components.
  • Updated Overlay, Logo, InfoCard, and other components to use Tailwind classes.
  • Deleted unused styles and files related to themes and global styles.
  • Replaced modal and other components with Tailwind-based alternatives.

The following files were skipped due to too many changes: yarn.lock

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Chores

    • Upgraded UI library, added Tailwind tooling and build plugin, and removed react-modal, styled-components and their type packages.
  • New Features

    • Added a CSS-based ThemeProvider with persisted dark/light toggle and a comprehensive global stylesheet improving dark mode, scrollbars, toasts and base typography.
  • Refactor

    • Migrated styling from CSS-in-JS to utility/class-based (Tailwind) across layout and many components; removed legacy styled helpers and exported theme objects.

@kyrers kyrers self-assigned this Oct 23, 2025
@netlify
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for curate-v2 failed. Why did it fail? →

Name Link
🔨 Latest commit a19329a
🔍 Latest deploy log https://app.netlify.com/projects/curate-v2/deploys/690a6fe4f3032e00089aeb18

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Walkthrough

Migrates the frontend from styled-components to Tailwind: upgrades @kleros/ui-components-library to v3, removes styled-components/react-modal and related types, adds Tailwind tooling and global.css, replaces the styled ThemeProvider with a DOM-class-based ThemeProvider, and converts many components to utility/class-based styling.

Changes

Cohort / File(s) Change Summary
Dependencies & Build
web/package.json, web/vite.config.js
Bump @kleros/ui-components-library ^2.x → ^3.6.0; remove styled-components, react-modal, and their @types; add tailwindcss & @tailwindcss/vite ^4.1.16; register Tailwind plugin in Vite.
App root / Provider swap
web/src/app.tsx
Replace StyledComponentsProvider with new ThemeProvider and import ./global.css.
New Theme provider
web/src/context/ThemeProvider.tsx
Add ThemeProvider using useLocalStorage, toggleTheme, and applying dark CSS class to document.documentElement; provides ToggleThemeProvider context.
Removed styled-components provider
web/src/context/StyledComponentsProvider.tsx (deleted)
Delete previous styled-components-based provider and export.
Global stylesheet (Tailwind + tokens)
web/src/global.css (new)
Add global CSS importing UI library tokens and Tailwind; define CSS variables, dark-mode overrides, typography, skeleton/toast/scrollbar, and other tokens.
Remove CSS-in-JS themes & helpers
web/src/styles/*
commonStyles.ts, customScrollbar.ts, global-style.ts, landscapeStyle.ts, themes.ts (deleted/removed)
Remove styled-components global styles, theme objects, and CSS-in-JS helpers; styling migrated to class-based/Tailwind approach.
Type declarations
web/global.d.ts
Remove styled-components DefaultTheme augmentation; convert to module (export {}) while keeping asset declarations.
Modal setup removed
web/src/index.tsx
Remove react-modal import and Modal.setAppElement(container) call.
Web3 theming tweak
web/src/context/Web3Provider.tsx
Replace import-based theme color with hardcoded #4D00B4 in themeVariables.
Layout & component style migration
many files under web/src/layout/**, web/src/components/** (examples below)
Replace styled-components wrappers with plain JSX and Tailwind-like className strings across headers, menus, settings, buttons, overlays, and various components; preserve logic and public APIs.
Examples of migrated files
web/src/layout/index.tsx, web/src/layout/Header/**, web/src/components/Overlay*.tsx, web/src/components/LightButton.tsx, web/src/components/ConnectWallet/**, web/src/components/InfoCard.tsx, web/src/components/AccountDisplay.tsx
Styling moved from styled-components to utility classes; structural simplifications and className-driven UI; preserved behavior and public APIs.

Sequence Diagram(s)

sequenceDiagram
    participant App as App.tsx
    participant Theme as ThemeProvider
    participant ToggleCtx as ToggleThemeProvider
    participant Document as document.documentElement

    App->>Theme: render <ThemeProvider>{children}
    Theme->>Theme: read theme from localStorage (default "dark")
    Theme->>ToggleCtx: provide { theme, toggleTheme }
    Theme->>Document: add/remove "dark" class on theme change

    rect rgba(46,204,113,0.08)
    Note right of Theme: toggleTheme updates state → persists to localStorage
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Files/areas needing extra attention:
    • web/src/global.css — large token surface and dark-mode mappings.
    • Removal of web/src/styles/themes.ts and web/global.d.ts augmentation — search for remaining styled-components typings/usages.
    • Visual/regression checks for headers, menus, responsive behavior after migration.
    • web/vite.config.js / web/package.json — verify Tailwind plugin registration and versions.
    • web/src/context/Web3Provider.tsx — verify hardcoded color intent.

Possibly related issues

Possibly related PRs

Suggested labels

Type: Enhancement :sparkles:, Package: Web

Suggested reviewers

  • kemuru
  • Harman-singh-waraich

Poem

🐇 A tailwind hop, a stylesheet cheer,
New classes bloom and old rules clear.
Themes on the root, a darker crown,
Tokens tidy, pixels calm down.
Rabbit nods — fresh code, light and dear.

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore: migrate from styled components to tailwind' accurately describes the primary objective of the changeset—a comprehensive migration from styled-components to Tailwind CSS.
Linked Issues check ✅ Passed The PR successfully addresses all coding objectives from issue #88: upgrades @kleros/ui-components-library to v3, replaces styled-components with Tailwind across the codebase, integrates @tailwindcss/vite into Vite build, introduces ThemeProvider for theme management, and updates global CSS with Tailwind directives.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the Tailwind migration objective. The PR removes styled-components dependencies, adds Tailwind tooling, refactors components to use Tailwind classes, and updates theme handling—all scoped to the migration requirements without extraneous modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/migrate-from-styled-components-to-tailwind

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between beaca69 and a19329a.

📒 Files selected for processing (2)
  • web/src/components/ConnectWallet/AccountDisplay.tsx (2 hunks)
  • web/src/layout/Header/navbar/DappList.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/src/components/ConnectWallet/AccountDisplay.tsx
  • web/src/layout/Header/navbar/DappList.tsx

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
web/src/global.css (1)

60-62: Consider reducing !important usage.

The !important declarations on lines 61 and 147 override library defaults for ReactModal and Toastify. While sometimes necessary for third-party library overrides, consider if these can be achieved through higher CSS specificity instead.

If the library CSS is loaded before your global styles, you may be able to increase specificity without !important:

/* Instead of: */
.ReactModal__Overlay {
  background-color: #1b003fcc !important;
}

/* Try: */
.ReactModal__Overlay.ReactModal__Overlay {
  background-color: #1b003fcc;
}

Also applies to: 145-148

web/src/context/ThemeProvider.tsx (1)

8-8: Improve type safety for theme values.

The theme is currently typed as string, which allows any string value. This should be constrained to the valid theme values for better type safety and developer experience.

Apply this diff to add proper typing:

+type Theme = "light" | "dark";
+
 const ThemeProvider: React.FC<{
   children: React.ReactNode;
 }> = ({ children }) => {
-  const [theme, setTheme] = useLocalStorage<string>("theme", "dark");
+  const [theme, setTheme] = useLocalStorage<Theme>("theme", "dark");
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc5502a and ad2c61b.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (11)
  • web/package.json (2 hunks)
  • web/src/app.tsx (3 hunks)
  • web/src/context/StyledComponentsProvider.tsx (0 hunks)
  • web/src/context/ThemeProvider.tsx (1 hunks)
  • web/src/global.css (1 hunks)
  • web/src/styles/commonStyles.ts (0 hunks)
  • web/src/styles/customScrollbar.ts (0 hunks)
  • web/src/styles/global-style.ts (0 hunks)
  • web/src/styles/landscapeStyle.ts (0 hunks)
  • web/src/styles/themes.ts (0 hunks)
  • web/vite.config.js (2 hunks)
💤 Files with no reviewable changes (6)
  • web/src/styles/global-style.ts
  • web/src/styles/landscapeStyle.ts
  • web/src/styles/themes.ts
  • web/src/styles/commonStyles.ts
  • web/src/styles/customScrollbar.ts
  • web/src/context/StyledComponentsProvider.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - curate-v2
  • GitHub Check: Header rules - curate-v2
  • GitHub Check: Pages changed - curate-v2
🔇 Additional comments (6)
web/vite.config.js (1)

5-5: LGTM! Tailwind v4 Vite integration is correct.

The Tailwind CSS integration follows the standard pattern for v4 with Vite using the @tailwindcss/vite plugin.

Also applies to: 32-32

web/src/global.css (1)

1-20: LGTM! Tailwind v4 @theme directive and imports are correctly structured.

The global CSS setup follows Tailwind v4 best practices: importing the UI library theme, importing Tailwind, and defining custom design tokens via the @theme directive. The token definitions are comprehensive and well-organized.

web/package.json (2)

78-78: LGTM! Tailwind CSS dependencies are correctly added.

Both tailwindcss and @tailwindcss/vite are on the same version (4.1.16), which ensures consistency. The @tailwindcss/vite package is appropriately placed in both dependencies and devDependencies for build tooling access.

Also applies to: 107-107


73-73: Manually verify component compatibility after Tailwind migration to v3.6.0.

The upgrade to v3.6.0 involved a major migration from styled-components to Tailwind CSS. The library was migrated to Tailwind CSS, which includes changes to component styling and theming. Tailwind is already configured in the project (v4.1.16).

The codebase uses 23+ components from the library across 40+ files, including several internal components prefixed with underscore (_TimelineItem1, _IItem1). However, no public changelog documents specific breaking changes and component API modifications for v3.6.0.

Actions required:

  • Test all component usages throughout the application (run tests and manual QA)
  • Verify visual regressions from CSS token/spacing changes
  • Confirm internal components (_TimelineItem1, _IItem1) remain stable and exported in v3
  • Check for any prop renames or removed component APIs against the library's Storybook or GitHub repository
web/src/context/ThemeProvider.tsx (1)

10-22: LGTM! Dark mode implementation is correct.

The theme toggling logic and the useEffect that applies the dark class to document.documentElement correctly implements Tailwind's class-based dark mode strategy. The implementation will work seamlessly with Tailwind's dark: variant.

web/src/app.tsx (1)

4-4: LGTM! Theme provider migration is correctly implemented.

The migration from StyledComponentsProvider to the new ThemeProvider is clean and correct. The global.css import is properly placed early in the file, and the ThemeProvider correctly wraps the entire application as the outermost provider to ensure theme context is available throughout the component tree.

Also applies to: 7-7, 26-26, 59-59

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
web/src/context/Web3Provider.tsx (1)

62-62: Consider adding the brand color to the theme system for maintainability.

The hardcoded color #4D00B4 is correct—it matches the primary brand color used throughout SVG assets. However, since the codebase has migrated to Tailwind with a theme system (defined in web/src/global.css), consider adding this color to the @theme block for consistency and easier maintenance:

/* In web/src/global.css @theme block */
--color-primary: #4D00B4;

Then reference it in Web3Provider:

"--w3m-color-mix": "var(--color-primary)",

This keeps brand colors centralized and easier to maintain across the codebase. The color itself doesn't need to change between light/dark modes—this is a brand constant, not a theme-dependent color.

web/src/layout/index.tsx (1)

22-22: Consider extracting the hardcoded spacing value.

The hardcoded pt-[70px] value appears to offset the ToastContainer from the header. For better maintainability and theme consistency, consider defining this as a CSS variable or Tailwind theme extension that matches the header height.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ad2c61b and d2d2579.

📒 Files selected for processing (3)
  • web/global.d.ts (1 hunks)
  • web/src/context/Web3Provider.tsx (1 hunks)
  • web/src/layout/index.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - curate-v2
  • GitHub Check: Header rules - curate-v2
  • GitHub Check: Pages changed - curate-v2
🔇 Additional comments (2)
web/src/layout/index.tsx (1)

23-23: Consider adding dark mode variant.

The background class bg-klerosUIComponentsLightBackground implies a light theme background. Based on the PR's ThemeProvider that toggles a document-level dark class, consider whether this element needs a corresponding dark mode variant (e.g., dark:bg-klerosUIComponentsDarkBackground).

web/global.d.ts (1)

1-12: LGTM!

The removal of styled-components module augmentation is appropriate for the Tailwind migration. The file correctly preserves the necessary ambient declarations for SVG and PNG imports while maintaining proper module structure with the export {} statement.

@kleros kleros deleted a comment from coderabbitai bot Oct 24, 2025
@kleros kleros deleted a comment from coderabbitai bot Oct 24, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 30, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 20

🧹 Nitpick comments (3)
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx (1)

45-45: Consider using standard spacing scale instead of arbitrary value.

The arbitrary value mb-[10px] works correctly in Tailwind v4, but using the standard spacing scale improves consistency across the codebase. Since 10px equals 2.5rem (2.5 × 4px), consider using mb-2.5 instead.

-      <label className="flex justify-between mb-[10px]">{contactLabel}</label>
+      <label className="flex justify-between mb-2.5">{contactLabel}</label>
web/src/layout/Header/Logo.tsx (2)

8-13: Remove unnecessary whitespace literal.

The {" "} on line 9 serves no purpose and can be removed for cleaner code.

Apply this diff:

  <div className="flex flex-row items-center gap-4">
-    {" "}
    <Link to={"/"}>
      <CurateLogo className="transition duration-100 max-h-12 w-auto hover:fill-white/75" />
    </Link>
  </div>

10-12: Add accessible label for the logo link.

The logo link lacks descriptive text for screen readers. Add an aria-label to improve accessibility.

Apply this diff:

-    <Link to={"/"}>
+    <Link to={"/"} aria-label="Home">
      <CurateLogo className="transition duration-100 max-h-12 w-auto hover:fill-white/75" />
    </Link>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f638cb8 and bb0901b.

📒 Files selected for processing (23)
  • web/src/app.tsx (3 hunks)
  • web/src/components/ConnectWallet/AccountDisplay.tsx (2 hunks)
  • web/src/components/InfoCard.tsx (1 hunks)
  • web/src/components/LightButton.tsx (1 hunks)
  • web/src/components/Overlay.tsx (1 hunks)
  • web/src/components/OverlayPortal.tsx (1 hunks)
  • web/src/context/ThemeProvider.tsx (1 hunks)
  • web/src/global.css (1 hunks)
  • web/src/layout/Header/DesktopHeader.tsx (1 hunks)
  • web/src/layout/Header/Logo.tsx (1 hunks)
  • web/src/layout/Header/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/DappList.tsx (1 hunks)
  • web/src/layout/Header/navbar/Debug.tsx (2 hunks)
  • web/src/layout/Header/navbar/Explore.tsx (2 hunks)
  • web/src/layout/Header/navbar/Menu/Help.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/General.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx (3 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Product.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/src/context/ThemeProvider.tsx
  • web/src/app.tsx
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`
📚 Learning: 2024-11-04T13:31:54.080Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:72-96
Timestamp: 2024-11-04T13:31:54.080Z
Learning: In the React TypeScript component `FormContactDetails` in `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, error handling and user feedback are implemented within the `addUser` and `updateEmail` functions, which display toasts to the user.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx
  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/index.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx
📚 Learning: 2024-11-04T13:41:31.226Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:126-126
Timestamp: 2024-11-04T13:41:31.226Z
Learning: In `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, the `isUndefined` function effectively handles `null` or `undefined` values. Therefore, using the non-null assertion `!` on `user?.emailUpdateableAt` when calling `timeLeftUntil(user?.emailUpdateableAt!)` is acceptable, as potential `null` or `undefined` cases are already managed.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/index.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx
📚 Learning: 2024-11-04T13:33:39.755Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/pages/Settings/index.tsx:18-26
Timestamp: 2024-11-04T13:33:39.755Z
Learning: In `web/src/pages/Settings/index.tsx`, the parent route handles the default `/settings` route, error boundaries, and loading states, so it's not necessary to include them in this component.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/index.tsx
📚 Learning: 2024-11-04T13:39:19.748Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/utils/atlas/updateEmail.ts:21-38
Timestamp: 2024-11-04T13:39:19.748Z
Learning: For the `updateEmail` function in `web/src/utils/atlas/updateEmail.ts`, input validation and error handling are performed in the component that utilizes it. Therefore, additional checks within this utility function are unnecessary.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx
📚 Learning: 2024-11-04T13:34:45.425Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/utils/atlas/confirmEmail.ts:24-36
Timestamp: 2024-11-04T13:34:45.425Z
Learning: In the `confirmEmail` function in `web/src/utils/atlas/confirmEmail.ts`, input validation for the address is performed in the calling component, and additional checks are done in the API call itself. Input validation does not need to be repeated in this function.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx
📚 Learning: 2024-11-04T13:29:55.971Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/context/AtlasProvider.tsx:176-193
Timestamp: 2024-11-04T13:29:55.971Z
Learning: In the `web/src/context/AtlasProvider.tsx` file of the React application, the `authoriseUser` function handles session invalidation and delegates error handling and user notifications to the functions that invoke it. Therefore, adding error notifications within `authoriseUser` is unnecessary.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx
📚 Learning: 2025-10-24T21:25:59.174Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`

Applied to files:

  • web/src/global.css
🧬 Code graph analysis (5)
web/src/layout/Header/navbar/Debug.tsx (1)
web/src/consts/index.ts (2)
  • RELEASE_VERSION (12-12)
  • GIT_URL (11-11)
web/src/layout/Header/navbar/Menu/Settings/General.tsx (2)
web/src/components/EnsureChain.tsx (1)
  • EnsureChain (10-14)
web/src/components/ConnectWallet/AccountDisplay.tsx (3)
  • IdenticonOrAvatar (16-34)
  • AddressOrName (40-50)
  • ChainDisplay (52-56)
web/src/layout/Header/navbar/Menu/Settings/Notifications/index.tsx (2)
web/src/layout/Header/navbar/index.tsx (1)
  • ISettings (54-56)
web/src/components/EnsureChain.tsx (1)
  • EnsureChain (10-14)
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx (1)
web/src/utils/date.ts (1)
  • timeLeftUntil (43-69)
web/src/layout/Header/index.tsx (1)
web/src/utils/getGraphqlUrl.ts (1)
  • getGraphqlUrl (3-7)
🔇 Additional comments (12)
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx (1)

45-52: Migration looks clean, but verify label-input association for accessibility.

The migration from styled-components to Tailwind classes is well-executed. However, the <label> on line 45 lacks a htmlFor attribute to associate it with the input field. If the Field component renders an input element, ensure proper label-input association for accessibility.

Consider adding a htmlFor attribute if the Field component exposes an id:

-      <label className="flex justify-between mb-[10px]">{contactLabel}</label>
+      <label htmlFor="contact-input" className="flex justify-between mb-[10px]">{contactLabel}</label>
       <Field
         className="flex flex-col items-center w-full"
+        id="contact-input"
         variant={fieldVariant}

Alternatively, if the Field component from @kleros/ui-components-library handles accessibility internally or doesn't support id props, you may disregard this suggestion.

web/src/layout/Header/navbar/DappList.tsx (1)

98-98: LGTM!

The h1 header uses standard Tailwind utility classes correctly.

web/src/layout/Header/navbar/Menu/Help.tsx (1)

52-53: The breakpoint is already properly configured—no action needed.

The custom landscape-900: breakpoint is correctly defined in web/src/global.css using Tailwind v4's @theme block with the --breakpoint-landscape-900: 900px; variable, which automatically creates the responsive modifier. The review comment incorrectly assumes traditional Tailwind configuration (JS/TS config file), which is not applicable to Tailwind v4's CSS-first approach. The code at lines 52-53 in Help.tsx correctly uses this pre-configured breakpoint.

Likely an incorrect or invalid review comment.

web/src/layout/Header/navbar/Debug.tsx (1)

5-20: LGTM!

The migration from styled-components to className-based styling is implemented correctly. The arbitrary font-family syntax font-[Roboto_Mono,monospace] is proper Tailwind v4 usage.

web/src/components/Overlay.tsx (1)

1-5: LGTM!

Clean conversion from styled-component to a functional component with Tailwind classes. The bg-black-low-opacity custom color should be defined in your theme configuration.

web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx (1)

36-49: LGTM!

Successful migration from styled-components to utility classes. The SVG fill and layout classes are properly applied.

web/src/global.css (2)

1-67: Well-structured Tailwind v4 integration.

The global stylesheet properly:

  • Imports the UI library theme and Tailwind v4 using the new @import syntax
  • Defines custom theme tokens via @theme directive
  • Implements accessible focus management with :focus-visible (addressing the previous review concern)

The focus styling (lines 60-67) now correctly preserves keyboard navigation accessibility while removing focus outlines for mouse users.


138-142: Verify browser support for CSS nesting.

The nested selector syntax ul { li { ... } } requires modern browsers. Based on your Tailwind v4 adoption (which targets Chrome 111+, Safari 16.4+, Firefox 128+), this should be supported, but confirm this aligns with your browser compatibility requirements.

web/src/layout/Header/index.tsx (1)

12-33: LGTM! Clean migration to Tailwind v4 syntax.

The header structure correctly uses Tailwind v4 features including advanced selector syntax for StatusBanner styling and CSS variables for theme integration. The sticky positioning and backdrop blur effects are properly configured.

web/src/layout/Header/navbar/Menu/Settings/General.tsx (1)

20-49: LGTM! Proper use of Tailwind v4 advanced features.

The component correctly uses Tailwind v4's advanced selector syntax ([&>label], [&_label]) and pseudo-element utilities (before:content-['']) to style nested elements. The layout structure is clean and maintains the original functionality.

web/src/layout/Header/DesktopHeader.tsx (1)

43-43: LGTM! Correct Tailwind v4 important modifier syntax.

The important modifier is correctly placed at the end of the utility class (fill-white!), which is the proper Tailwind v4 syntax.

web/src/layout/Header/navbar/Menu/Settings/Notifications/index.tsx (1)

18-30: LGTM!

The migration to Tailwind utilities is well-executed. The flexbox layout structure correctly preserves the component's intended design with proper centering and spacing.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (1)
web/src/components/ConnectWallet/AccountDisplay.tsx (1)

78-80: Fix merged utility class separator.

The concatenated strings still miss a trailing space before landscape-900:hidden, so the output becomes before:ml-[3px]landscape-900:hidden and Tailwind drops both utilities. Add the separator (or switch to a template literal) so each class stays intact.

-          "before:content-[''] before:w-2 before:h-2 before:rounded-[50%] before:bg-klerosUIComponentsSuccess before:my-0 before:mr-[13px] before:ml-[3px]" +
+          "before:content-[''] before:w-2 before:h-2 before:rounded-[50%] before:bg-klerosUIComponentsSuccess before:my-0 before:mr-[13px] before:ml-[3px] " +
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb0901b and 318211a.

📒 Files selected for processing (13)
  • web/src/components/ConnectWallet/AccountDisplay.tsx (2 hunks)
  • web/src/components/InfoCard.tsx (1 hunks)
  • web/src/components/LightButton.tsx (1 hunks)
  • web/src/global.css (1 hunks)
  • web/src/layout/Header/DesktopHeader.tsx (1 hunks)
  • web/src/layout/Header/Logo.tsx (1 hunks)
  • web/src/layout/Header/navbar/DappList.tsx (1 hunks)
  • web/src/layout/Header/navbar/Explore.tsx (2 hunks)
  • web/src/layout/Header/navbar/Menu/Help.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx (3 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Product.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • web/src/components/InfoCard.tsx
  • web/src/layout/Header/navbar/Explore.tsx
  • web/src/layout/Header/Logo.tsx
  • web/src/components/LightButton.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`
📚 Learning: 2025-10-24T21:25:59.174Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`

Applied to files:

  • web/src/global.css
📚 Learning: 2024-11-04T13:33:39.755Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/pages/Settings/index.tsx:18-26
Timestamp: 2024-11-04T13:33:39.755Z
Learning: In `web/src/pages/Settings/index.tsx`, the parent route handles the default `/settings` route, error boundaries, and loading states, so it's not necessary to include them in this component.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2024-11-04T13:31:54.080Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:72-96
Timestamp: 2024-11-04T13:31:54.080Z
Learning: In the React TypeScript component `FormContactDetails` in `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, error handling and user feedback are implemented within the `addUser` and `updateEmail` functions, which display toasts to the user.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2024-11-04T13:41:31.226Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:126-126
Timestamp: 2024-11-04T13:41:31.226Z
Learning: In `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, the `isUndefined` function effectively handles `null` or `undefined` values. Therefore, using the non-null assertion `!` on `user?.emailUpdateableAt` when calling `timeLeftUntil(user?.emailUpdateableAt!)` is acceptable, as potential `null` or `undefined` cases are already managed.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - curate-v2
  • GitHub Check: Header rules - curate-v2
  • GitHub Check: Pages changed - curate-v2
🔇 Additional comments (2)
web/src/layout/Header/navbar/Menu/Help.tsx (1)

48-69: LGTM! Previous issues resolved.

The Tailwind utility classes are now correct, and the className concatenation includes proper spacing.

web/src/layout/Header/navbar/Menu/Settings/index.tsx (1)

39-39: Previous issues resolved.

The invalid width-[calc(...)] utility has been corrected to w-[calc(...)].

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
web/src/layout/Header/navbar/Product.tsx (1)

39-39: Consider removing unnecessary flex class.

The <small> element contains only text and uses text-center for alignment. The flex class appears unnecessary since text-center alone handles text alignment for inline content.

-      <small className="flex font-normal text-center leading-[19px]">{text}</small>
+      <small className="font-normal text-center leading-[19px]">{text}</small>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 318211a and dba15bb.

📒 Files selected for processing (7)
  • web/src/components/LightButton.tsx (1 hunks)
  • web/src/layout/Header/navbar/DappList.tsx (1 hunks)
  • web/src/layout/Header/navbar/Explore.tsx (2 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx (3 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Product.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • web/src/layout/Header/navbar/DappList.tsx
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx
  • web/src/components/LightButton.tsx
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`
📚 Learning: 2024-11-04T13:33:39.755Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/pages/Settings/index.tsx:18-26
Timestamp: 2024-11-04T13:33:39.755Z
Learning: In `web/src/pages/Settings/index.tsx`, the parent route handles the default `/settings` route, error boundaries, and loading states, so it's not necessary to include them in this component.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2024-11-04T13:31:54.080Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:72-96
Timestamp: 2024-11-04T13:31:54.080Z
Learning: In the React TypeScript component `FormContactDetails` in `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, error handling and user feedback are implemented within the `addUser` and `updateEmail` functions, which display toasts to the user.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2024-11-04T13:41:31.226Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:126-126
Timestamp: 2024-11-04T13:41:31.226Z
Learning: In `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, the `isUndefined` function effectively handles `null` or `undefined` values. Therefore, using the non-null assertion `!` on `user?.emailUpdateableAt` when calling `timeLeftUntil(user?.emailUpdateableAt!)` is acceptable, as potential `null` or `undefined` cases are already managed.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - curate-v2
  • GitHub Check: Header rules - curate-v2
  • GitHub Check: Pages changed - curate-v2
🔇 Additional comments (4)
web/src/layout/Header/navbar/Explore.tsx (2)

17-18: LGTM! Clean active route detection.

The isActive helper correctly handles both the root path (exact match) and nested routes (first segment comparison), which prevents false positives in navigation highlighting.


36-49: Custom utilities are properly configured—no changes required, but consider adding @source directive.

The className structure is correct and all custom utilities are properly defined in your Tailwind v4 setup:

  • text-klerosUIComponentsPrimaryText, text-primary-text-73, text-white-73 are configured via CSS variables in the @theme block
  • landscape-900: breakpoint is defined as --breakpoint-landscape-900: 900px
  • All utilities are actively used and functional throughout the codebase

Based on the learning context, consider adding the @source directive in web/src/global.css to explicitly tell Tailwind to scan the @kleros/ui-components-library for utility classes:

@source "../node_modules/@kleros/ui-components-library";
@import "@kleros/ui-components-library/theme.css";
@import "tailwindcss";

This ensures Tailwind can generate utilities from CSS variables in the external library, though the current setup appears to be working without it.

web/src/layout/Header/navbar/Product.tsx (1)

16-25: Previous critical issues successfully resolved!

All three issues from the previous review have been properly addressed:

  1. ✅ Security: rel="noopener noreferrer" added
  2. ✅ Styling: className construction fixed and dynamic width moved to style prop
  3. ✅ This segment demonstrates proper Tailwind v4 migration pattern
web/src/layout/Header/navbar/Menu/index.tsx (1)

37-37: Clean responsive layout structure.

The flex layout with responsive breakpoint is well-structured for converting the menu from vertical to horizontal orientation.

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 31, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web/src/layout/Header/navbar/index.tsx (1)

2-2: Remove unused styled-components import.

The styled import is no longer used after migrating to Tailwind utility classes.

Apply this diff to remove the unused import:

-import styled from "styled-components";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dba15bb and f3b7df3.

📒 Files selected for processing (3)
  • web/src/layout/Header/MobileHeader.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx (2 hunks)
  • web/src/layout/Header/navbar/index.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`
🧬 Code graph analysis (1)
web/src/layout/Header/navbar/index.tsx (1)
web/src/layout/Header/navbar/Menu/Settings/General.tsx (1)
  • DisconnectWalletButton (7-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - curate-v2
  • GitHub Check: Header rules - curate-v2
  • GitHub Check: Pages changed - curate-v2
🔇 Additional comments (2)
web/src/layout/Header/navbar/index.tsx (1)

59-66: LGTM! Wallet container refactoring is correct.

The replacement of styled components with Tailwind flex utilities is appropriate, and the wrapper div for vertical alignment maintains the intended layout.

web/src/layout/Header/MobileHeader.tsx (1)

29-29: Custom breakpoint is properly configured.

The landscape-900 breakpoint is defined as a CSS variable in web/src/global.css (line 21: --breakpoint-landscape-900: 900px;) and is successfully used across the codebase in multiple files (DesktopHeader, DappList, Explore, Menu, Settings, LightButton, AccountDisplay). The consistent usage throughout the project confirms proper Tailwind integration.

However, the icon-only button on line 33 lacks accessibility attributes — add aria-label or title to the LightButton since text="":

<LightButton className="p-0 [&_.button-svg]:mr-0" text="" Icon={HamburgerIcon} onClick={toggleIsOpen} aria-label="Toggle menu" />

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 31, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 3, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 3, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
web/src/layout/Header/navbar/Explore.tsx (1)

44-44: Simplify prop spreading.

The spread syntax {...{ to }} can be simplified to to={to} for better readability.

-          {...{ to }}
+          to={to}
web/src/components/ConnectWallet/AccountDisplay.tsx (1)

60-85: Consider using template literals for cleaner className definitions.

The current string concatenation with + operators works correctly (with proper spacing), but template literals would be more concise and idiomatic:

Example refactor for the outer div:

-      className={
-        "flex flex-col justify-between h-auto items-center gap-2 bg-klerosUIComponentsWhiteBackground p-0 cursor-pointer " +
-        "hover:[&_label]:text-white hover:[&_label]:transition-colors hover:[&_label]:duration-200 lg:hover:bg-white-low-opacity-strong lg:hover:transition-[background-color_0.1s] " +
-        "lg:bg-white-low-opacity-subtle lg:flex-row lg:content-center lg:rounded-[300px] lg:gap-0 lg:py-0 lg:px-3"
-      }
+      className={`
+        flex flex-col justify-between h-auto items-center gap-2 bg-klerosUIComponentsWhiteBackground p-0 cursor-pointer
+        hover:[&_label]:text-white hover:[&_label]:transition-colors hover:[&_label]:duration-200 lg:hover:bg-white-low-opacity-strong lg:hover:transition-[background-color_0.1s]
+        lg:bg-white-low-opacity-subtle lg:flex-row lg:content-center lg:rounded-[300px] lg:gap-0 lg:py-0 lg:px-3
+      `}

Apply the same pattern to the other className definitions for consistency.

web/src/layout/Header/navbar/Menu/index.tsx (1)

38-47: Consider using text as key instead of Icon.

Line 40 uses Icon as the key for mapped elements. Since Icon is a component reference, this works but is unconventional. Using text would be clearer and more idiomatic:

-        <div
-          key={Icon}
+        <div
+          key={text}

This makes the key more readable and aligns with typical React patterns.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fddfec9 and beaca69.

📒 Files selected for processing (10)
  • web/src/components/ConnectWallet/AccountDisplay.tsx (2 hunks)
  • web/src/components/LightButton.tsx (1 hunks)
  • web/src/layout/Header/DesktopHeader.tsx (1 hunks)
  • web/src/layout/Header/MobileHeader.tsx (1 hunks)
  • web/src/layout/Header/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/DappList.tsx (1 hunks)
  • web/src/layout/Header/navbar/Explore.tsx (2 hunks)
  • web/src/layout/Header/navbar/Menu/Help.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/index.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/src/components/LightButton.tsx
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`
📚 Learning: 2024-11-04T13:33:39.755Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/pages/Settings/index.tsx:18-26
Timestamp: 2024-11-04T13:33:39.755Z
Learning: In `web/src/pages/Settings/index.tsx`, the parent route handles the default `/settings` route, error boundaries, and loading states, so it's not necessary to include them in this component.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2024-11-04T13:31:54.080Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:72-96
Timestamp: 2024-11-04T13:31:54.080Z
Learning: In the React TypeScript component `FormContactDetails` in `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, error handling and user feedback are implemented within the `addUser` and `updateEmail` functions, which display toasts to the user.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2024-11-04T13:41:31.226Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx:126-126
Timestamp: 2024-11-04T13:41:31.226Z
Learning: In `web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx`, the `isUndefined` function effectively handles `null` or `undefined` values. Therefore, using the non-null assertion `!` on `user?.emailUpdateableAt` when calling `timeLeftUntil(user?.emailUpdateableAt!)` is acceptable, as potential `null` or `undefined` cases are already managed.

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2025-10-31T20:37:01.310Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/components/OverlayPortal.tsx:5-8
Timestamp: 2025-10-31T20:37:01.310Z
Learning: In Tailwind CSS v4, the `z-<number>` syntax directly sets `z-index: <number>;` for any numeric value (e.g., `z-9999` results in `z-index: 9999;`). Arbitrary value brackets `z-[<value>]` are not required for numeric z-index values in v4.
```
<!-- [remove_learning]
dcbe3a95-44f6-47d5-806e-64b74d549e4b

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
  • web/src/layout/Header/DesktopHeader.tsx
📚 Learning: 2025-10-24T21:25:59.174Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/index.tsx:15-28
Timestamp: 2025-10-24T21:25:59.174Z
Learning: In Tailwind v4, when using CSS variables from external libraries like kleros/ui-components-library, add the `source` directive in global.css to tell Tailwind to scan and generate utility classes from those variables. Example: `source "../node_modules/kleros/ui-components-library";`

Applied to files:

  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
  • web/src/layout/Header/navbar/Menu/index.tsx
  • web/src/layout/Header/DesktopHeader.tsx
📚 Learning: 2025-10-31T19:54:12.499Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/layout/Header/DesktopHeader.tsx:43-44
Timestamp: 2025-10-31T19:54:12.499Z
Learning: In Tailwind CSS v4, the important modifier uses a trailing `!` after the utility class (e.g., `fill-white!`), unlike v3 which used a leading `!` prefix (e.g., `!fill-white`). This applies to all utilities including arbitrary values and after variants (e.g., `sm:hover:bg-green-500!`).

Applied to files:

  • web/src/layout/Header/navbar/DappList.tsx
  • web/src/layout/Header/navbar/Menu/index.tsx
  • web/src/layout/Header/DesktopHeader.tsx
🧬 Code graph analysis (1)
web/src/layout/Header/index.tsx (1)
web/src/utils/getGraphqlUrl.ts (1)
  • getGraphqlUrl (3-7)
🔇 Additional comments (9)
web/src/layout/Header/navbar/Explore.tsx (2)

17-18: LGTM!

The isActive helper correctly handles route matching with appropriate special-casing for the root path.


38-42: Code is correct—no changes needed.

The className construction is properly structured, and the color names white-73 and primary-text-73 are legitimate custom theme colors defined in web/src/global.css within the Tailwind @theme block. These are not opacity syntax issues—they are intentionally named custom colors where -73 reflects their opacity level. The code correctly uses them via Tailwind utilities.

web/src/layout/Header/navbar/DappList.tsx (2)

98-101: Past issues properly addressed.

The inline style syntax is now correct:

  • Padding uses proper spaces in the template literal (not underscores)
  • Width is handled via inline styles rather than dynamic Tailwind classes
  • Grid utilities are properly applied

The previous critical issues flagged in past reviews have been successfully resolved.


92-92: Invalid z-index utility: z-1 is not in Tailwind's default scale.

Tailwind's default z-index utilities are z-0, z-10, z-20, z-30, z-40, z-50, and z-auto. The z-1 class will not be generated unless explicitly extended in your Tailwind configuration.

Apply this diff to use a valid z-index utility:

-        "flex flex-col items-center absolute max-h-[340px] top-[5%] left-1/2 transform -translate-x-1/2 z-1 w-[86vw] max-w-[480px] border border-klerosUIComponentsStroke rounded-[3px] bg-klerosUIComponentsWhiteBackground shadow-[0px_2px_3px_rgba(0,0,0,0.06)] " +
+        "flex flex-col items-center absolute max-h-[340px] top-[5%] left-1/2 transform -translate-x-1/2 z-10 w-[86vw] max-w-[480px] border border-klerosUIComponentsStroke rounded-[3px] bg-klerosUIComponentsWhiteBackground shadow-[0px_2px_3px_rgba(0,0,0,0.06)] " +
⛔ Skipped due to learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/components/OverlayPortal.tsx:5-8
Timestamp: 2025-10-31T20:37:01.310Z
Learning: In Tailwind CSS v4, the `z-<number>` syntax directly sets `z-index: <number>;` for any numeric value (e.g., `z-9999` results in `z-index: 9999;`). Arbitrary value brackets `z-[<value>]` are not required for numeric z-index values in v4.
```
<!-- [remove_learning]
dcbe3a95-44f6-47d5-806e-64b74d549e4b
web/src/components/ConnectWallet/AccountDisplay.tsx (1)

62-64: ****

The review comment requests verification of a change from landscape-900: to lg:, but there is no evidence this change occurred. A comprehensive search of the codebase reveals:

  • No instances of landscape-900: anywhere in the repository
  • No Tailwind configuration files defining custom landscape-900: breakpoints
  • The current code uses only standard lg: breakpoints

The code as presented is correct. The premise that a landscape-900: breakpoint was replaced is unfounded and should be disregarded.

Likely an incorrect or invalid review comment.

web/src/layout/Header/DesktopHeader.tsx (1)

33-62: LGTM!

The refactoring from styled-components to Tailwind classes is well-executed. The dynamic gap value is correctly handled with an inline style (Line 53), and the Tailwind v4 important modifier syntax is properly used (Line 43).

web/src/layout/Header/navbar/Menu/Help.tsx (1)

42-72: LGTM!

The migration from styled-components to Tailwind classes is clean and correct. The className concatenation is properly spaced, and the responsive behavior uses the standard lg: breakpoint. All previously identified issues have been resolved.

web/src/layout/Header/index.tsx (1)

12-12: No issues found — color utility is properly defined and will work correctly.

The CSS variable --color-light-blue-65 is properly defined in web/src/global.css, and Tailwind CSS v4 introduces first-class support for CSS custom properties. Since your project uses Tailwind v4.1.16, the bg-light-blue-65 utility will be automatically generated and will not be silently ignored.

web/src/layout/Header/navbar/Menu/Settings/index.tsx (1)

33-33: Code uses z-1 correctly per Tailwind v4 specification.

Tailwind CSS v4 supports bare numeric z-index classes without brackets (e.g., z-1, z-100), so the utility at line 33 of web/src/layout/Header/navbar/Menu/Settings/index.tsx will generate the expected z-index: 1; CSS. No changes needed.

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.

Frontend migration to the major update of @kleros/ui-components-library v3 with Tailwind

2 participants