Skip to content

Conversation

@kyrers
Copy link
Contributor

@kyrers kyrers commented Dec 12, 2025

Resolves #96.


PR-Codex overview

This PR focuses on refactoring CSS styles in various components, replacing responsiveSize calculations with new fluid spacing utilities. It also removes unused imports and constants to streamline the code.

Detailed summary

  • Removed responsiveSize usage in multiple components.
  • Introduced fluid spacing utilities for responsive design.
  • Updated class names to use clsx for conditional class management.
  • Simplified layout styles in numerous components.
  • Removed unused constants and imports from several files.

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

Summary by CodeRabbit

  • Refactor

    • Unified responsive spacing approach across the app by replacing inline calculations with centralized CSS utilities for consistent layout behavior.
  • Style

    • Updated paddings, gaps and widths site-wide (headers, lists, forms, cards, skeletons) for improved visual consistency.
    • Added an extensive set of responsive spacing tokens to the theme.
  • New Features

    • Enhanced file uploader messaging for clearer guidance.
    • Product items now support displaying an icon.

✏️ Tip: You can customize this high-level summary in your review settings.

@kyrers kyrers self-assigned this Dec 12, 2025
@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for curate-v2 ready!

Name Link
🔨 Latest commit 9413915
🔍 Latest deploy log https://app.netlify.com/projects/curate-v2/deploys/6943f499cf610200d24efc7e
😎 Deploy Preview https://deploy-preview-97--curate-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 12, 2025

Walkthrough

This PR removes the runtime responsiveSize helper and many local calc-based layout constants, replaces the local cn helper with clsx, and migrates inline responsive styles to new CSS custom properties and Tailwind-like fluid utility classes (spacing-fluid-*). One component interface gains an Icon prop.

Changes

Cohort / File(s) Summary
Global spacing tokens
web/src/global.css
Added many --spacing-scale-* and --spacing-fluid-* CSS custom properties (clamp/calc) to centralize fluid spacing tokens.
Responsive helper removed
web/src/styles/responsiveSize.ts
Removed exported responsiveSize helper function that computed calc(...) responsive values.
Class helper swap & spacing utilities
web/src/components/InfoCard.tsx, web/src/components/StatDisplay.tsx, web/src/components/StyledSkeleton.tsx, web/src/components/InformationCards/ItemInformationCard/index.tsx, web/src/components/InformationCards/RegistryInformationCard/TopInfo.tsx, web/src/components/InformationCards/RegistryInformationCard/Policies.tsx, web/src/components/InformationCards/RegistryInformationCard/index.tsx, web/src/components/RegistryCard/RegistryInfo.tsx, web/src/components/ItemCard/index.tsx, web/src/components/InformationCards/*
Replaced cn with clsx (or direct class strings), removed inline responsiveSize usages and calc constants, and switched sizing/gap/height/width to *-fluid-* utility classes.
Header / navbar / menu
web/src/layout/Header/navbar/DappList.tsx, web/src/layout/Header/navbar/Menu/Settings/index.tsx, web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx, web/src/layout/Header/DesktopHeader.tsx, web/src/layout/Header/navbar/Product.tsx
Removed landscape width/padding calc constants, moved inline width/gap/padding to w-fluid-*, px-fluid-*, gap-fluid-* classes, replaced cnclsx; added Icon to IProduct.
Top-level pages & headers
web/src/pages/AllLists/index.tsx, web/src/pages/AttachmentDisplay/index.tsx, web/src/pages/AttachmentDisplay/Header.tsx, web/src/pages/Home/index.tsx, web/src/pages/Home/Header.tsx, web/src/pages/Home/Stats/index.tsx, web/src/pages/Settings/index.tsx
Removed inline calc paddings/gaps, swapped to *-fluid-* classes, removed responsiveSize imports, and replaced cnclsx where present.
SubmitItem — inputs, previews & pages
web/src/pages/SubmitItem/index.tsx, web/src/pages/SubmitItem/Header/index.tsx, web/src/pages/SubmitItem/ItemField/FieldInput/* (AddressInput, FileInput, ImageInput, LinkInput, LongTextInput, NumberInput, TextInput), web/src/pages/SubmitItem/ItemField/FieldInput/constants.ts, web/src/pages/SubmitItem/Policy/Info.tsx, web/src/pages/SubmitItem/NavigationButtons/index.tsx, web/src/pages/SubmitItem/Preview/*, web/src/pages/SubmitItem/Preview/index.tsx
Removed responsiveSize and exported constants; replaced inline styles with lg:w-fluid-200-720, mb-fluid-*, px-fluid-*, gap-fluid-* classes; switched cnclsx; added composed message prop to FileUploader in FileInput/ImageInput.
SubmitList & parameters / previews
web/src/pages/SubmitList/index.tsx, web/src/pages/SubmitList/constants.ts, web/src/pages/SubmitList/DeployList/*, web/src/pages/SubmitList/ItemParameters/*, web/src/pages/SubmitList/ListParameters/*, web/src/pages/SubmitList/ListParameters/ListPreview/*, web/src/pages/SubmitList/AdvancedParameters/index.tsx
Removed BASE_CONTAINER_LANDSCAPE_WIDTH_CALC, consolidated BASE_CONTAINER_STYLE (added lg:w-fluid-442-700-900), eliminated many inline responsiveSize usages and replaced with *-fluid-* classes; simplified cn usage to clsx or direct classes.
Various UI & small components
web/src/components/RegistryCard/RegistryInfo.tsx, web/src/pages/SubmitList/ItemParameters/ItemPreview/*, web/src/pages/SubmitList/ListParameters/*, web/src/pages/SubmitList/DeployList/index.tsx, web/src/pages/SubmitList/ListParameters/ListPreview/*, web/src/layout/.../Product.tsx
Multiple files had inline gap/padding/width calc removed and replaced with fluid utility classes; one component interface gained an Icon prop; no other API changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Focus areas:
    • Verify the new --spacing-fluid-* tokens in web/src/global.css (math, units, clamp bounds).
    • Check for any remaining references to responsiveSize or removed exported constants.
    • Ensure all cnclsx substitutions preserve conditional behavior and no cn usages remain.
    • Validate the added Icon prop on IProduct for type coverage and usages.
    • Inspect FileUploader message changes and any places that relied on removed constants.

Possibly related PRs

Suggested labels

Type: Enhancement :sparkles:, Package: Web

Suggested reviewers

  • kemuru
  • tractorss
  • Harman-singh-waraich

Poem

🐰 I hopped through calc and found a clue,
Fluid tokens bloom where numbers flew,
clsx tidy, no concat stew,
Spacing flows in classes true,
A little hop — styles updated too.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor: migrate complex CSS calculations to clamp' clearly summarizes the main change: replacing complex CSS calculations with clamp-based utilities.
Linked Issues check ✅ Passed All code changes align with issue #96 requirements: responsiveSize calculations replaced with clamp-based utility classes, complex calculations removed, and maintainability improved.
Out of Scope Changes check ✅ Passed All changes are within scope of issue #96. However, the PR also replaces cn with clsx and refactors some component structures, which are minor related improvements to code quality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/migrate-to-clamp

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: 4

Caution

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

⚠️ Outside diff range comments (1)
web/src/components/ItemCard/index.tsx (1)

29-36: Inconsistent migration: mixing old and new approaches.

The outer div still uses cn and responsiveSize for inline styles (line 35), while the inner div (lines 38-41) uses clsx with the new fluid classes. This creates an inconsistent styling approach within the same component.

♻️ Duplicate comments (2)
web/src/pages/SubmitItem/ItemField/FieldInput/TextInput.tsx (1)

4-4: Partial migration: responsiveSize still imported and used.

The file migrates the width calculation to lg:w-fluid-200-720 but retains responsiveSize for the marginBottom inline style (line 12). This creates the same mixed approach seen in other files.

web/src/pages/SubmitList/index.tsx (1)

35-43: Mixed migration approach: fluid classes and responsiveSize coexist.

The container migrates paddingBottom to the fluid class pb-fluid-76-96 (line 38) but retains responsiveSize for inline paddingInline and paddingTop styles (lines 41-42). This creates the same partial migration pattern seen across multiple files.

🧹 Nitpick comments (2)
web/src/pages/SubmitItem/index.tsx (1)

39-47: Good migration step; consider finishing the move off responsiveSize here (paddingInline/paddingTop) for consistency.
Right now only paddingBottom moved to pb-fluid-76-96, while inline responsiveSize(...) remains for the other paddings. If the intent is full “clamp utilities” adoption, it’d be cleaner to replace those too (and then drop the responsiveSize import).

web/src/pages/SubmitList/ItemParameters/Deposit.tsx (1)

8-10: Prefer className={BASE_CONTAINER_STYLE} here (no need for cn() with a single static class).
This is equivalent and matches the other SubmitList pages that now use BASE_CONTAINER_STYLE directly.

-    <div className={cn(BASE_CONTAINER_STYLE)}>
+    <div className={BASE_CONTAINER_STYLE}>

Also applies to: 18-20

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1854e11 and 5ea528f.

📒 Files selected for processing (32)
  • web/src/components/InformationCards/RegistryInformationCard/TopInfo.tsx (2 hunks)
  • web/src/components/ItemCard/index.tsx (2 hunks)
  • web/src/components/RegistryCard/RegistryInfo.tsx (1 hunks)
  • web/src/components/StatDisplay.tsx (1 hunks)
  • web/src/global.css (1 hunks)
  • web/src/layout/Header/navbar/DappList.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/index.tsx (3 hunks)
  • web/src/pages/AllLists/index.tsx (1 hunks)
  • web/src/pages/AttachmentDisplay/index.tsx (1 hunks)
  • web/src/pages/Home/Stats/index.tsx (1 hunks)
  • web/src/pages/Home/index.tsx (1 hunks)
  • web/src/pages/Settings/index.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/AddressInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/FileInput.tsx (2 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/ImageInput.tsx (2 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/LinkInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/LongTextInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/NumberInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/TextInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/constants.ts (0 hunks)
  • web/src/pages/SubmitItem/Policy/Info.tsx (1 hunks)
  • web/src/pages/SubmitItem/index.tsx (1 hunks)
  • web/src/pages/SubmitList/DeployList/ListDetails.tsx (1 hunks)
  • web/src/pages/SubmitList/ItemParameters/CustomName.tsx (1 hunks)
  • web/src/pages/SubmitList/ItemParameters/Deposit.tsx (2 hunks)
  • web/src/pages/SubmitList/ItemParameters/Fields/index.tsx (2 hunks)
  • web/src/pages/SubmitList/ListParameters/Description.tsx (1 hunks)
  • web/src/pages/SubmitList/ListParameters/LogoUpload.tsx (2 hunks)
  • web/src/pages/SubmitList/ListParameters/Policy.tsx (2 hunks)
  • web/src/pages/SubmitList/ListParameters/Title.tsx (2 hunks)
  • web/src/pages/SubmitList/constants.ts (1 hunks)
  • web/src/pages/SubmitList/index.tsx (2 hunks)
💤 Files with no reviewable changes (1)
  • web/src/pages/SubmitItem/ItemField/FieldInput/constants.ts
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/styles/breakpoints.ts:1-1
Timestamp: 2025-11-14T22:12:39.974Z
Learning: In the kleros/curate-v2 repository, the kleros/ui-components-library overrides Tailwind's lg breakpoint to 900px (not the default 1024px). The LG_BREAKPOINT constant in web/src/styles/breakpoints.ts is set to 900 to match this override. This configuration is imported via the source directive in global.css.
📚 Learning: 2025-11-14T22:12:39.974Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/styles/breakpoints.ts:1-1
Timestamp: 2025-11-14T22:12:39.974Z
Learning: In the kleros/curate-v2 repository, the kleros/ui-components-library overrides Tailwind's lg breakpoint to 900px (not the default 1024px). The LG_BREAKPOINT constant in web/src/styles/breakpoints.ts is set to 900 to match this override. This configuration is imported via the source directive in global.css.

Applied to files:

  • web/src/pages/AllLists/index.tsx
  • web/src/pages/SubmitList/constants.ts
  • web/src/components/ItemCard/index.tsx
  • web/src/layout/Header/navbar/DappList.tsx
  • web/src/global.css
📚 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/pages/SubmitItem/ItemField/FieldInput/AddressInput.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/pages/SubmitItem/ItemField/FieldInput/AddressInput.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/pages/Settings/index.tsx
  • 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/pages/Settings/index.tsx
  • web/src/pages/SubmitList/ListParameters/LogoUpload.tsx
  • web/src/layout/Header/navbar/Menu/Settings/index.tsx
📚 Learning: 2024-11-04T13:42:03.737Z
Learnt from: Harman-singh-waraich
Repo: kleros/curate-v2 PR: 65
File: web/src/components/ActionButton/Modal/EvidenceUpload.tsx:74-82
Timestamp: 2024-11-04T13:42:03.737Z
Learning: In `web/src/components/ActionButton/Modal/EvidenceUpload.tsx`, the `uploadFile` function already manages error handling and logging, so additional error handling after calling it is unnecessary.

Applied to files:

  • web/src/pages/SubmitItem/ItemField/FieldInput/FileInput.tsx
  • web/src/pages/SubmitList/ListParameters/LogoUpload.tsx
  • web/src/pages/SubmitItem/ItemField/FieldInput/ImageInput.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/pages/SubmitList/ListParameters/LogoUpload.tsx
  • web/src/pages/SubmitList/ListParameters/Policy.tsx
🧬 Code graph analysis (6)
web/src/pages/SubmitList/ListParameters/Description.tsx (2)
web/src/context/SubmitListContext.tsx (1)
  • useSubmitListContext (123-123)
web/src/pages/SubmitList/constants.ts (1)
  • BASE_CONTAINER_STYLE (1-1)
web/src/pages/SubmitList/ItemParameters/Fields/index.tsx (1)
web/src/pages/SubmitList/constants.ts (1)
  • BASE_CONTAINER_STYLE (1-1)
web/src/pages/SubmitList/ItemParameters/Deposit.tsx (2)
web/src/utils/index.ts (1)
  • cn (44-46)
web/src/pages/SubmitList/constants.ts (1)
  • BASE_CONTAINER_STYLE (1-1)
web/src/pages/SubmitList/ListParameters/LogoUpload.tsx (1)
web/src/pages/SubmitList/constants.ts (1)
  • BASE_CONTAINER_STYLE (1-1)
web/src/pages/SubmitList/ItemParameters/CustomName.tsx (2)
web/src/context/SubmitListContext.tsx (1)
  • useSubmitListContext (123-123)
web/src/pages/SubmitList/constants.ts (1)
  • BASE_CONTAINER_STYLE (1-1)
web/src/pages/SubmitList/ListParameters/Policy.tsx (1)
web/src/pages/SubmitList/constants.ts (1)
  • BASE_CONTAINER_STYLE (1-1)
⏰ 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 (31)
web/src/pages/Home/Stats/index.tsx (1)

71-76: The pb-4! and lg:pb-0! syntax is correct for Tailwind CSS v4 (currently at ^4.1.16 in this project). In Tailwind v4, the important modifier uses a trailing ! after the utility class, unlike v3 which used a leading ! prefix. No changes needed.

Likely an incorrect or invalid review comment.

web/src/pages/Settings/index.tsx (1)

4-12: LGTM; just double-check the combined px-4 + lg:px-fluid-0-32 doesn’t regress the desktop spacing you expect.

web/src/pages/AttachmentDisplay/index.tsx (1)

9-22: All three padding utilities are properly defined in the project. The --spacing-fluid-24-136, --spacing-fluid-32-80, and --spacing-fluid-76-96 CSS variables are defined in web/src/global.css as responsive fluid spacing utilities using clamp(), and can be used as Tailwind classes as shown in the code.

web/src/pages/SubmitItem/Policy/Info.tsx (1)

11-11: The w-fluid-342-618 width utility is correctly defined and ensures smooth responsive scaling. The AlertMessage will fluidly transition from 84vw on mobile to a maximum of 618px without jarring jumps at the 900px lg boundary.

web/src/pages/SubmitList/DeployList/ListDetails.tsx (1)

14-19: Nice simplification; p-fluid-24-32 exists and applies as expected (scales 24–32px from 375–1250px viewport width).

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

15-15: No issues found. The lg:mb-fluid-16-30 utility class is properly defined via the Tailwind v4 configuration and will apply the intended responsive bottom margin spacing on desktop viewports.

web/src/pages/SubmitList/constants.ts (1)

1-1: LGTM!

The addition of lg:w-fluid-442-700-900 successfully replaces the complex landscape width calculation with a CSS clamp-based token, aligning perfectly with the PR objective.

web/src/pages/SubmitList/ItemParameters/Fields/index.tsx (1)

9-9: LGTM!

Successfully migrated from cn composition with landscape width calculations to direct usage of BASE_CONTAINER_STYLE. This simplifies the className logic and aligns with the migration to fluid spacing tokens.

Also applies to: 43-43

web/src/pages/SubmitList/ListParameters/Description.tsx (1)

6-6: LGTM!

Clean migration from cn-based composition to direct usage of BASE_CONTAINER_STYLE, consistent with the broader refactoring effort.

Also applies to: 14-14

web/src/pages/SubmitList/ListParameters/Policy.tsx (1)

12-12: LGTM!

Consistent migration from cn composition to direct BASE_CONTAINER_STYLE usage, aligning with the refactoring pattern across all SubmitList components.

Also applies to: 37-37

web/src/pages/SubmitList/ListParameters/LogoUpload.tsx (1)

11-11: LGTM!

Successfully migrated to direct BASE_CONTAINER_STYLE usage, maintaining consistency with the other SubmitList components.

Also applies to: 54-54

web/src/pages/SubmitItem/ItemField/FieldInput/FileInput.tsx (1)

8-8: LGTM!

Excellent migration from cn to clsx with proper usage of fluid spacing tokens (w-fluid-200-720, mb-fluid-150-72). The className composition is cleaner and leverages the new CSS clamp-based utilities as intended.

Note: The mb-fluid-150-72 token uses reverse scaling (150px at mobile → 72px at desktop), which is intentional for this use case.

Also applies to: 30-36

web/src/global.css (1)

27-60: The Tailwind configuration is already correctly set up for Tailwind v4. The @source directive in global.css (line 3) properly enables Tailwind to scan the kleros/ui-components-library, and the custom CSS variables defined in the @theme block are being used correctly throughout the codebase via arbitrary values (e.g., lg:p-[48px_var(--spacing-fluid-0-32)_60px]). No additional mapping or configuration is needed.

web/src/pages/SubmitItem/ItemField/FieldInput/AddressInput.tsx (1)

24-28: Ensure lg:w-fluid-200-720 is defined + consider migrating marginBottom too.
The static width class is cleaner, but it depends on the w-fluid-200-720 token being present in Tailwind/global CSS. Also note style={{ marginBottom: responsiveSize(...) }} is still a runtime calc path if the goal is “all clamp”.

web/src/pages/SubmitItem/ItemField/FieldInput/LongTextInput.tsx (1)

8-12: Verify the new utility classes exist (lg:w-fluid-200-720, custom-scrollbar).
Change looks fine, but make sure the new width token and scrollbar class are defined and survive Tailwind’s content scanning.

web/src/components/RegistryCard/RegistryInfo.tsx (1)

21-23: Confirm the CSS vars exist and the lg grid template renders correctly at the 900px breakpoint.
Nice direction (tokenized, no complex calc), but the class depends on --spacing-fluid-80-100-900 / --spacing-fluid-100-150-900 being defined and the arbitrary grid-cols-[...] being picked up by Tailwind. (Also: using 900 matches the repo’s lg=900px override.)

web/src/pages/SubmitList/ListParameters/Title.tsx (1)

6-7: LGTM: container now uses BASE_CONTAINER_STYLE directly.
Clean simplification and consistent with the removal of landscape calc constants.

Also applies to: 15-16

web/src/pages/SubmitList/ItemParameters/CustomName.tsx (1)

5-6: LGTM: BASE_CONTAINER_STYLE applied directly.
Simplifies layout styling and removes dependence on landscape calc constants.

Also applies to: 11-12

web/src/pages/SubmitItem/ItemField/FieldInput/LinkInput.tsx (1)

23-28: Verify lg:w-fluid-200-720 matches the old width behavior.
Change is fine structurally; just make sure the new token exists and doesn’t regress field widths on >= lg.

web/src/pages/SubmitItem/ItemField/FieldInput/NumberInput.tsx (1)

11-16: Verify lg:w-fluid-200-720 is defined and applied for NumberField too.
Assuming the token exists, this is a straightforward and consistent cleanup.

web/src/components/InformationCards/RegistryInformationCard/TopInfo.tsx (2)

63-66: LGTM! Clean migration to clsx and fluid spacing.

The className composition correctly migrates from cn to clsx and introduces the new responsive gap utilities that align with the CSS clamp approach.


7-13: Mixed migration approach is intentional, but should be completed in this file.

The file uses both responsiveSize (lines 38, 40) and new fluid spacing classes (line 65), which is consistent with an ongoing codebase-wide migration from inline responsive calculations to CSS-based fluid spacing variables. While this partial migration appears intentional across the codebase (86 existing usages of responsiveSize remain), completing the conversion in this file would improve consistency. Replace the inline responsiveSize calls on lines 38 and 40 with corresponding fluid spacing classes to align with the new pattern established on line 65.

web/src/pages/SubmitItem/ItemField/FieldInput/TextInput.tsx (1)

11-11: Clean migration to fluid width class.

The responsive width correctly uses the new lg:w-fluid-200-720 class, which should use CSS clamp under the hood.

web/src/components/ItemCard/index.tsx (1)

12-12: Well-structured CSS variable and fluid spacing usage.

The grid column definition using var(--spacing-fluid-150-180-900) and the gap class lg:gap-fluid-16-36-900 correctly leverage the new clamp-based utilities.

Also applies to: 38-41

web/src/pages/SubmitItem/ItemField/FieldInput/ImageInput.tsx (3)

6-8: Clean import migration.

Correctly removes cn and adds clsx for the new className composition approach.


31-34: Excellent: Complete migration to fluid utilities.

This component fully migrates to the new approach with:

  • Fluid width classes: w-[84vw] lg:w-fluid-200-720
  • Fluid margin: mb-fluid-150-72
  • Custom text formatting classes

No leftover responsiveSize inline styles, making this a model for the complete migration.


37-37: Verify message prop concatenation behavior.

The message prop now concatenates fieldProp.description with the file uploader message using \n. Ensure this displays correctly in both mobile and desktop views, especially with the [&_small]:whitespace-pre-line class applied.

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

8-8: Clean addition of clsx.

Correctly introduces clsx for className composition.


37-42: Consistent migration to clsx with distinct responsive sizing strategies.

The component correctly uses clsx for both the container and Tabs. The code at lines 37-42 employs standard Tailwind utilities, while line 46 uses scale utilities (w-scale-300-424-300, px-scale-8-32-300). This represents a deliberate choice: scale utilities apply linear scaling via calc(), while fluid utilities (used elsewhere in the codebase) apply clamp() with hard min/max boundaries for more constrained responsive behavior.

web/src/pages/SubmitList/index.tsx (2)

19-19: Clean clsx import.

Correctly introduces clsx for the new className composition.


35-39: Good use of clsx and fluid utilities.

The component correctly migrates to clsx and introduces fluid spacing classes (pb-fluid-76-96, lg:px-fluid-25-65).

Also applies to: 47-47

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 12, 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 (5)
web/src/pages/SubmitItem/Header/index.tsx (2)

20-21: Guard id from useParams before destructuring to avoid potential runtime error

id?.split("-") can evaluate to undefined, and destructuring [listAddress, _] from that will throw if this component ever renders without an id param. Safer to guard id explicitly and only split once it’s known to be a string.

For example:

-  const { id } = useParams();
-  const [listAddress, _]: string[] = id?.split("-");
+  const { id } = useParams();
+  if (!id) {
+    throw new Error("Missing list address route param");
+  }
+  const [listAddress] = id.split("-");

This keeps the runtime behavior predictable and makes it obvious that Header requires the route param to be present.


44-48: Card layout refactor looks good; consider reusing shared container styles

The new class composition keeps the previous flex layout while moving spacing into utilities (py-6 px-fluid-24-32, mb-9, w-[80vw] lg:w-[91vw]), which aligns with the PR goal of replacing inline calc-based styles.

If other pages now use a shared container style (e.g., a BASE_CONTAINER_STYLE or similar), it might be worth reusing that here so width/margins are controlled from a single place and easier to tweak globally, especially around the lg breakpoint (900px in this codebase). Based on learnings, this would help keep behavior consistent across layouts.

web/src/pages/SubmitList/ItemParameters/ItemPreview/ItemDisplay.tsx (1)

6-8: Consider removing the empty interface.

The IItemDisplay interface is empty and the component destructures empty props. This can be simplified.

-interface IItemDisplay {}
-
-const ItemDisplay: React.FC<IItemDisplay> = ({}) => {
+const ItemDisplay: React.FC = () => {
web/src/components/InformationCards/RegistryInformationCard/index.tsx (1)

10-10: Consider completing the migration from cn to clsx.

The PR description states that cn utility has been replaced with clsx across components (as seen in ItemCard/index.tsx). However, this file still imports and uses cn (lines 10, 50, 53). For consistency, consider completing the migration here as well.

Apply this diff to migrate to clsx:

-import { cn } from "src/utils";
+import clsx from "clsx";

Then replace the cn calls with clsx:

-    <Card className={cn("flex flex-col w-full h-auto mb-16", className)}>
+    <Card className={clsx("flex flex-col w-full h-auto mb-16", className)}>
         <p
-          className={cn(
+          className={clsx(
             "w-full py-2 px-8 bg-klerosUIComponentsWarningLight",
             "text-sm font-medium text-center text-klerosUIComponentsWarning"
           )}
web/src/global.css (1)

65-65: Consider clarifying naming for reverse-scaling variables.

Variables like --spacing-fluid-32-24, --spacing-fluid-68-40, and --spacing-fluid-150-72 shrink as the viewport increases (reverse behavior compared to most other fluid variables). While the implementation is mathematically correct, this reverse pattern could be confusing during maintenance since most other variables follow a "smaller-to-larger" growth pattern.

Consider adding a comment or adopting a naming convention (e.g., suffix like -reverse or -shrink) to make this behavior explicit.

Also applies to: 68-68, 74-74

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 916c565 and 56abf81.

📒 Files selected for processing (37)
  • web/src/components/InfoCard.tsx (2 hunks)
  • web/src/components/InformationCards/ItemInformationCard/index.tsx (1 hunks)
  • web/src/components/InformationCards/RegistryInformationCard/Policies.tsx (1 hunks)
  • web/src/components/InformationCards/RegistryInformationCard/TopInfo.tsx (3 hunks)
  • web/src/components/InformationCards/RegistryInformationCard/index.tsx (1 hunks)
  • web/src/components/ItemCard/index.tsx (2 hunks)
  • web/src/components/RegistryCard/RegistryInfo.tsx (2 hunks)
  • web/src/components/StyledSkeleton.tsx (1 hunks)
  • web/src/global.css (1 hunks)
  • web/src/layout/Header/DesktopHeader.tsx (1 hunks)
  • web/src/layout/Header/navbar/DappList.tsx (1 hunks)
  • web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx (1 hunks)
  • web/src/layout/Header/navbar/Product.tsx (1 hunks)
  • web/src/pages/AttachmentDisplay/Header.tsx (1 hunks)
  • web/src/pages/Home/Header.tsx (1 hunks)
  • web/src/pages/Home/index.tsx (1 hunks)
  • web/src/pages/SubmitItem/Header/index.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/AddressInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/LinkInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/LongTextInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/NumberInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/ItemField/FieldInput/TextInput.tsx (1 hunks)
  • web/src/pages/SubmitItem/NavigationButtons/index.tsx (1 hunks)
  • web/src/pages/SubmitItem/Preview/ItemDisplay.tsx (1 hunks)
  • web/src/pages/SubmitItem/Preview/ListDisplay.tsx (1 hunks)
  • web/src/pages/SubmitItem/Preview/index.tsx (1 hunks)
  • web/src/pages/SubmitItem/index.tsx (1 hunks)
  • web/src/pages/SubmitList/AdvancedParameters/index.tsx (1 hunks)
  • web/src/pages/SubmitList/DeployList/index.tsx (1 hunks)
  • web/src/pages/SubmitList/ItemParameters/ItemPreview/ItemDisplay.tsx (1 hunks)
  • web/src/pages/SubmitList/ItemParameters/ItemPreview/ListDisplay.tsx (1 hunks)
  • web/src/pages/SubmitList/ItemParameters/ItemPreview/index.tsx (1 hunks)
  • web/src/pages/SubmitList/ListParameters/ListPreview/HomePageDisplay.tsx (1 hunks)
  • web/src/pages/SubmitList/ListParameters/ListPreview/ListPageDisplay.tsx (1 hunks)
  • web/src/pages/SubmitList/ListParameters/ListPreview/index.tsx (1 hunks)
  • web/src/pages/SubmitList/index.tsx (2 hunks)
  • web/src/styles/responsiveSize.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • web/src/styles/responsiveSize.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • web/src/pages/SubmitItem/ItemField/FieldInput/AddressInput.tsx
  • web/src/pages/Home/index.tsx
  • web/src/pages/SubmitList/index.tsx
  • web/src/layout/Header/navbar/DappList.tsx
  • web/src/components/RegistryCard/RegistryInfo.tsx
  • web/src/pages/SubmitItem/ItemField/FieldInput/LongTextInput.tsx
  • web/src/pages/SubmitItem/ItemField/FieldInput/NumberInput.tsx
  • web/src/pages/SubmitItem/index.tsx
  • web/src/pages/SubmitItem/ItemField/FieldInput/TextInput.tsx
  • web/src/pages/SubmitItem/ItemField/FieldInput/LinkInput.tsx
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/styles/breakpoints.ts:1-1
Timestamp: 2025-11-14T22:12:39.974Z
Learning: In the kleros/curate-v2 repository, the kleros/ui-components-library overrides Tailwind's lg breakpoint to 900px (not the default 1024px). The LG_BREAKPOINT constant in web/src/styles/breakpoints.ts is set to 900 to match this override. This configuration is imported via the source directive in global.css.
📚 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/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/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/Notifications/FormContactDetails/index.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/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/index.tsx
📚 Learning: 2025-11-14T22:12:39.974Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/styles/breakpoints.ts:1-1
Timestamp: 2025-11-14T22:12:39.974Z
Learning: In the kleros/curate-v2 repository, the kleros/ui-components-library overrides Tailwind's lg breakpoint to 900px (not the default 1024px). The LG_BREAKPOINT constant in web/src/styles/breakpoints.ts is set to 900 to match this override. This configuration is imported via the source directive in global.css.

Applied to files:

  • web/src/global.css
🔇 Additional comments (25)
web/src/pages/SubmitList/ItemParameters/ItemPreview/ListDisplay.tsx (1)

13-16: Gap utility migration looks good; confirm token exists and matches intended spacing

Switching from an inline responsiveSize gap to gap-fluid-32-24 on the flex column container aligns with the PR’s CSS refactor goals and should improve consistency and readability.

Please just confirm that:

  • gap-fluid-32-24 is defined in global.css (or the imported utilities), and
  • Its clamp values are intended to mirror the prior 32/24 spacing behavior for this layout.
web/src/components/InformationCards/RegistryInformationCard/TopInfo.tsx (4)

7-7: LGTM! Clean migration to standard library.

The migration from the custom cn utility to clsx and removal of responsiveSize aligns well with the PR objectives to simplify CSS calculations and use standard libraries.

Also applies to: 12-12


36-36: LGTM! Consistent fluid gap usage.

The gap-y-fluid-8-16 utility provides clean, responsive vertical spacing.


59-62: Clean migration to clsx.

The migration from cn to clsx is correct. The lg:gap-x-fluid-24-32-900 utility follows an intentional naming convention: fluid-[min]-[max]-[breakpoint], where 24px and 32px are the min/max values and 900 refers to the LG_BREAKPOINT. This pattern is consistently used throughout the codebase and properly defined in global.css.


35-35: Good refactor to declarative fluid utilities.

The migration to pt-fluid-20-24 and px-fluid-24-32 fluid utility classes simplifies the responsive styling approach. These utilities are properly defined in the Tailwind theme configuration via CSS custom properties in global.css and are correctly applied.

web/src/components/StyledSkeleton.tsx (2)

13-13: SkeletonRegistryCard simplification aligns with clamp utilities

Inlining the card skeleton and driving both width/height through w-full h-fluid-270-296 looks good and matches the clamp/fluid utility direction. No issues from my side here.


17-19: Verify w-fluid-* widths effectively override Skeleton’s default width

Switching from explicit width props to className="ml-auto w-fluid-100-160" / "w-fluid-60-80" is a nice move toward CSS-driven sizing. However, react-loading-skeleton defaults the skeleton width to 100%, so the final width will depend on CSS cascade between .react-loading-skeleton and your w-fluid-* utilities.(github.com)

Please confirm in the browser (or via devtools) that:

  • The first skeleton in SkeletonJustificationCard actually renders with the intended clamped width while still right‑aligned via ml-auto.
  • The third skeleton’s width matches the new w-fluid-60-80 design across breakpoints.

If the default width: 100% from the library wins in your build, you may need to either adjust CSS load order or fall back to the width prop for these two cases.

web/src/components/InformationCards/ItemInformationCard/index.tsx (1)

63-63: Clean migration to fluid spacing utility.

The replacement of inline responsiveSize styling with the my-fluid-20-28 utility class improves readability and aligns with the PR's objective to simplify responsive sizing. The semantic class name clearly conveys the vertical margin range.

web/src/pages/SubmitItem/Preview/index.tsx (1)

10-17: Well-structured migration to fluid utilities with clsx.

The file successfully migrates from responsiveSize inline styles to CSS fluid utility classes and adopts clsx for className composition. The fluid classes (px-fluid-10-130, mb-fluid-0-16, py-fluid-24-48, px-fluid-24-32) clearly express the responsive behavior.

web/src/pages/SubmitItem/NavigationButtons/index.tsx (1)

13-13: Migration to fluid spacing utility approved.

The mt-fluid-32-24 class replaces the previous responsiveSize(32, 24) call, maintaining the same responsive behavior (32px on smaller viewports scaling down to 24px on larger viewports).

web/src/pages/SubmitList/ItemParameters/ItemPreview/ItemDisplay.tsx (1)

12-12: Clean migration to gap utility class.

The replacement of style={{ gap: responsiveSize(32, 24) }} with the gap-fluid-32-24 utility class improves maintainability and aligns with the PR's migration strategy.

web/src/pages/Home/Header.tsx (1)

17-17: No changes needed.

The text-(length:--spacing-fluid-20-24) syntax is correct. The CSS custom property --spacing-fluid-20-24 is defined in global.css (line 57), Tailwind v4 is being used (@tailwindcss/vite@^4.1.16), and the @source directive for scanning external library variables is properly configured (line 3).

web/src/pages/SubmitItem/Preview/ItemDisplay.tsx (1)

21-21: Clean migration to fluid utility class.

The replacement of responsiveSize with gap-fluid-32-24 simplifies the code and aligns with the PR's objective of using CSS clamp-based utilities for responsive sizing.

web/src/pages/SubmitList/AdvancedParameters/index.tsx (1)

28-28: LGTM!

The migration from responsiveSize to px-fluid-0-108 for horizontal padding follows the PR's pattern of replacing runtime calculations with CSS utility classes.

web/src/pages/SubmitList/ListParameters/ListPreview/index.tsx (1)

11-16: LGTM!

Good use of multiple fluid utility classes (mb-fluid-0-16, py-fluid-24-48, px-fluid-24-32) to replace the previous inline styles. The clsx composition keeps the className readable with logical grouping.

web/src/pages/SubmitItem/Preview/ListDisplay.tsx (1)

21-21: LGTM!

Consistent use of gap-fluid-32-24 matching the pattern in ItemDisplay.tsx. The migration maintains visual consistency between the preview components.

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

73-73: The utility class naming convention is consistent and properly documented. The px-fluid-12-32-300 pattern is defined in global.css (line 51) and follows the established convention: spacing-fluid-MIN-MAX-[BREAKPOINT]. The third value (300) specifies a custom viewport breakpoint; without it, utilities default to 375px. The codebase uses both 2-value patterns (default breakpoint) and 3-value patterns (custom breakpoints like 300px and 900px) throughout, making this a standard, documented approach rather than an anomaly.

Likely an incorrect or invalid review comment.

web/src/pages/SubmitList/ListParameters/ListPreview/ListPageDisplay.tsx (1)

14-14: Fluid gap utility migration looks good

Switching from inline responsiveSize to gap-fluid-32-24 keeps the layout intent while centralizing the responsive behavior in CSS tokens; no functional impact on the preview logic.

web/src/pages/SubmitList/DeployList/index.tsx (1)

14-14: Replacing inline padding with px-fluid-0-108 is consistent and clearer

The container still spans full width and centers content, but now relies on a shared fluid padding token instead of inline responsiveSize, which improves maintainability and consistency with the rest of the refactor.

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

45-45: Fluid gap for wallet/menu cluster is appropriate

Using gap-fluid-4-8 here keeps the horizontal rhythm between ConnectWallet and Menu responsive while preserving the existing layout (ml-2 and canvas sizing). This should play nicely with your custom lg breakpoint at 900px since spacing is now driven by shared tokens rather than ad‑hoc values. Based on learnings, ...

web/src/components/InformationCards/RegistryInformationCard/Policies.tsx (1)

27-27: Policies card spacing refactor keeps behavior while unifying styling

Swapping inline padding/gap for px-fluid-24-32 and gap-fluid-16-24 aligns this card with the new spacing system; the links/skeletons layout remains the same while centralizing the responsive behavior in CSS utilities.

Also applies to: 33-33

web/src/pages/SubmitList/ListParameters/ListPreview/HomePageDisplay.tsx (1)

12-12: Tokenizing preview vertical spacing is a clean swap

gap-fluid-32-24 maintains the intended separation between the helper text and the RegistryCard while moving the responsiveness into shared CSS utilities, consistent with the rest of the PR.

web/src/pages/SubmitList/ItemParameters/ItemPreview/index.tsx (1)

10-10: Item preview card spacing migration is consistent and preserves layout

The switch to px-fluid-10-130 on the container and mb-fluid-0-16 py-fluid-24-48 px-fluid-24-32 on the Card cleanly replaces per‑component responsiveSize calls. Border/background semantics are unchanged, so the only impact is centralized, token‑driven spacing.

Also applies to: 15-17

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

1-1: InfoCard migration to clsx and fluid gap utility looks solid

Importing clsx and using gap-fluid-6-8-300 removes the last bit of responsiveSize/cn usage from this component while keeping the grid layout and external className override behavior the same.

Also applies to: 13-17

web/src/components/ItemCard/index.tsx (1)

29-29: No action needed. The custom utilities are properly configured through Tailwind v4's automatic utility generation. The @source directive in global.css (line 3) tells Tailwind to scan the @kleros/ui-components-library and generate utilities from the CSS variables defined in the @theme block. The --spacing-fluid-12-32-900 variable is defined (line 56 in global.css) and is automatically converted to the gap-x-fluid-12-32-900 utility by Tailwind v4's built-in mechanism.

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 (1)
web/src/global.css (1)

36-81: Clamp formulas and breakpoint choices look consistent.

The --spacing-fluid-* tokens all use clamp(min, calc(...), max) with min/max values that match the token names (including the decreasing ranges like 32-24, 68-40, and 150-72), and the variants with -900 correctly pivot around 900px, which matches the overridden lg breakpoint in this repo. Based on this file alone, the formulas and naming are internally consistent and aligned with the breakpoint configuration.

Based on learnings, ...

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56abf81 and 9413915.

📒 Files selected for processing (1)
  • web/src/global.css (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/styles/breakpoints.ts:1-1
Timestamp: 2025-11-14T22:12:39.974Z
Learning: In the kleros/curate-v2 repository, the kleros/ui-components-library overrides Tailwind's lg breakpoint to 900px (not the default 1024px). The LG_BREAKPOINT constant in web/src/styles/breakpoints.ts is set to 900 to match this override. This configuration is imported via the source directive in global.css.
📚 Learning: 2025-11-14T22:12:39.974Z
Learnt from: kyrers
Repo: kleros/curate-v2 PR: 89
File: web/src/styles/breakpoints.ts:1-1
Timestamp: 2025-11-14T22:12:39.974Z
Learning: In the kleros/curate-v2 repository, the kleros/ui-components-library overrides Tailwind's lg breakpoint to 900px (not the default 1024px). The LG_BREAKPOINT constant in web/src/styles/breakpoints.ts is set to 900 to match this override. This configuration is imported via the source directive in global.css.

Applied to files:

  • web/src/global.css

@kyrers kyrers marked this pull request as ready for review December 15, 2025 20:55
@kyrers kyrers requested a review from tractorss December 15, 2025 20:55
@kyrers kyrers merged commit d107a5e into master Dec 18, 2025
7 checks passed
@kyrers kyrers deleted the refactor/migrate-to-clamp branch December 18, 2025 13:16
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.

Simplify complex CSS calculations

3 participants