Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix/379 button design in the home page #396

Conversation

MandeepPaul
Copy link

@MandeepPaul MandeepPaul commented Dec 17, 2024

Describe your changes

Changed the button UI on homepage

Issue number

#379

Please ensure all items are checked off before requesting a review:

  • I deployed the code locally.
  • I have performed a self-review of my code.
  • I have included the issue # in the PR.
  • I have labelled the PR correctly.
  • The issue I am working on is assigned to me.
  • I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application).
  • I made sure font sizes, color choices etc are all referenced from the theme.
  • My PR is granular and targeted to one specific feature.
  • I took a screenshot or a video and attached to this PR if there is a UI change.

Before

Screenshot 2024-12-17 041754

After

Screenshot 2024-12-17 041735

Copy link
Contributor

coderabbitai bot commented Dec 17, 2024

Walkthrough

This pull request introduces several UI-related enhancements, focusing on skeleton components and button styling in the frontend. The changes include removing an existing button styles file, updating the CreateActivityButton component, adding new skeleton components (BannerSkeleton and CustomSkeleton), and introducing new CSS color variables. The modifications aim to improve the visual consistency and loading state representations across the application's home page components.

Changes

File Change Summary
frontend/src/components/HomePageComponents/CreateActivityButton/ActivityButtonStyles.js Deleted style definitions file
frontend/src/components/HomePageComponents/CreateActivityButton/CreateActivityButton.jsx Updated component props, removed unused imports, modified button variant and styling
frontend/src/components/HomePageComponents/CreateActivityButtonList/CreateActivityButtonList.jsx Simplified button rendering using spread operator
frontend/src/components/HomePageComponents/Skeletons/BannerSkeleton.jsx New skeleton component for banner loading state
frontend/src/components/HomePageComponents/Skeletons/CustomSkeleton.jsx New customizable skeleton component
frontend/src/components/HomePageComponents/Skeletons/Skeleton.module.scss Added new CSS module classes for skeleton containers
frontend/src/scenes/dashboard/Dashboard.jsx Updated buttons array with new skeleton types
frontend/src/styles/variables.css Added new CSS color variables

Sequence Diagram

sequenceDiagram
    participant Dashboard
    participant CreateActivityButton
    participant BannerSkeleton
    participant CustomSkeleton

    Dashboard->>CreateActivityButton: Render with skeletonType
    alt Banner Creation
        CreateActivityButton-->>BannerSkeleton: Use as loading state
    else Helper Link
        CreateActivityButton-->>CustomSkeleton: Use as loading state
    end
Loading

Possibly Related PRs

Suggested Reviewers

  • gorkem-bwl

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🧹 Nitpick comments (7)
frontend/src/components/HomePageComponents/CreateActivityButton/CreateActivityButton.jsx (2)

25-29: Mom's spaghetti in this transition! 🍝

The transition property specifies box-shadow but no box-shadow is defined in the base or hover states.

 transition: "box-shadow 0.3s ease",
 "&:hover": {
   border: "1px solid var(--light-border-color)",
   backgroundColor: "var(--light-gray)",
+  boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)",
 },

39-41: Props validation weak like my knees! 🍝

Consider adding more specific PropTypes validation:

-skeletonType: PropTypes.node,
-placeholder: PropTypes.string,
-onClick: PropTypes.func.isRequired,
+skeletonType: PropTypes.node,
+placeholder: PropTypes.string.isRequired,
+onClick: PropTypes.func.isRequired,
frontend/src/components/HomePageComponents/Skeletons/PopUpSkeleton.jsx (2)

36-47: These hardcoded values got my arms heavy! 🍝

Consider moving the magic numbers and colors to a theme or constants file:

+const SKELETON_CONSTANTS = {
+  POPUP: {
+    width: 100,
+    height: 50,
+    top: 20,
+    left: 30,
+  },
+};

 <Skeleton
   sx={{
     position: "absolute",
-    top: 20,
-    left: 30,
+    top: SKELETON_CONSTANTS.POPUP.top,
+    left: SKELETON_CONSTANTS.POPUP.left,
     bgcolor: "var(--light-purple)",
     border: "0.5px solid #e9d5ff",
   }}
   variant="rounded"
-  width={100}
-  height={50}
+  width={SKELETON_CONSTANTS.POPUP.width}
+  height={SKELETON_CONSTANTS.POPUP.height}
   animation={false}
 />

1-52: Why's the animation disabled? Lost yourself in the moment! 🍝

Consider enabling animation for better loading state feedback. The current implementation might appear static and unresponsive to users.

Remove all animation={false} props to enable the default wave animation, or explicitly set animation="wave" for a specific animation style.

frontend/src/scenes/dashboard/Dashboard.jsx (3)

8-10: These imports are looking fresh!

Clean organization of skeleton imports. Consider creating an index file to barrel these exports.

Create an index.js in the Skeletons folder:

export { default as PopUpSkeleton } from './PopUpSkeleton';
export { default as BannerSkeleton } from './BannerSkeleton';
export { default as HelperSkeleton } from './HelperSkeleton';

Then simplify your imports:

- import PopUpSkeleton from "../../components/HomePageComponents/Skeletons/PopUpSkeleton";
- import BannerSkeleton from "../../components/HomePageComponents/Skeletons/BannerSkeleton";
- import HelperSkeleton from "../../components/HomePageComponents/Skeletons/HelperSkeleton";
+ import { PopUpSkeleton, BannerSkeleton, HelperSkeleton } from "../../components/HomePageComponents/Skeletons";

Line range hint 14-19: Yo, these metrics should be in their own file!

The metrics array could be moved to a constants file to keep the component cleaner.

Create a new file constants/metrics.js:

export const DASHBOARD_METRICS = [
  { metricName: "Popup views", metricValue: 5000, changeRate: 5 },
  { metricName: "Hint views", metricValue: 2000, changeRate: -20 },
  { metricName: "Banner Views", metricValue: 3000, changeRate: 15 },
];

21-35: The buttons array is looking clean, but we can make it even better!

Good job adding the skeleton types consistently. Consider extracting this configuration to a separate file and adding TypeScript interfaces for better type safety.

Create types and constants files:

// types/buttons.ts
interface DashboardButton {
  skeletonType: React.ReactNode;
  placeholder: string;
  onClick: () => void;
}

// constants/buttons.ts
export const DASHBOARD_BUTTONS = (navigate: NavigateFunction): DashboardButton[] => [
  {
    skeletonType: <PopUpSkeleton />,
    placeholder: "Create a popup",
    onClick: () => navigate("/popup/create"),
  },
  // ... other buttons
];
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5861c70 and 898a232.

📒 Files selected for processing (8)
  • frontend/src/components/HomePageComponents/CreateActivityButton/ActivityButtonStyles.js (0 hunks)
  • frontend/src/components/HomePageComponents/CreateActivityButton/CreateActivityButton.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/CreateActivityButtonList/CreateActivityButtonList.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/Skeletons/BannerSkeleton.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/Skeletons/HelperSkeleton.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/Skeletons/PopUpSkeleton.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/Skeletons/Skeleton.module.scss (1 hunks)
  • frontend/src/scenes/dashboard/Dashboard.jsx (2 hunks)
💤 Files with no reviewable changes (1)
  • frontend/src/components/HomePageComponents/CreateActivityButton/ActivityButtonStyles.js
✅ Files skipped from review due to trivial changes (2)
  • frontend/src/components/HomePageComponents/Skeletons/Skeleton.module.scss
  • frontend/src/components/HomePageComponents/Skeletons/BannerSkeleton.jsx
🔇 Additional comments (3)
frontend/src/components/HomePageComponents/CreateActivityButtonList/CreateActivityButtonList.jsx (1)

8-10: 🛠️ Refactor suggestion

Yo dawg, we need a better key for these buttons! 🍝

Using array index as key might cause issues if buttons get reordered or filtered. Consider using a unique identifier from the button object instead.

-{buttons.map((button, index) => (
-  <CreateActivityButton key={index} {...button} />
-))}
+{buttons.map((button) => (
+  <CreateActivityButton key={button.id} {...button} />
-))}
frontend/src/components/HomePageComponents/CreateActivityButton/CreateActivityButton.jsx (1)

16-19: Yo these CSS variables making me nervous! 🍝

Let's verify that all CSS variables are defined in the theme:

  • --background-color
  • --grey-border
  • --main-text-color
✅ Verification successful

Yo dawg, those CSS variables are legit! All good in the hood! 🍝

All the CSS variables used in the component are properly defined in frontend/src/styles/variables.css:

  • --background-color
  • --grey-border
  • --main-text-color

Plus they're getting mad love across the codebase, being used in like 30+ other files. We're keeping it real with consistent theming!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for CSS variable definitions
rg -g '*.{css,scss}' '(--background-color|--grey-border|--main-text-color)'

Length of output: 3902

frontend/src/components/HomePageComponents/Skeletons/HelperSkeleton.jsx (1)

36-47: Watch out for that absolute positioning, homie!

That absolute positioning at the bottom right could cause layout issues if the parent container's size changes. Consider using CSS Grid or Flexbox for more reliable positioning.

Let's check if this component is used in different container sizes:

✅ Verification successful

Yo, that absolute positioning is actually solid here, fam!

The absolute positioning is safe in this case because:

  • The parent .skeletonContainer has position: relative
  • The component is used in a consistent way within the Dashboard's CreateActivityButtonList
  • The container has fixed padding and a defined structure with flex layout

The current implementation provides a reliable and consistent layout for the skeleton component within its container. No changes needed, it's already following best practices!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
rg -l "HelperSkeleton" --type jsx --type tsx

Length of output: 72


Script:

#!/bin/bash
# Let's try a different approach to find the component usage
rg -l "HelperSkeleton" --type-list  # First, check available file types
rg -l "HelperSkeleton"  # Then search without type restriction

Length of output: 563


Script:

#!/bin/bash
# Let's also check the parent component structure
fd HelperSkeleton.jsx
cat $(fd HelperSkeleton.jsx)

Length of output: 1404


Script:

#!/bin/bash
# Let's look for imports of this component
rg "import.*HelperSkeleton"

Length of output: 164


Script:

#!/bin/bash
# Let's check how HelperSkeleton is used in Dashboard.jsx
cat frontend/src/scenes/dashboard/Dashboard.jsx

# Let's also check the Skeleton.module.scss to see the container styles
cat frontend/src/components/HomePageComponents/Skeletons/Skeleton.module.scss

Length of output: 2432

Comment on lines 7 to 34
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

There's vomit on his sweater already - it's repeated code! 🍝

Let's clean up this repetition by extracting the common Skeleton configuration:

+const CommonSkeleton = () => (
+  <Skeleton
+    variant="rectangular"
+    width={210}
+    height={30}
+    sx={{ bgcolor: "var(--light-gray)" }}
+    animation={false}
+  />
+);

 return (
   <div className={styles.skeletonContainer}>
-    <Skeleton
-      variant="rectangular"
-      width={210}
-      height={30}
-      sx={{ bgcolor: "var(--light-gray)" }}
-      animation={false}
-    />
-    // ... repeated 3 more times
+    {[...Array(4)].map((_, index) => (
+      <CommonSkeleton key={`skeleton-${index}`} />
+    ))}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
const CommonSkeleton = () => (
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
);
{[...Array(4)].map((_, index) => (
<CommonSkeleton key={`skeleton-${index}`} />
))}

Comment on lines 7 to 34
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Yo dawg, we need to clean up this repetitive code!

These skeleton blocks are making me nervous with all this repetition. Let's make it cleaner by mapping over an array.

Here's a better way to handle it, fam:

- <Skeleton
-   variant="rectangular"
-   width={210}
-   height={30}
-   sx={{ bgcolor: "var(--light-gray)" }}
-   animation={false}
- />
- // ... repeated 3 more times
+ {[...Array(4)].map((_, index) => (
+   <Skeleton
+     key={index}
+     variant="rectangular"
+     width={210}
+     height={30}
+     sx={{ bgcolor: "var(--light-gray)" }}
+     animation={false}
+   />
+ ))}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
{[...Array(4)].map((_, index) => (
<Skeleton
key={index}
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
))}

Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be implemented, as copy pasting Skeletons creates repetition

@erenfn erenfn requested review from erenfn and gorkem-bwl December 17, 2024 12:18
Copy link
Collaborator

@erenfn erenfn left a comment

Choose a reason for hiding this comment

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

I couldn't remember if I mentioned it but, we are working on the develop branch. So can you change the target branch to develop from master?

Comment on lines 7 to 34
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
<Skeleton
variant="rectangular"
width={210}
height={30}
sx={{ bgcolor: "var(--light-gray)" }}
animation={false}
/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be implemented, as copy pasting Skeletons creates repetition

@erenfn
Copy link
Collaborator

erenfn commented Dec 17, 2024

@gorkem-bwl @bolatein any comments about the UI?

@gorkem-bwl
Copy link
Contributor

gorkem-bwl commented Dec 17, 2024

@gorkem-bwl @bolatein any comments about the UI?

Neither colors nor wording are the same. They must be same as in Figma.

image

@MandeepPaul
Copy link
Author

MandeepPaul commented Dec 17, 2024

Noted! I will update right away

@gorkem-bwl
Copy link
Contributor

Noted! I will update right away

Make sure you compare them side-by-side and then open your PR.

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

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 898a232 and b8a21df.

📒 Files selected for processing (6)
  • frontend/src/components/HomePageComponents/CreateActivityButton/CreateActivityButton.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/Skeletons/BannerSkeleton.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/Skeletons/CustomSkeleton.jsx (1 hunks)
  • frontend/src/components/HomePageComponents/Skeletons/Skeleton.module.scss (1 hunks)
  • frontend/src/scenes/dashboard/Dashboard.jsx (2 hunks)
  • frontend/src/styles/variables.css (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/src/components/HomePageComponents/Skeletons/BannerSkeleton.jsx
  • frontend/src/components/HomePageComponents/Skeletons/Skeleton.module.scss
  • frontend/src/components/HomePageComponents/CreateActivityButton/CreateActivityButton.jsx
🔇 Additional comments (1)
frontend/src/scenes/dashboard/Dashboard.jsx (1)

48-49: Verify navigation path consistency

The placeholder says "Create a new helper link" but navigates to "/hint/create". Let's verify if this is intentional.

✅ Verification successful

The previous search might have failed due to quote escaping. Let's cast a wider net to find any hint-related routing or components that might help us verify the navigation consistency.


Navigation path is consistent with application routing

The navigation to "/hint/create" is correct and consistent with the application's routing structure. This path is properly defined in App.jsx and is used consistently across multiple components. The placeholder text "Create a new helper link" aligns with the hint creation functionality, as hints serve as helper content in the application.

  • Route "/hint/create" is properly defined in App.jsx and maps to
  • Same navigation path is used in HintDefaultPage.jsx
  • Consistent with hint-related terminology used throughout the codebase
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for route definitions and related components
rg -A 2 "'/hint/create'" 

Length of output: 32


Script:

#!/bin/bash
# Let's try a broader search for hint-related routes and components
rg -i "hint.*create|create.*hint" -A 2

# Also search for route definitions
rg -i "route.*hint|hint.*route" -A 2

# Search for files with 'hint' in their name
fd -i hint

Length of output: 3292

Comment on lines +13 to +14
animation={false}
sx={{ bgcolor: "var(--gray-250)" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Hold up! Why are we disabling animations on a loading skeleton?

The animation={false} prop defeats the purpose of a loading skeleton. Loading states typically include animations to indicate activity.

-          animation={false}
+          animation="wave"

Also applies to: 23-24

Comment on lines +11 to +12
width={210}
height={20}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Yo! These hardcoded dimensions are making me nervous!

The fixed width (210) and height (20) values could break responsiveness on different screen sizes. Consider using relative units or props for flexibility.

-          width={210}
-          height={20}
+          width="100%"
+          height={height || "20px"}

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +30 to +35
--gray-50: #fbfbfb;
--gray-100: #f8f8f8;
--gray-200: #C6C6C7;
--gray-250: #F3F3F3;
--blue-50: #E2EBFF;
--blue-300: #A8C1FF;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Mom's spaghetti moment: Dark mode support is missing!

The new color variables (--gray-* and --blue-*) don't have corresponding dark mode overrides. This could cause visibility issues in dark mode.

Add these variables to the dark mode section:

body[data-theme='dark'] {
+    --gray-50: #2c2c2c;
+    --gray-100: #1f1f1f;
+    --gray-200: #3a3a3a;
+    --gray-250: #333333;
+    --blue-50: #1a1f2e;
+    --blue-300: #2a3655;

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +23 to +27
frontSkeletonProps={{
position: "absolute",
top: 20,
left: 30,
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

These absolute positions are making my knees weak!

Using absolute positioning with hardcoded values could break layout on different screen sizes and resolutions.

Consider using CSS Grid or Flexbox for more reliable positioning:

-          frontSkeletonProps={{
-            position: "absolute",
-            top: 20,
-            left: 30,
-          }}
+          className={styles.skeletonPosition}

Add to your CSS module:

.skeletonPosition {
  display: grid;
  place-items: center;
}

Also applies to: 41-45

@MandeepPaul
Copy link
Author

I have created a new PR (#398) with the correct target branch to ensure proper integration.

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.

3 participants