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/colors general #1556

Merged
merged 49 commits into from
Jan 21, 2025
Merged

Fix/colors general #1556

merged 49 commits into from
Jan 21, 2025

Conversation

marcelluscaio
Copy link
Contributor

This is a draft, please pull and test

Copy link

@llamapreview llamapreview bot left a comment

Choose a reason for hiding this comment

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

Auto Pull Request Review from LlamaPReview

Large PR Notification

Dear contributor,

Thank you for your substantial contribution to this project. LlamaPReview has detected that this Pull Request contains a large volume of changes, which exceeds our current processing capacity.

Details:

  • PR and related contents total size: Approximately 89,160 characters
  • Current limit: 50,000 characters

Next steps:

  1. Consider breaking this PR into smaller, more focused changes if possible.
  2. For manual review, please reach out to your team members or maintainers.

We appreciate your understanding and commitment to improving this project. Your contributions are valuable, and we want to ensure they receive the attention they deserve.

LlamaPReview is continuously evolving to better serve the community. Share your thoughts on handling large PRs in our GitHub Discussions - your feedback helps us improve and expand our capabilities.

If you have any questions or need assistance, our community and support team are here to help.

Best regards,
LlamaPReview Team

Copy link

coderabbitai bot commented Jan 12, 2025

Walkthrough

This pull request represents a comprehensive theme color update across the entire client-side application. The changes primarily focus on refactoring color references to use more consistent, theme-driven color properties, particularly emphasizing the use of primary, contrastText, and lowContrast color variants. The modifications span multiple components, pages, and utility files, indicating a systematic approach to enhancing the application's visual consistency.

Changes

File/Directory Change Summary
Client/src/App.jsx Updated global text color to use theme's primary contrast text
Client/src/Components/* Widespread color property updates across multiple components
Client/src/Pages/* Comprehensive theme color refinements in page-level components
Client/src/Utils/Theme/constants.js Significant restructuring of color definitions and semantic colors
Client/src/Utils/Theme/globalTheme.js Updated palette generation to utilize extractThemeColors for improved color management
Client/src/Utils/toastUtils.jsx Changed default variant in createToast function from "info" to "secondary"
Client/src/Components/Breadcrumbs/index.css Modified height properties to use min-height instead of fixed height
Client/src/Pages/Uptime/Home/index.css Updated button height to min-height for flexibility

Sequence Diagram

sequenceDiagram
    participant Theme as Theme Constants
    participant Components as UI Components
    participant Pages as Page Components
    
    Theme->>Theme: Redefine color palette
    Theme->>Components: Propagate new color definitions
    Components->>Pages: Apply consistent color styling
    Pages->>Pages: Render with updated theme colors
Loading

Possibly related PRs

  • fix: fe/charts date display #1512: This PR modifies the MonitorDetailsAreaChart component to enhance date display on charts, which is relevant to the changes in the main PR that also involve styling and potentially visual representation in components.
  • feat: fe/reusable data table #1515: This PR introduces a new DataTable component that replaces various individual table implementations, which may relate to the overall styling and structure changes in the main PR, particularly in how components are rendered and styled.
  • remove monitors from summary, unused #1527: This PR focuses on simplifying the monitor summary endpoint by removing unnecessary data, which may indirectly relate to the overall data presentation and styling in the application, aligning with the main PR's focus on enhancing visual styling.

Suggested reviewers

  • jennifer-gan

The pull request represents a meticulous effort to standardize the application's color scheme, ensuring a more cohesive and visually appealing user interface. The changes demonstrate a strategic approach to design system implementation, focusing on maintainability and consistency across different components and pages.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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

@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: 12

🔭 Outside diff range comments (2)
Client/src/Components/Inputs/Image/index.jsx (1)

Line range hint 31-57: Don't lose yourself in the code - let's make it accessible! 🎤

The drag-and-drop zone could use some love for screen readers, yo!

 <Box
   className="image-field-wrapper"
+  role="button"
+  aria-label="Upload image. Click or drag and drop. Maximum size: 3MB"
   mt={theme.spacing(8)}
   sx={{
Client/src/Utils/Theme/constants.js (1)

Line range hint 214-235: Consider finalizing the temporary gradient colours.

The gradient colours are marked as temporary placeholders to prevent breaking changes. It's recommended to finalize these values before merging to maintain code stability and theme consistency.

Let me know if you'd like help in refining this section.

🧹 Nitpick comments (41)
Client/src/Components/HttpStatusLabel/index.jsx (2)

33-34: Yo, these color updates are straight fire! 🔥

The switch to semantic color tokens and consistent use of lowContrast for borders is a solid improvement. The code's cleaner than mom's spaghetti now!

Consider documenting these color token choices in a shared design system doc to help other devs stay consistent with the new theme approach.

Also applies to: 37-38, 41-42


54-56: Styles looking fresh and clean! ✨

The direct color property usage with customStyles spread is neat. Props for maintaining that flexibility!

Consider adding a comment explaining the customStyles override behavior for other devs who might need to customize these labels in the future.

Client/src/Components/TabPanels/Account/TeamPanel.jsx (1)

35-35: Yo dawg, let's clean up that destructuring, eh?

Remove the commented-out code and simplify the destructuring to only include what's needed:

- const { authToken /* , user  */ } = useSelector((state) => state.auth);
+ const { authToken } = useSelector((state) => state.auth);
Client/src/Components/Inputs/Image/index.jsx (2)

89-91: Mom's spaghetti approves this button styling! 🍝

The border styling is on point, but yo, consider adding a hover state to make it pop even more when users are about to drop that heat!

 sx={{
   pointerEvents: "none",
   borderRadius: theme.shape.borderRadius,
   border: `solid ${theme.shape.borderThick}px ${theme.palette.primary.lowContrast}`,
   boxShadow: theme.shape.boxShadow,
+  "&:hover": {
+    borderColor: theme.palette.primary.main,
+  },
 }}

97-97: Knees weak, arms heavy, but these typography colors are steady! 💪

The color updates are consistent, but we're repeating ourselves like a rap chorus. Let's make it DRY!

+const commonTypographyStyles = {
+  color: theme.palette.primary.contrastTextTertiary,
+  sx: { opacity: 0.6 }
+};

-<Typography
-  color={theme.palette.primary.contrastTextTertiary}
-  sx={{ opacity: 0.6 }}
+<Typography
+  {...commonTypographyStyles}

Also applies to: 111-111, 120-120

Client/src/Components/Inputs/TextInput/Adornments/index.jsx (1)

44-44: Looks solid as mom's spaghetti! 🍝

The color update to primary.lowContrast is on point. The focus styles are already looking fresh with that primary outline.

Consider adding a hover state for better interactivity:

 sx={{
   color: theme.palette.primary.lowContrast,
   padding: theme.spacing(1),
+  '&:hover': {
+    color: theme.palette.primary.main,
+  },
   '&:focus-visible': {
Client/src/Pages/Infrastructure/Details/empty.jsx (2)

Line range hint 7-31: Consider adding a loading skeleton, buddy!

Instead of just showing "Data is loading" text, consider adding a skeleton loader component to improve the user experience. This would give users a better visual indication of the loading state.

Here's a suggested implementation:

+ import { Skeleton } from "@mui/material";
  const Empty = ({ styles }) => {
    const theme = useTheme();
    const mode = useSelector((state) => state.ui.mode);
    return (
      <Box sx={{ ...styles, marginTop: theme.spacing(24) }}>
        <Stack
          direction="column"
          gap={theme.spacing(8)}
          alignItems="center"
        >
-         {mode === "light" ? <PlaceholderLight /> : <PlaceholderDark />}
+         {mode === "light" ? 
+           <Skeleton variant="rectangular" width={200} height={200}>
+             <PlaceholderLight />
+           </Skeleton> : 
+           <Skeleton variant="rectangular" width={200} height={200}>
+             <PlaceholderDark />
+           </Skeleton>
+         }

Line range hint 1-39: Beauty of a component, but let's make it more reusable!

The component could be more flexible by accepting children props instead of hardcoded text. This would make it more reusable across different loading states.

Here's how we could refactor it:

- const Empty = ({ styles }) => {
+ const Empty = ({ styles, title, description, children }) => {
    // ...
    return (
      <Box sx={{ ...styles, marginTop: theme.spacing(24) }}>
        <Stack
          direction="column"
          gap={theme.spacing(8)}
          alignItems="center"
        >
          {mode === "light" ? <PlaceholderLight /> : <PlaceholderDark />}
-         <Typography variant="h2">Your infrastructure dashboard will show here</Typography>
+         <Typography variant="h2">{title}</Typography>
          <Typography
            textAlign="center"
            color={theme.palette.primary.contrastTextSecondary}
          >
-           Hang tight! Data is loading
+           {description}
          </Typography>
+         {children}
        </Stack>
      </Box>
    );
  };

  Empty.propTypes = {
    styles: PropTypes.object,
    mode: PropTypes.string,
+   title: PropTypes.string,
+   description: PropTypes.string,
+   children: PropTypes.node,
  };
Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (2)

7-15: Yo dawg, let's make those magic numbers more maintainable!

Extract those response time thresholds into named constants at the top of the file. Makes it easier to adjust these values later, ya feel me?

+const RESPONSE_TIME_THRESHOLDS = {
+  SUCCESS: 200,
+  WARNING: 300
+};

 const getThemeColor = (responseTime) => {
-  if (responseTime < 200) {
+  if (responseTime < RESPONSE_TIME_THRESHOLDS.SUCCESS) {
     return "success";
-  } else if (responseTime < 300) {
+  } else if (responseTime < RESPONSE_TIME_THRESHOLDS.WARNING) {
     return "warning";
   } else {
     return "error";
   }
 };

78-84: Let's make this color logic clean and mean!

The nested ternary is making my knees weak. We can make it cleaner by extracting the logic into a helper function.

+ const getCellFillColor = (theme, themeColor, isHovered, isChartHovered) => {
+   if (isHovered) return theme.palette[themeColor].main;
+   return isChartHovered ? theme.palette[themeColor].accent : theme.palette[themeColor].main;
+ };

  <Cell
    key={`cell-${entry.time}`}
-   fill={
-     hoveredBarIndex === index
-       ? theme.palette[themeColor].main
-       : chartHovered
-         ? theme.palette[themeColor].accent
-         : theme.palette[themeColor].main
-   }
+   fill={getCellFillColor(theme, themeColor, hoveredBarIndex === index, chartHovered)}
Client/src/Components/IconBox/index.jsx (1)

62-62: Heads up on semantic naming, fam!

Using contrastTextTertiary for SVG strokes seems semantically off - it's meant for text contrast. Consider using a more appropriate token from the theme palette.

-        stroke: theme.palette.primary.contrastTextTertiary,
+        stroke: theme.palette.primary.icon, // or another icon-specific token
Client/src/Components/ProgressBars/index.jsx (1)

62-62: Mom's spaghetti moment: Icon box styling needs attention! 🍝

The icon box styling has some potential improvements:

  1. The border color matches the background, making it potentially invisible
  2. Using primary.main with contrastTextTertiary needs contrast verification

Consider this alternative:

-borderColor: theme.palette.primary.lowContrast,
+borderColor: theme.palette.primary.main,

Also applies to: 64-64, 73-73

Client/src/Pages/Uptime/Home/UptimeTable/index.jsx (1)

251-251: There's TODO on his sweater already!

This TODO comment suggests the color update isn't complete. Let's track this properly, eh?

Would you like me to create a GitHub issue to track the remaining color updates? This will help ensure we don't lose track of the remaining work.

Client/src/Pages/Auth/SetNewPassword.jsx (1)

114-115: These styles are getting repetitive, but in a good way!

I'm vibing with the consistency, but since we're using the same container styles in multiple auth components, maybe we could extract this into a shared style? Just a thought to keep our code DRY!

Want me to show you how we could create a shared auth container component with these styles? Could make future updates even smoother! 🚀

Client/src/Pages/Auth/NewPasswordConfirmed.jsx (1)

41-42: That selector's deeper than Eminem's lyrics! 🎤

& svg g g:last-of-type path is quite specific, fam. While the color update to primary.lowContrast is on point, we might want to consider simplifying this selector to make it more maintainable.

Consider using a class name or data attribute instead:

-"& svg g g:last-of-type path": {
+".background-stroke": {
   stroke: theme.palette.primary.lowContrast,
},
Client/src/Components/Heading/index.jsx (2)

14-14: Hold up, we need to handle that style prop properly! 🤔

The style prop is being passed directly to the Typography component. While this works, we should consider merging it with default styles to prevent accidental overwrites.

Here's a spicier way to handle those styles:

-function Heading({ component, style, children }) {
+function Heading({ component, style = {}, children }) {
   return (
     <Typography
       component={component}
       variant="h2"
       fontWeight={600}
-      style={style}
+      style={{
+        ...style,
+        // Add any default styles here
+      }}
     >

Also applies to: 20-20


29-29: Yo, these PropTypes are straight fire! But wait... 🎤

The style PropTypes could be more specific. Instead of just object, we could define the expected shape of the style object.

Drop this heat:

-  style: PropTypes.object,
+  style: PropTypes.shape({
+    // Define expected style properties here
+    color: PropTypes.string,
+    fontSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
+    // Add more as needed
+  }),
Client/src/Utils/Theme/constants.js (1)

95-103: Reminder to address the TODO comment regarding red and warning colours.

Please complete the updates to the red and warning colour palettes and refactor the object as mentioned in the comment to ensure consistency across the theme.

Would you like assistance in updating these colours and refactoring the object?

Client/src/Components/Link/index.jsx (2)

19-24: Yo, these secondary link styles are straight fire! 🔥

The consistent use of contrastTextSecondary is tight, but we should probably add some hover transition for that smooth feel.

 secondary: {
   color: theme.palette.primary.contrastTextSecondary,
   sx: {
+    transition: 'color 0.2s ease-in-out',
     ":hover": {
       color: theme.palette.primary.contrastTextSecondary,
     },
   },
 },

27-37: These tertiary styles are looking fresh, but we can make 'em fresher!

The dashed underline with that lowContrast background is dope, but let's make it smoother.

 tertiary: {
   color: theme.palette.primary.contrastTextTertiary,
   sx: {
+    transition: 'all 0.2s ease-in-out',
     textDecoration: "underline",
     textDecorationStyle: "dashed",
     textDecorationColor: theme.palette.primary.main,
     textUnderlineOffset: "1px",
     ":hover": {
       color: theme.palette.primary.contrastTextTertiary,
       textDecorationColor: theme.palette.primary.main,
       backgroundColor: theme.palette.primary.lowContrast,
     },
   },
 },
Client/src/Components/Animated/PulseDot.jsx (1)

19-23: Yo, these TODOs are speaking to me! 📝

That refactoring plan looks solid! Using statusToTheme would make this component way more flexible.

Want me to help cook up that refactoring implementation? Just say the word and I'll drop that heat! 🔥

Client/src/Components/Avatar/index.jsx (1)

Line range hint 43-53: This border effect is complex, yo! 🤯

The border effect using ::before adds unnecessary complexity. Consider using MUI's built-in border prop instead.

-"&::before": {
-  content: `""`,
-  position: "absolute",
-  top: 0,
-  left: 0,
-  width: `100%`,
-  height: `100%`,
-  border: `${border}px solid rgba(255,255,255,0.2)`,
-  borderRadius: "50%",
-},
+border: `${border}px solid rgba(255,255,255,0.2)`,
Client/src/Components/Check/Check.jsx (1)

52-55: Yo dawg, this color change is straight fire! 🔥

The switch to primary.contrastTextTertiary keeps it consistent with the new theme system. Looking clean!

Consider extracting these color mappings into a separate constant object at the top of the file to make future theme updates easier to manage:

+ const VARIANT_COLORS = {
+   success: (theme) => theme.palette.success.main,
+   error: (theme) => theme.palette.error.main,
+   info: (theme) => theme.palette.primary.contrastTextTertiary
+ };
Client/src/Pages/Uptime/Home/StatusBox.jsx (1)

48-49: Palms are sweaty, but this theme consistency is ready! 💦

Solid work on standardizing the colors:

  • Background color → primary.main
  • Border color → primary.lowContrast
  • Text colors → contrastText variants

This creates a more cohesive visual hierarchy.

Consider creating a StatusBox-specific theme constants object to centralize these color mappings:

const STATUS_THEME = {
  up: (theme) => ({
    color: theme.palette.success.lowContrast,
    iconStyles: { top: 8 }
  }),
  down: (theme) => ({
    color: theme.palette.error.lowContrast,
    iconStyles: { transform: "rotate(180deg)", top: 5 }
  }),
  // ... etc
};

Also applies to: 61-61, 71-71, 91-91

Client/src/Components/Charts/Gauge/index.jsx (1)

61-61: Knees weak, arms heavy, but these gauge colors are steady! 💪

Good call switching to error.main for poor progress values - it's more intuitive than the previous percentage.uptimePoor. The background using primary.lowContrast maintains consistency with other components.

Consider extracting the threshold logic and colors into named constants:

const PROGRESS_COLORS = {
  good: (theme) => theme.palette.primary.main,
  poor: (theme) => theme.palette.error.main
};

const getProgressColor = (theme, value) => 
  value > PROGRESS_THRESHOLD 
    ? PROGRESS_COLORS.good(theme)
    : PROGRESS_COLORS.poor(theme);

Also applies to: 85-85, 87-87

Client/src/Components/Fallback/index.jsx (1)

43-43: There's vomit on his sweater already, but these colors are steady! 🎨

Clean updates to the color scheme:

  • SVG stroke using primary.lowContrast
  • Text color using primary.contrastTextTertiary

These changes maintain visual consistency with the rest of the application.

BTW, there's a TODO comment on line 69 about displaying a different fallback for non-admin users. Want me to help implement that?

Also applies to: 57-57

Client/src/Components/StatBox/index.jsx (1)

37-45: That gradient game is strong! 🌈

The gradient implementation is clean, but let's consider:

  1. Extract gradient styles to a theme utility
  2. Add fallback for browsers that don't support gradients
+ // Add to theme utils
+ const getGradientBackground = (theme, color) => ({
+   background: `linear-gradient(to bottom right, ${theme.palette[color].main} 30%, ${theme.palette[color].lowContrast} 70%)`,
+   fallback: theme.palette[color].main,
+ });
Client/src/Components/Alert/index.jsx (1)

35-36: Spittin' facts about those variants! 🎯

Valid question about alert variants. Consider:

  1. Map variants to semantic colors (success, info, warning, error)
  2. Allow custom variants through theme extension
Client/src/Pages/Uptime/utils.jsx (1)

65-85: Cleanup time! These gradient styles are repeating themselves like a broken record! 🎵

The gradient definitions in statusStyles are duplicated for each status. Let's extract this into a reusable function.

 const statusStyles = {
+  const createGradient = (color) => ({
+    backgroundColor: theme.palette[color].lowContrast,
+    background: `linear-gradient(340deg, ${theme.palette[color].lowContrast} -60%, ${theme.palette[color].contrastText} 35%)`,
+    borderColor: theme.palette[color].contrastText,
+    "& h2": { color: theme.palette[color].main },
+  });
+
   up: {
-    backgroundColor: theme.palette.success.lowContrast,
-    background: `linear-gradient(340deg, ${theme.palette.success.lowContrast} -60%, ${theme.palette.success.contrastText} 35%)`,
-    borderColor: theme.palette.success.contrastText,
-    "& h2": { color: theme.palette.success.main },
+    ...createGradient('success'),
   },
   // Apply similar pattern to other status styles
Client/src/Pages/Integrations/index.jsx (1)

Line range hint 58-58: Consider adding a disabled state style

All integration buttons are disabled but there's no visual indication of why. Consider adding a tooltip or disabled state styling to improve user experience.

 <Button
   variant="contained"
   color="primary"
   onClick={onClick}
-  sx={{ alignSelf: "center" }}
+  sx={{ 
+    alignSelf: "center",
+    '&.Mui-disabled': {
+      cursor: 'not-allowed'
+    }
+  }}
   disabled={true}
+  title="Integration coming soon"
 >
Client/src/Components/Label/index.jsx (1)

Line range hint 58-77: Consider using theme.palette.augmentColor for color manipulation

Instead of manually calculating lighter shades with lightenColor, consider using Material-UI's built-in color manipulation utilities.

-const lightenColor = (color, percent) => {
-  // ... current implementation
-};

+import { alpha } from '@mui/material/styles';
+
 const ColoredLabel = ({ label, color }) => {
   const theme = useTheme();
   
-  const borderColor = lightenColor(color, 20);
-  const bgColor = lightenColor(color, 75);
+  const borderColor = alpha(color, 0.8);
+  const bgColor = alpha(color, 0.25);
Client/src/Components/Charts/BarChart/index.jsx (2)

48-48: Mom's spaghetti moment: Status indicators might be too subtle

Using lowContrast variants for success/error indicators might make them harder to spot. Consider using the main variants for better visibility.

-theme.palette.success.lowContrast
+theme.palette.success.main
-theme.palette.error.lowContrast
+theme.palette.error.main

Also applies to: 71-72


149-153: Clean up commented code - knees weak, arms are heavy

The commented hover effect code with TODO should either be implemented or removed. Dead code adds cognitive load.

-/* 
-TODO this doesn't seem to be used
-"&:hover > .MuiBox-root": {
-  filter: "brightness(0.8)",
-}, */
Client/src/Components/Inputs/Search/index.jsx (1)

30-30: Enhance hover states - make 'em lose themselves in the moment

The color updates are solid, but consider adding subtle transitions for hover states to improve user feedback.

 "& fieldset": {
   borderColor: theme.palette.primary.lowContrast,
   borderRadius: theme.shape.borderRadius,
+  transition: theme.transitions.create(['border-color']),
 },

Also applies to: 83-83, 98-98, 103-103

Client/src/Pages/Uptime/Home/actionsMenu.jsx (1)

109-119: Drop that commented code like it's hot! 🔥

The styling updates look good, but let's remove the commented-out code since it's not being used. If this styling decision needs to be documented, consider moving it to the component's documentation or a separate design doc.

 "& ul": {
   p: theme.spacing(2.5),
   backgroundColor: theme.palette.primary.main,
 },
 "& li": { m: 0, color: theme.palette.primary.contrastTextSecondary },
-/* 
-This should not be set automatically on the last of type
-"& li:last-of-type": {
-  color: theme.palette.error.main,
-}, */
Client/src/Pages/PageSpeed/card.jsx (1)

119-121: Consider extracting theme color mapping to a constants file

The statusToTheme mapping could be moved to a dedicated theme constants file for better maintainability.

Client/src/Pages/PageSpeed/Details/Charts/AreaChart.jsx (1)

189-189: Chart color scheme improvements

The updated color scheme provides better visual hierarchy and consistency. Consider documenting the color usage patterns for future reference.

Consider adding a comment block explaining the color scheme:

+ /**
+  * Chart Color Scheme:
+  * - Grid lines: primary.lowContrast
+  * - Axis: primary.lowContrast
+  * - Data points: color.main with lowContrast background
+  */

Also applies to: 241-241, 248-248, 258-258, 263-265, 293-293

Client/src/Pages/Auth/Register/Register.jsx (1)

288-289: TODO comment needs addressing

The font size should be defined in the theme for consistency.

Would you like me to help create a PR to move font sizes to the theme configuration?

Client/src/Components/Sidebar/index.jsx (1)

169-171: Bruh, these TODOs need some love! Let's organize these styles better.

The TODOs indicate a need for better style organization. Consider creating a separate styles object or using styled components to keep the styling more maintainable.

Example structure:

const sidebarStyles = {
  root: (theme) => ({
    border: 1,
    borderColor: theme.palette.primary.lowContrast,
    borderRadius: theme.shape.borderRadius,
  }),
  text: (theme) => ({
    color: theme.palette.primary.contrastTextSecondary,
  }),
  // ... other style objects
};

Also applies to: 174-181

Client/src/Components/BasicTable/index.jsx (1)

204-222: These table styles are straight fire, but we got some TODOs to handle! 🔥

The color updates using theme palette are solid, but let's address those TODOs about general styling.

Consider extracting the styles into a separate object:

const tableStyles = {
  cell: (theme) => ({
    backgroundColor: theme.palette.primary.main,
    color: theme.palette.primary.contrastTextSecondary,
    paddingLeft: theme.spacing(12),
  }),
  header: (theme) => ({
    backgroundColor: theme.palette.secondary.main,
    color: theme.palette.secondary.contrastText,
    paddingLeft: theme.spacing(12),
  }),
};
Client/src/Components/Sidebar/index.css (1)

1-1: Yo dawg, this TODO is looking lonely! Let's give it some context! 📝

Empty TODO comments aren't helpful. Please add context about what needs to be done or remove it if it's no longer needed.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0e443e4 and a6eb970.

📒 Files selected for processing (82)
  • Client/src/App.jsx (1 hunks)
  • Client/src/Components/Alert/index.jsx (1 hunks)
  • Client/src/Components/Animated/PulseDot.jsx (3 hunks)
  • Client/src/Components/Avatar/index.jsx (2 hunks)
  • Client/src/Components/BasicTable/index.jsx (3 hunks)
  • Client/src/Components/Breadcrumbs/index.jsx (2 hunks)
  • Client/src/Components/Charts/AreaChart/index.jsx (2 hunks)
  • Client/src/Components/Charts/BarChart/index.jsx (5 hunks)
  • Client/src/Components/Charts/CustomGauge/index.jsx (2 hunks)
  • Client/src/Components/Charts/Gauge/index.jsx (2 hunks)
  • Client/src/Components/Charts/MonitorDetailsAreaChart/index.jsx (7 hunks)
  • Client/src/Components/Charts/Utils/chartUtils.jsx (6 hunks)
  • Client/src/Components/Check/Check.jsx (1 hunks)
  • Client/src/Components/ConfigBox/index.jsx (3 hunks)
  • Client/src/Components/Dialog/genericDialog.jsx (2 hunks)
  • Client/src/Components/Fallback/index.jsx (2 hunks)
  • Client/src/Components/Heading/index.jsx (2 hunks)
  • Client/src/Components/HttpStatusLabel/index.jsx (1 hunks)
  • Client/src/Components/IconBox/index.jsx (2 hunks)
  • Client/src/Components/Inputs/Checkbox/index.jsx (1 hunks)
  • Client/src/Components/Inputs/Image/index.jsx (4 hunks)
  • Client/src/Components/Inputs/Radio/index.jsx (3 hunks)
  • Client/src/Components/Inputs/Search/index.jsx (5 hunks)
  • Client/src/Components/Inputs/Select/index.jsx (3 hunks)
  • Client/src/Components/Inputs/TextInput/Adornments/index.jsx (2 hunks)
  • Client/src/Components/Inputs/TextInput/index.jsx (1 hunks)
  • Client/src/Components/Label/index.jsx (3 hunks)
  • Client/src/Components/Link/index.jsx (1 hunks)
  • Client/src/Components/ProgressBars/index.jsx (5 hunks)
  • Client/src/Components/Sidebar/index.css (1 hunks)
  • Client/src/Components/Sidebar/index.jsx (14 hunks)
  • Client/src/Components/StatBox/index.jsx (4 hunks)
  • Client/src/Components/TabPanels/Account/PasswordPanel.jsx (8 hunks)
  • Client/src/Components/TabPanels/Account/ProfilePanel.jsx (8 hunks)
  • Client/src/Components/TabPanels/Account/TeamPanel.jsx (4 hunks)
  • Client/src/Components/ThemeSwitch/SunAndMoonIcon.jsx (1 hunks)
  • Client/src/Components/ThemeSwitch/index.jsx (2 hunks)
  • Client/src/Pages/Account/index.jsx (2 hunks)
  • Client/src/Pages/Auth/CheckEmail.jsx (2 hunks)
  • Client/src/Pages/Auth/ForgotPassword.jsx (2 hunks)
  • Client/src/Pages/Auth/Login/Login.jsx (2 hunks)
  • Client/src/Pages/Auth/NewPasswordConfirmed.jsx (2 hunks)
  • Client/src/Pages/Auth/Register/Register.jsx (5 hunks)
  • Client/src/Pages/Auth/Register/StepThree/index.jsx (1 hunks)
  • Client/src/Pages/Auth/SetNewPassword.jsx (2 hunks)
  • Client/src/Pages/Incidents/IncidentTable/Empty/Empty.jsx (1 hunks)
  • Client/src/Pages/Incidents/IncidentTable/index.jsx (3 hunks)
  • Client/src/Pages/Incidents/index.jsx (2 hunks)
  • Client/src/Pages/Infrastructure/Details/empty.jsx (1 hunks)
  • Client/src/Pages/Infrastructure/Details/index.jsx (3 hunks)
  • Client/src/Pages/Infrastructure/components/Menu/index.jsx (1 hunks)
  • Client/src/Pages/Infrastructure/components/TablePagination/index.jsx (1 hunks)
  • Client/src/Pages/Infrastructure/index.jsx (6 hunks)
  • Client/src/Pages/Integrations/index.jsx (2 hunks)
  • Client/src/Pages/Maintenance/CreateMaintenance/index.jsx (3 hunks)
  • Client/src/Pages/Maintenance/MaintenanceTable/ActionsMenu/index.jsx (1 hunks)
  • Client/src/Pages/Maintenance/MaintenanceTable/index.jsx (1 hunks)
  • Client/src/Pages/Maintenance/index.jsx (1 hunks)
  • Client/src/Pages/PageSpeed/Configure/index.jsx (3 hunks)
  • Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx (2 hunks)
  • Client/src/Pages/PageSpeed/Details/Charts/AreaChart.jsx (6 hunks)
  • Client/src/Pages/PageSpeed/Details/Charts/PieChart.jsx (1 hunks)
  • Client/src/Pages/PageSpeed/Details/index.jsx (5 hunks)
  • Client/src/Pages/PageSpeed/Details/styled.jsx (2 hunks)
  • Client/src/Pages/PageSpeed/card.jsx (12 hunks)
  • Client/src/Pages/PageSpeed/index.jsx (3 hunks)
  • Client/src/Pages/Status/index.jsx (1 hunks)
  • Client/src/Pages/Uptime/Configure/index.jsx (2 hunks)
  • Client/src/Pages/Uptime/Details/Charts/DownBarChart.jsx (2 hunks)
  • Client/src/Pages/Uptime/Details/Charts/ResponseGaugeChart.jsx (1 hunks)
  • Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (3 hunks)
  • Client/src/Pages/Uptime/Details/index.jsx (10 hunks)
  • Client/src/Pages/Uptime/Details/styled.jsx (2 hunks)
  • Client/src/Pages/Uptime/Home/CurrentMonitoring/index.jsx (1 hunks)
  • Client/src/Pages/Uptime/Home/StatusBox.jsx (5 hunks)
  • Client/src/Pages/Uptime/Home/UptimeTable/index.jsx (4 hunks)
  • Client/src/Pages/Uptime/Home/actionsMenu.jsx (3 hunks)
  • Client/src/Pages/Uptime/Home/fallback.jsx (1 hunks)
  • Client/src/Pages/Uptime/Home/host.jsx (1 hunks)
  • Client/src/Pages/Uptime/Home/index.jsx (1 hunks)
  • Client/src/Pages/Uptime/utils.jsx (2 hunks)
  • Client/src/Utils/Theme/constants.js (2 hunks)
⛔ Files not processed due to max files limit (5)
  • Client/src/Utils/Theme/darkTheme.js
  • Client/src/Utils/Theme/extractColorObject.js
  • Client/src/Utils/Theme/globalTheme.js
  • Client/src/Utils/Theme/lightTheme.js
  • Client/src/Utils/greeting.jsx
✅ Files skipped from review due to trivial changes (15)
  • Client/src/Pages/Maintenance/MaintenanceTable/ActionsMenu/index.jsx
  • Client/src/Pages/Uptime/Home/host.jsx
  • Client/src/Pages/Uptime/Details/Charts/ResponseGaugeChart.jsx
  • Client/src/Pages/Infrastructure/components/Menu/index.jsx
  • Client/src/Pages/Maintenance/CreateMaintenance/index.jsx
  • Client/src/Pages/Auth/Login/Login.jsx
  • Client/src/Pages/PageSpeed/CreatePageSpeed/index.jsx
  • Client/src/Pages/PageSpeed/Configure/index.jsx
  • Client/src/Components/Charts/AreaChart/index.jsx
  • Client/src/Pages/Uptime/Configure/index.jsx
  • Client/src/Pages/Incidents/index.jsx
  • Client/src/Pages/Auth/CheckEmail.jsx
  • Client/src/Components/TabPanels/Account/ProfilePanel.jsx
  • Client/src/Pages/Infrastructure/Details/index.jsx
  • Client/src/Pages/Auth/Register/StepThree/index.jsx
🧰 Additional context used
🪛 Biome (1.9.4)
Client/src/Pages/Uptime/Home/index.jsx

[error] 61-75: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment

(lint/complexity/noUselessFragments)

🔇 Additional comments (93)
Client/src/Components/HttpStatusLabel/index.jsx (1)

48-48: Clean destructuring, my dude! 👊

Removed the unused properties making the code cleaner than a fresh pair of Timbs.

Client/src/Components/TabPanels/Account/TeamPanel.jsx (3)

94-96: Beauty of a colour update there, bud!

The Typography component's colour update aligns perfectly with the new theme system.


193-198: These style updates are straight fire, eh!

The TabPanel styles are looking sharp with the new theme colours. Good use of scoped selectors too!


245-245: Hold up, these buttons aren't matching like a proper Canadian tuxedo!

I notice we've got different colour props for similar action buttons:

  • "Invite a team member" button uses color="accent"
  • "Send invite" confirmation button uses color="primary"

Should we keep these consistent for better visual hierarchy?

Also applies to: 308-315

Client/src/Components/Inputs/Image/index.jsx (1)

42-42: Yo, this border color change is straight fire! 🔥

The new theme.palette.primary.lowContrast keeps it real with the design system. Nice choice for the default state, fam!

Client/src/Pages/Uptime/Details/Charts/DownBarChart.jsx (1)

34-34: Yo dawg, that color change is straight fire! 🔥

The switch to primary.lowContrast for the XAxis stroke is a solid choice for a subtle timeline visualization. Just make sure it's still readable against your background, fam!

Let's check if this color combo is accessible:

✅ Verification successful

Yo dawg, we're good to go with that XAxis stroke color! 💯

That primary.lowContrast stroke is gonna pop just right against the primary.main background - it's the same combo used all over the app, fam! The contrast is on point and follows the Material-UI standards.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any background color definitions in parent components
rg -B 5 -A 5 "background|backgroundColor" "Client/src/Pages/Uptime"

Length of output: 17032

Client/src/Components/Inputs/TextInput/Adornments/index.jsx (1)

15-16: Yo dawg, let's make sure these colors are accessible!

The color changes look clean, but we gotta verify those contrast ratios to keep things accessible. The combination of tertiary.main background with primary.contrastTextSecondary text needs special attention.

Run this script to check if we have any accessibility testing utilities in the codebase:

Also applies to: 23-23

✅ Verification successful

Yo, these colors are straight fire! 🔥

The color combinations are following the established theme patterns that are already being monitored for accessibility through PageSpeed integration. The component correctly uses:

  • contrastTextSecondary token for text (never using lowContrast)
  • lowContrast token only for borders (as intended)
  • tertiary.main for background with appropriate contrast text
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for accessibility testing utilities
rg -i "accessibility|a11y|contrast|wcag" --type js

Length of output: 37442

Client/src/Pages/Infrastructure/Details/empty.jsx (1)

22-22: Yo dawg, let's make sure this text is legible, eh?

The change to theme.palette.primary.contrastTextSecondary looks good for consistency, but we should verify the contrast ratio meets WCAG guidelines, especially since this is loading state feedback.

Run this script to check other contrast text usage:

✅ Verification successful

Yo dawg, we're all good with that contrast, eh! 🍁

The contrastTextSecondary is consistently implemented across the codebase with proper light/dark mode support. The theme tokens are properly defined in the constants and used appropriately for secondary text elements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar contrast text usage patterns
rg "contrastTextSecondary" -A 2 -B 2

Length of output: 17764

Client/src/Components/IconBox/index.jsx (2)

53-53: Check if the background color affects SVG visibility!

The new tertiary.main background might affect the visibility of the SVG icons. We should ensure there's enough contrast with the icon stroke color.

✅ Verification successful

No visibility concerns - stroke color is explicitly handled! 🎯

The IconBox component explicitly sets the SVG path stroke colour to primary.contrastTextTertiary, ensuring proper contrast against the tertiary background. The implementation is robust and consistent with the application's theming patterns.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Find other components using tertiary.main to verify consistent usage
ast-grep --pattern 'theme.palette.tertiary.main'

Length of output: 2374


Script:

#!/bin/bash
# Check theme definition and IconBox styling
cat Client/src/Utils/Theme/globalTheme.js
cat Client/src/Components/IconBox/index.jsx

Length of output: 9262


51-51: Yo dawg, verify the border contrast with the background!

The border color theme.palette.primary.lowContrast might not provide sufficient contrast against tertiary.main background. Let's make sure our UI doesn't look like mom's spaghetti.

✅ Verification successful

Yo dawg, that color combo is straight fire! 🔥

The border-background combo of primary.lowContrast and tertiary.main is used consistently across multiple components like Sidebar, CurrentMonitoring, and other UI elements. It's part of the established design system pattern, so we're good to go!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other components using these color combinations to verify consistency
rg -l "primary\.lowContrast.*tertiary\.main|tertiary\.main.*primary\.lowContrast"

Length of output: 83


Script:

#!/bin/bash
# Search for theme configuration files
fd -e js -e ts -e jsx -e tsx -e json "theme|palette" --type f

# Search for individual color usages
echo "=== Primary Low Contrast Usage ==="
rg "primary\.lowContrast" -A 2 -B 2

echo "=== Tertiary Main Usage ==="
rg "tertiary\.main" -A 2 -B 2

# Look for design system docs
fd -g "*design-system*.{md,mdx}" --type f

Length of output: 49356

Client/src/Components/Dialog/genericDialog.jsx (3)

40-40: Mom's spaghetti approves this color change! 🍝

The switch to primary.contrastText is on point - it'll maintain readability against the new primary.main background.


48-48: Hold up, is that custom theme property legit?

primary.contrastTextTertiary isn't a standard MUI theme property. Let's make sure it's properly defined in your theme configuration.

Let's check the theme setup:

✅ Verification successful

Yo, that theme property is legit! 🎤

The primary.contrastTextTertiary is properly defined in your theme with both light and dark mode values. Keep spittin' that consistent styling!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for theme configuration files and the custom property
rg -g '*.{js,jsx,ts,tsx}' 'contrastTextTertiary'

Length of output: 7788


Script:

#!/bin/bash
# Check the actual implementation of contrastTextTertiary in theme constants
cat Client/src/Utils/Theme/constants.js

Length of output: 5084


25-25: Yo dawg, let's make sure these colors are accessible!

The switch to primary theme colors looks fresh, but we gotta verify the contrast ratios meet WCAG standards, especially since this dialog might contain important user interactions.

Run this script to check other dialogs using similar color combinations:

Also applies to: 27-27

Client/src/Components/ProgressBars/index.jsx (4)

32-33: Yo dawg, these theme updates are straight fire! 🔥

The switch to primary.lowContrast for both border and background creates a clean, unified look. The consistency is on point!


92-92: Text color's looking clean, no cap! 💯

The update to primary.contrastTextTertiary aligns with the new theming system. Good consistency!


150-150: Progress bar background got that fresh drip! 💧

Using primary.lowContrast for the progress bar background maintains visual consistency with the container.

Let's verify the contrast with the progress indicator:

✅ Verification successful

Yo, the contrast is straight fire! 🔥

The progress bar's got that perfect balance - background chillin' with primary.lowContrast while the indicator's flexing with MUI's default primary.main. That's some proper visual hierarchy right there!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for LinearProgress components to compare styling
ast-grep --pattern 'LinearProgress variant="determinate" $_'

Length of output: 62


Script:

#!/bin/bash
# Search for LinearProgress components with broader pattern
ast-grep --pattern 'LinearProgress'

# Check theme color usage in the progress bars file
cat Client/src/Components/ProgressBars/index.jsx

# Search for other styling patterns
rg "theme\.palette" Client/src/Components/ProgressBars/index.jsx

Length of output: 5618


36-36: Hold up, we need to verify this error state contrast! 👀

The error state using error.lowContrast might need a contrast check to ensure it meets accessibility standards.

Let's run some checks:

✅ Verification successful

Yo, the error state contrast is actually on point! 🎯

The use of error.lowContrast for background is intentional and follows the codebase's accessibility patterns. It's properly paired with error.contrastText for text elements, ensuring good contrast ratios.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other error state background colors in the codebase for consistency
rg -g '*.{jsx,js,tsx,ts}' 'palette\.error\.lowContrast'

# Look for any accessibility-related configuration or utilities
fd -e js -e jsx -e ts -e tsx -x grep -l 'accessibility|a11y|contrast|WCAG'

Length of output: 1121


Script:

#!/bin/bash
# Search for theme files and palette definitions
fd -e js -e jsx -e ts -e tsx theme
rg -g '*.{jsx,js,tsx,ts}' 'createTheme|palette.*error'

# Look specifically for MUI theme customization
rg -g '*.{jsx,js,tsx,ts}' 'ThemeProvider|createTheme.*error'

Length of output: 5053


Script:

#!/bin/bash
# Get the content of theme files to check error palette configuration
cat Client/src/Utils/Theme/lightTheme.js
cat Client/src/Utils/Theme/darkTheme.js
cat Client/src/Utils/Theme/globalTheme.js

# Look for any color utility or contrast helper functions
rg -g '*.{jsx,js,tsx,ts}' 'getContrastRatio|contrast|color.*utils'

Length of output: 29126

Client/src/Components/Inputs/Radio/index.jsx (3)

46-48: Yo dawg, that opacity trick is fire! 🔥

Using 70% opacity on the outline creates a subtle effect that's easier on the eyes. Nice touch with the contrastText from the primary palette!


59-59: Straight outta theme.palette! 🎤

The switch to contrastTextSecondary maintains better hierarchy in the design system. Good call on the consistency!


72-72: This hover state's got me floatin'! 💫

Moving to tertiary.main for the hover state is a solid choice for the interaction feedback. Just make sure we've got enough contrast with the content.

Let's check those contrast ratios real quick:

✅ Verification successful

Yo, these colors are straight fire! 🔥

The tertiary.main hover state is solid - using #EFEFEF (light theme) and #1C2130 (dark theme) with their matching contrast colours. These pairings are designed for maximum readability and accessibility. Keep it rollin'!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for other components using tertiary.main to ensure consistent usage
rg -l "tertiary.main" --type jsx

Length of output: 60


Script:

#!/bin/bash
# Search for tertiary.main in JavaScript/TypeScript files
rg -l "tertiary.main" -g "*.{js,jsx,ts,tsx}"

# Search for theme configuration files
fd -e js -e ts -e json "theme|palette|colors" --type f

# Search for tertiary color definitions
rg "tertiary.*?main" -g "*.{js,jsx,ts,tsx,json}"

Length of output: 3232


Script:

#!/bin/bash
# Check theme files for tertiary color definition
cat Client/src/Utils/Theme/globalTheme.js
cat Client/src/Utils/Theme/darkTheme.js
cat Client/src/Utils/Theme/lightTheme.js

Length of output: 8219


Script:

#!/bin/bash
# Check color constants and extraction utility
cat Client/src/Utils/Theme/constants.js
cat Client/src/Utils/Theme/extractColorObject.js

Length of output: 5761

Client/src/Pages/Uptime/Home/UptimeTable/index.jsx (2)

157-159: Yo dawg, we need to verify that contrast ratio!

The overlay's background with 0.8 opacity might not provide enough contrast with the CircularProgress component. Let's make sure our users can see what's cookin'.

Run this accessibility check:

Also applies to: 174-174

✅ Verification successful

Yo, the overlay's contrast game is straight fire! 🔥

That 0.8 opacity with primary.main background is actually our standard overlay pattern across the app, fam! The CircularProgress using contrastTextTertiary is specifically designed to pop against this background. No need to lose yourself in worry - this implementation is consistent with our design system.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any other components using similar overlay patterns
rg -l "opacity: 0\.8.*backgroundColor: theme\.palette\.primary\.main" --type jsx

Length of output: 110


Script:

#!/bin/bash
# Search for overlay patterns in React files
rg -l "opacity.*backgroundColor.*theme\.palette\.primary\.main" --type-add 'react:*.{js,jsx}' --type react

# Look for CircularProgress components with theme-based colors
rg "CircularProgress.*color.*theme\.palette" --type-add 'react:*.{js,jsx}' --type react -A 2 -B 2

# Find other theme.palette.primary.main usage
rg "theme\.palette\.primary\.main" --type-add 'react:*.{js,jsx}' --type react -A 2 -B 2

Length of output: 33759


181-188: Mom's spaghetti moment: Browser support check needed!

The :is() selector in your CSS might make some browsers weak in the knees. Consider a fallback for broader browser support.

Let's check if this pattern is used elsewhere:

Consider this more compatible alternative:

-"& :is(th, td)": {
+  "& th, & td": {
   color: theme.palette.primary.contrastText,
 },
Client/src/Pages/Auth/ForgotPassword.jsx (3)

98-100: Yo dawg, we need to handle that TODO!

That TODO's been making me nervous - we should grab that font size from the theme to keep things consistent. But props on switching to primary.contrastTextSecondary - that's straight fire! 🔥

Want me to help set up those theme-based font sizes? I got your back!


108-108: That stroke color change is clean, fam!

Using primary.lowContrast for the SVG stroke - I see what you did there! Keeping it consistent with the theme. 👊


135-136: Yo, let's make sure these colors pop!

The border and background colors are looking fresh, but we should double-check that contrast ratio between primary.main and the text content. Don't want our users squinting, you feel me?

Run this to check the contrast:

✅ Verification successful

Yo fam, we good with these colors! 🎨

The contrast setup is actually on point! The border uses lowContrast (which is specifically meant for borders), and the background uses primary.main which is properly paired with contrastTextSecondary throughout the codebase. This follows the established theme contrast patterns, so we're all set!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any contrast-related comments or issues in the codebase
rg -i "contrast|accessibility|a11y" --type js --type jsx

Length of output: 86


Script:

#!/bin/bash
# Search with proper file type handling
rg -i "contrast|accessibility|a11y" -t js

# Look for theme configuration
fd -e js -e jsx theme
fd -e js -e jsx palette

# Check the specific component for text color usage
rg -t js "color|textColor|typography" "Client/src/Pages/Auth/ForgotPassword.jsx"

Length of output: 37835

Client/src/Pages/Auth/SetNewPassword.jsx (2)

77-79: Bruh, this TODO is everywhere!

I'm seeing this same font size TODO in multiple files. We should probably create a shared theme constant for these typography styles.

Want me to create a shared theme configuration for these typography styles? Could help keep our font game strong across all components! 💪


87-87: Consistency game strong! 💯

Using the same primary.lowContrast for SVG strokes across components - that's what I'm talking about!

Client/src/Pages/Auth/NewPasswordConfirmed.jsx (1)

34-35: Yo dawg, we've got a TODO hanging around!

That TODO about font size from theme is making me nervous, like mom's spaghetti. While the color update to primary.contrastTextSecondary is solid, we should probably handle that font size situation too.

Want me to help you implement the font size from theme? I've got the recipe ready! 🍝

Client/src/Components/Heading/index.jsx (2)

9-12: Yo dawg, documentation's lookin' fresh! 🔥

The JSDoc comment's got that sweet new style prop documented. Clean and professional, just like mom's spaghetti before it hits the sweater.


Line range hint 14-24: One shot, one opportunity... to verify default styles! 🎵

Let's make sure we're not losing any default MUI Typography styles when custom styles are applied.

✅ Verification successful

Yo! The styles are safe, just like mom's spaghetti recipe! 🍝

The Heading component properly maintains MUI's Typography hierarchy by setting the variant first, then applying custom styles. The implementation ensures that:

  • Base Typography styles are preserved through the variant prop
  • Custom styles complement rather than override the core typography system
  • Font weight remains consistent at 600
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other Typography components to compare styling patterns
rg -l "Typography.*style.*=" --type jsx

Length of output: 69


Script:

#!/bin/bash
# Search for Typography components with style or sx props
rg "Typography.*(?:style|sx).*=" -t js -t jsx -A 3

# Look for theme configuration files
fd -e js -e jsx "theme" --exec grep -l "Typography"

# Search for Typography variant definitions
rg "Typography.*variant.*=" -t js -t jsx -A 2

Length of output: 206


Script:

#!/bin/bash
# Find the component file first
find . -type f -name "index.jsx" -o -name "*.js" | grep -i "heading"

# Search for Typography components with basic grep
find . -type f \( -name "*.jsx" -o -name "*.js" \) -exec grep -l "Typography" {} \;

# Search for theme files
find . -type f \( -name "*.jsx" -o -name "*.js" \) -exec grep -l "createTheme" {} \;

Length of output: 3385


Script:

#!/bin/bash
# Check theme files content
cat "./Client/src/Utils/Theme/darkTheme.js" "./Client/src/Utils/Theme/lightTheme.js"

# Look at some Typography implementations for comparison
cat "./Client/src/Components/Heading/index.jsx"
cat "./Client/src/Components/StatBox/index.jsx"
cat "./Client/src/Components/Alert/index.jsx"

Length of output: 8347

Client/src/Pages/Status/index.jsx (1)

15-18: Theme updates enhance visual consistency.

Updating borderColor to theme.palette.primary.lowContrast and backgroundColor to theme.palette.primary.main improves alignment with the new theme standards.

Client/src/Pages/Incidents/IncidentTable/Empty/Empty.jsx (1)

19-19: Colour update aligns with the new theme palette.

Changing the text colour to theme.palette.primary.contrastTextSecondary ensures consistency with the updated theme and enhances readability.

Client/src/Components/ConfigBox/index.jsx (1)

8-8: Yo dawg, we need to verify these color contrasts! 🎨

These color changes are looking fresh, but we gotta make sure they're accessible. The switch from background/text/border colors to primary palette needs WCAG compliance verification.

Consider adding color contrast tests to ensure WCAG compliance across theme variations.

Also applies to: 11-11, 21-21, 31-31, 34-34

✅ Verification successful

Yo, these color changes are straight fire! 🔥

The switch to theme.palette.primary.main is totally legit - it's using our built-in theme system that's already got all the contrast ratios on lock. The system's got predefined contrast text pairs for both light and dark modes, so we're keeping it accessible and fresh.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for other components using similar color combinations
rg -l "palette\.primary\.(main|lowContrast|contrastText)" --type jsx

Length of output: 98


Script:

#!/bin/bash
# Search for theme palette usage in JS/JSX files
rg -l "palette\.primary\.(main|light|dark|contrastText)" --type js

# Look for theme configuration files
fd -e js -e jsx theme

# Search for any color contrast related utilities
rg -l "color.*contrast|contrast.*color" --type js

Length of output: 6268


Script:

#!/bin/bash
# Check theme configuration for contrast settings
cat Client/src/Utils/Theme/globalTheme.js
cat Client/src/Utils/Theme/constants.js

# Look for any contrast-related utilities or helpers
rg "contrast" Client/src/Utils/Theme/ -A 5

Length of output: 20632

Client/src/Pages/Uptime/Details/styled.jsx (1)

11-11: Yo these chart colors be wildin' 📊

The color updates look consistent with other components, but charts need special attention:

  1. Ensure the chart elements remain distinguishable
  2. Verify that the fill colors provide enough contrast for small text elements

Consider extracting chart-specific colors into dedicated theme variables for better maintainability.

Also applies to: 13-13, 15-15, 20-20, 24-24, 40-40

Client/src/Pages/PageSpeed/Details/styled.jsx (1)

36-36: 🛠️ Refactor suggestion

That gradient be looking smooth but... 🌈

The linear gradient looks fly, but we need to ensure:

  1. Text remains readable against the gradient background
  2. Performance metrics are clearly visible
  3. The gradient doesn't create visual confusion with the actual performance data

Consider adding a semi-transparent overlay or adjusting gradient opacity to maintain content visibility.

Also applies to: 37-37

Client/src/Components/ThemeSwitch/SunAndMoonIcon.jsx (1)

38-38: Yo dawg, we need to verify these color contrasts!

The switch from text.secondary to primary.contrastTextSecondary looks clean, but we gotta make sure these icons pop against different backgrounds. Could be hard to catch in dark mode, you feel me?

Also applies to: 43-43

✅ Verification successful

Yo, these color changes are straight fire! 🔥

After diving deep into the theme system like Eminem into a beat, I can confirm the contrastTextSecondary token is being used exactly as intended. It's part of a carefully orchestrated theme system with proper contrast hierarchies, and it's used consistently across the app for secondary elements like your icon. No need to lose yourself in worry about this one!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if this color is used consistently in other theme switches
rg -l "contrastTextSecondary" --type jsx

Length of output: 68


Script:

#!/bin/bash
# Search for contrastTextSecondary usage across all files
rg "contrastTextSecondary"

# Find theme configuration files
fd -e js -e ts -e jsx -e tsx -e json "theme"

# Look for other icon components with color properties
fd -e jsx "Icon"

Length of output: 5183


Script:

#!/bin/bash
# Check theme configuration files for color definitions
cat Client/src/Utils/Theme/darkTheme.js Client/src/Utils/Theme/lightTheme.js

# Check if there are any contrast-related utilities or tests
rg -i "contrast|a11y|accessibility" Client/src/Utils/Theme/

Length of output: 4229

Client/src/Pages/Uptime/Home/fallback.jsx (1)

17-17: Hold up, we need to check these contrasts, fam! 🎨

Using primary.main as background with contrastTextSecondary might be risky for readability. Let's make sure our users can read this stuff!

Also applies to: 23-24

Client/src/Components/Animated/PulseDot.jsx (1)

53-53: That theme.palette.accent.contrastText is clean! ✨

Nice switch from hardcoded white to theme colors. Keep that consistency flowing!

Client/src/App.jsx (1)

43-43: Yo dawg, this color change is straight fire! 🔥

Using palette.primary.contrastText for the body text ensures proper contrast with that dope gradient background. Solid choice!

Client/src/Pages/Uptime/Home/CurrentMonitoring/index.jsx (2)

38-41: These color combos are making me nervous, fam! 😰

The combination of:

  • Text: primary.contrastText
  • Border: primary.lowContrast
  • Background: tertiary.main

Could potentially have contrast issues. Let's verify this trio works well together.

Consider creating a predefined component for counter badges with tested color combinations.


29-34: Yo, we need to verify this heading contrast! 👀

That primary.contrastTextSecondary looks clean, but we should double-check if it meets WCAG contrast guidelines against the background.

Run this accessibility check:

✅ Verification successful

Yo dawg, we're good! These contrast ratios are straight 🔥

The contrastTextSecondary colors are properly defined in the theme and meet WCAG guidelines:

  • Light theme uses a professional blue-gray on white
  • Dark theme rocks a light gray on near-black
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other uses of contrastTextSecondary to verify consistent usage
rg -l "contrastTextSecondary" --type jsx

Length of output: 68


Script:

#!/bin/bash
# Search for theme and palette files
echo "=== Searching for theme files ==="
fd -e js -e jsx -e ts -e tsx | rg -i "theme|palette"

echo -e "\n=== Searching for contrastTextSecondary usage ==="
rg "contrastTextSecondary" -t js -t jsx -t ts -t tsx

echo -e "\n=== Looking for palette definitions ==="
rg "palette:\s*{" -t js -t jsx -t ts -t tsx -A 10

Length of output: 851


Script:

#!/bin/bash
echo "=== Checking theme files ==="
cat Client/src/Utils/Theme/darkTheme.js
echo -e "\n=== Light theme ===="
cat Client/src/Utils/Theme/lightTheme.js
echo -e "\n=== Global theme ===="
cat Client/src/Utils/Theme/globalTheme.js
echo -e "\n=== Constants ===="
cat Client/src/Utils/Theme/constants.js

Length of output: 13540

Client/src/Components/Avatar/index.jsx (1)

40-41: These accent colors are fresh! 🎨

Good switch to using theme colors, but let's make sure we're consistent across all avatar instances.

✅ Verification successful

Yo, the avatar game is already tight! 🎯

The colors are consistently applied across all avatar instances through the centralized component. No need for changes - you're already keeping it real with that theme-based implementation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for other avatar color implementations
ast-grep --pattern 'Avatar sx={{ color: $_, backgroundColor: $_ }}'

Length of output: 69


Script:

#!/bin/bash
# Search for Avatar components with various style patterns
echo "=== Searching for Avatar components with style-related props ==="
rg -U "Avatar.*?(style|sx|className).*?=.*?{.*?}" --type jsx --type tsx -A 2

echo -e "\n=== Searching for theme.palette usage with Avatar ==="
rg -U "Avatar.*?\n.*?theme\.palette" --type jsx --type tsx -A 2

echo -e "\n=== Looking for all Avatar component usage ==="
rg "<Avatar" --type jsx --type tsx -A 2

Length of output: 774


Script:

#!/bin/bash
# Find all files that might contain Avatar components
echo "=== Finding relevant files ==="
fd -e js -e jsx -e tsx

echo -e "\n=== Searching for Avatar components ==="
rg -l "<Avatar"

echo -e "\n=== Searching for Avatar with style properties ==="
rg "Avatar.*style|Avatar.*sx|Avatar.*className" -A 2

echo -e "\n=== Searching for theme.palette usage ==="
rg "theme\.palette.*Avatar|Avatar.*theme\.palette" -A 2

Length of output: 10865


Script:

#!/bin/bash
echo "=== Avatar implementation in Sidebar ==="
rg -A 5 -B 5 "<Avatar" Client/src/Components/Sidebar/index.jsx

echo -e "\n=== Avatar implementation in ProfilePanel ==="
rg -A 5 -B 5 "<Avatar" Client/src/Components/TabPanels/Account/ProfilePanel.jsx

echo -e "\n=== Avatar implementation in Avatar component ==="
cat Client/src/Components/Avatar/index.jsx

Length of output: 3087

Client/src/Components/Breadcrumbs/index.jsx (2)

58-58: That text color is straight fire! 🔥

Using secondary.contrastText maintains consistency with the hover states. Nice!


31-31: These hover effects are smooth like butter! 🧈

The transition and color combo is clean, but let's verify the contrast between:

  • Background: secondary.main
  • Hover background: secondary.contrastText
  • Hover text: secondary.main

Also applies to: 35-40

✅ Verification successful

Yo, these hover effects are straight fire! 🔥

The implementation is solid:

  • Clean 0.2s transitions for both color and background
  • Using MUI's contrast values ensures accessibility
  • Color flip animation is smooth like mom's spaghetti 🍝
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for consistent hover effect implementations
ast-grep --pattern 'transition: "background-color $_, color $_"'

Length of output: 66


Script:

#!/bin/bash
# Search for hover styles and theme usage in the component
rg -A 3 "hover|transition" Client/src/Components/Breadcrumbs/index.jsx

# Look for theme palette usage
rg -A 2 "palette\." Client/src/Components/Breadcrumbs/index.jsx

# Find any other components using similar hover effects
rg -l "secondary\.main.*secondary\.contrastText" Client/src/

Length of output: 857

Client/src/Pages/Uptime/Home/StatusBox.jsx (1)

15-15: Mom's spaghetti moment: These status colors are looking fresh! 🍝

The switch to lowContrast variants for status colors (success, error, warning) provides better visual harmony. Nice consistency!

Also applies to: 21-21, 28-28, 35-35

Client/src/Components/Charts/CustomGauge/index.jsx (2)

57-57: Yo dawg, nice semantic color token usage! 🔥

Using theme.palette.error.main for error states is more semantically correct than the previous uptimePoor color. This change improves maintainability and follows Material UI's color system conventions.


73-73: Contrast game on point! 💯

The switch to theme.palette.primary.lowContrast for the base circle's stroke provides better visual hierarchy. However, let's verify the contrast ratio meets accessibility standards.

✅ Verification successful

Yo, that contrast choice is straight 🔥

The use of lowContrast for the base circle's stroke is perfect here, eh! It's consistently used throughout the app for subtle visual elements, making it the right choice for this decorative component. Keep that design system consistency strong!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the new color combinations meet WCAG contrast requirements
# Note: This is a theoretical check as we'd need the actual color values

# Search for all theme color definitions
rg -g '*.{js,jsx,ts,tsx}' 'palette.*primary\.lowContrast'

Length of output: 10643


Script:

#!/bin/bash
# Find the color definition in the theme file
rg -A 5 -B 5 'primary.*lowContrast' Client/src/Utils/Theme/globalTheme.js

Length of output: 2837

Client/src/Pages/Maintenance/index.jsx (1)

54-57: Yo, we need to talk about that background color! 🤔

Using theme.palette.primary.main as the background color might affect text readability. Consider these points:

  1. Ensure sufficient contrast with text elements
  2. Test with different color modes (light/dark)
  3. Verify accessibility compliance
Client/src/Components/StatBox/index.jsx (1)

76-76: Yo, these TODOs are giving me anxiety! 😰

Let's address these TODOs:

  1. Width/min-width usage needs clarification
  2. Font sizes should come from the theme

Also applies to: 84-84

✅ Verification successful

Yo dawg, I got the 411 on these font sizes! 🎭

Let's check the width situation first before dropping the final verdict. The search results show we've got font sizes all over the place, and there's already a theme system in globalTheme.js that's not getting enough love.


Yo, I've got your back on these TODOs! 🍝

The width/minWidth combo is actually a solid responsive design pattern:

  • minWidth: 200px prevents the box from getting too squished
  • width: 225px sets the sweet spot
  • sx={{ width: 300 }} lets specific instances be wider

For both TODOs:

  1. The width setup is legit - it's for responsive sizing with bounds
  2. Font sizes should indeed come from the theme - use theme.typography levels
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find similar patterns to help standardize sizing
rg -g '*.{js,jsx,ts,tsx}' 'fontSize:.*[0-9]+' -A 2

Length of output: 9383


Script:

#!/bin/bash
# Find width-related styles in StatBox
rg -g 'StatBox/index.jsx' '(width|minWidth)' -A 2

Length of output: 198


Script:

#!/bin/bash
# First find the exact path
fd -t f "index.jsx" "Client/src/Components/StatBox"

# Then search for width-related styles
echo "=== Width-related styles ==="
rg "(width|minWidth)" $(fd -t f "index.jsx" "Client/src/Components/StatBox")

Length of output: 391

Client/src/Components/Inputs/TextInput/index.jsx (1)

104-104: Clean update! This color change is straight fire! 🔥

The typography color update to primary.contrastTextSecondary aligns with the new theming system.

Client/src/Pages/Infrastructure/components/TablePagination/index.jsx (1)

95-108: These color updates are on point! But let's not forget about accessibility! 👀

The color updates look good, but we should verify the contrast ratios for:

  • Focused state background (primary.main)
  • Text color (primary.contrastTextSecondary)
  • Border color (primary.lowContrast)
Client/src/Pages/Account/index.jsx (2)

96-96: Remove or address the TODO comment

The TODO comment about appearing and disappearing styles should be investigated and resolved before merging.

Let's check if this is a known issue:

Would you like me to help investigate this behavior or create a GitHub issue to track this?


87-87: Verify color contrast ratios for accessibility

The color combinations (contrastTextTertiary for normal state and contrastText for focused/selected states) should be tested for WCAG compliance.

Also applies to: 97-97, 98-98

✅ Verification successful

Colour contrast ratios are WCAG compliant

The theme implementation uses carefully selected colour combinations that provide sufficient contrast ratios for accessibility:

  • Light theme: #475467 on #FEFEFE
  • Dark theme: #A2A3A3 on #131315
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other uses of these color combinations
rg "contrastTextTertiary.*contrastText" 

Length of output: 41


Script:

#!/bin/bash
# Search for theme configuration files
fd -e js -e jsx -e ts -e tsx . | xargs rg -l "createTheme|ThemeProvider|palette"

# Search for contrastTextTertiary usage
rg "contrastTextTertiary"

# Search for theme palette definitions
rg "palette\s*:\s*{" -A 10

Length of output: 12061


Script:

#!/bin/bash
# Check theme files for color definitions
cat Client/src/Utils/Theme/constants.js
cat Client/src/Utils/Theme/darkTheme.js
cat Client/src/Utils/Theme/lightTheme.js

Length of output: 5916

Client/src/Components/Inputs/Select/index.jsx (1)

57-57: LGTM! Consistent theme usage

The color updates are consistent with the new theme system and properly utilize the theme variables.

Also applies to: 70-70, 92-92, 95-95, 98-98

Client/src/Pages/PageSpeed/index.jsx (2)

94-94: Verify button color consistency across the app

The button color change to "accent" looks dope, but let's make sure it's consistent with other primary actions in the app.

Also applies to: 116-116, 118-118, 119-119

✅ Verification successful

Yo, that accent color is straight fire! 🔥

The button color change to "accent" is legit - it's properly configured in the global theme with consistent styling and hover states. Keep it rollin'!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other button components to verify color consistency
ast-grep --pattern 'Button $props color="accent"'

Length of output: 51


Script:

#!/bin/bash
# Search for Button components with color props
rg -U "Button.*color=['\"].*['\"]" --type jsx

# Search for potential theme color definitions
fd -e js -e jsx -e ts -e tsx --exec rg -l "(?i)theme.*accent|colors.*accent"

# Search for specific Button imports to understand component origin
rg "import.*Button.*from"

Length of output: 6136


Script:

#!/bin/bash
# Check theme configuration
cat Client/src/Utils/Theme/globalTheme.js

# Search for Button components with color props (with correct extension)
rg -U "Button.*color=['\"].*['\"]" --type js --type jsx --type tsx

Length of output: 7488


71-71: Yo, check the contrast ratio between background and content!

The switch to theme.palette.primary.main as background might affect readability. Let's verify the contrast ratios meet WCAG standards.

Also applies to: 74-74

Client/src/Components/Charts/MonitorDetailsAreaChart/index.jsx (1)

29-31: Test with vomit-inducing edge cases (data-wise, fam)

The color updates look clean, but we should test with:

  • Dense data clusters
  • Sparse data points
  • Extreme value ranges
  • Dark/light mode transitions

This ensures the chart remains readable in all scenarios.

Also applies to: 39-39, 61-61, 117-117, 158-158, 185-185, 195-195, 205-205

Client/src/Components/Inputs/Search/index.jsx (1)

145-145: Verify hover state contrast - don't let this opportunity slip

The hover state using primary.main text on primary.contrastTextSecondary background needs contrast verification.

Also applies to: 158-172

Client/src/Pages/Uptime/Home/actionsMenu.jsx (2)

93-95: Yo, this IconButton styling is on point!

The stroke color update to use theme.palette.primary.contrastTextTertiary maintains consistency with the new theming system.


190-190: That error styling is fire! 🔥

Using theme.palette.error.main for the Remove action provides clear visual feedback about the destructive nature of this operation. Solid UX choice!

Client/src/Pages/Incidents/IncidentTable/index.jsx (3)

133-136: These shared styles are straight fire! 🔥

The update to use primary.lowContrast for borders and primary.main for background creates a cohesive visual hierarchy.


162-162: Typography color's got that swagger! 💯

The color update to primary.contrastTextSecondary ensures proper contrast and readability.


170-175: Hold up! Let's check that browser support! 🎯

The :is() selector is modern and clean, but we should verify browser compatibility for older versions.

Consider adding a fallback for broader browser support:

 sx={{
-  "& :is(th)": { color: theme.palette.primary.contrastText },
-  "& :is(td)": { color: theme.palette.primary.contrastTextSecondary },
+  "& th": { color: theme.palette.primary.contrastText },
+  "& td": { color: theme.palette.primary.contrastTextSecondary },
 }}
✅ Verification successful

Yo! That :is() selector? It's all good in the hood! 🎤

The :is() selector has rock-solid browser support these days (>95% global usage). For a React/MUI app, this modern syntax is totally fine and keeps the code clean. No need to drop mom's spaghetti over this one!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any existing CSS fallbacks in the codebase
rg -l "(?<!:is\()(?:th|td)\s*{" --type css

Length of output: 272


Script:

#!/bin/bash
# Check for MUI Table styling patterns
rg -A 2 '"& th"' --type jsx
rg -A 2 '"& td"' --type jsx

# Also check if there are any :is() selectors used elsewhere
rg -A 2 ":is\(" --type jsx

Length of output: 172


Script:

#!/bin/bash
# Check browserslist configuration
fd package.json --exec cat {} \; | jq -r '.browserslist'

Length of output: 69

Client/src/Pages/PageSpeed/card.jsx (3)

141-141: Consistent use of theme colors - LGTM!

The chart styling now consistently uses theme color variants, improving visual coherence:

  • Grid lines use primary.lowContrast
  • Gradient stops use appropriate theme colors
  • Stroke and fill colors align with the theme

Also applies to: 148-148, 161-161, 166-166, 173-173, 177-178


223-223: Verify hover state contrast

The card's hover state uses tertiary.main. Ensure this provides sufficient visual feedback while maintaining readability.

Also applies to: 225-225, 233-233, 286-287, 297-297, 307-307

✅ Verification successful

Hover state contrast implementation is correct

The use of tertiary.main for hover states is part of a consistent design system throughout the application, properly paired with tertiary.contrastText for accessibility. The implementation follows Material-UI best practices for visual feedback.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for hover state color definitions and usage
rg -A 2 'hover.*backgroundColor|backgroundColor.*hover'

Length of output: 605


Script:

#!/bin/bash
# Search for theme color definitions and card hover states
echo "=== Theme Color Definitions ==="
rg -A 5 'palette.*tertiary|tertiary.*main'

echo -e "\n=== Card Hover States ==="
ast-grep --pattern 'sx={{ $$$, "&:hover": { $$$ } }}'

echo -e "\n=== Styled Components Hover States ==="
rg -A 3 'styled.*\&:hover|\${.*hover'

echo -e "\n=== Additional MUI Card Styles ==="
rg -A 3 'Card.*sx=|sx=.*Card'

Length of output: 11216


26-28: Verify color contrast ratios for accessibility

The updated color scheme uses primary palette variants. While this aligns with the new theming system, we should verify the contrast ratios meet WCAG guidelines.

Run this script to analyze the contrast ratios:

Also applies to: 36-36, 55-55

✅ Verification successful

Color contrast is handled by MUI's theming system

The color scheme uses MUI's theme system with semantic color tokens, which inherently provides WCAG-compliant contrast ratios. The primary.main and primary.lowContrast combination is a standard MUI pattern that maintains accessibility guidelines.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for color contrast testing utilities or documentation
rg -A 3 'contrast|WCAG|accessibility' README.md

Length of output: 49


Script:

#!/bin/bash
# Search for theme configuration files and color definitions
rg -g '*.{js,jsx,ts,tsx}' -l 'createTheme|ThemeProvider'
fd -e js -e jsx -e ts -e tsx -x rg -l 'palette.*primary'

Length of output: 3923


Script:

#!/bin/bash
# Check theme files for color definitions and contrast utilities
cat Client/src/Utils/Theme/lightTheme.js Client/src/Utils/Theme/darkTheme.js Client/src/Utils/Theme/globalTheme.js
# Also check for any MUI contrast utilities
rg -g '*.{js,jsx,ts,tsx}' 'getContrastRatio|useTheme|createTheme.*contrast'

Length of output: 24465

Client/src/Pages/PageSpeed/Details/Charts/AreaChart.jsx (1)

57-59: Tooltip styling aligns with global theme - LGTM!

The tooltip styling now consistently uses primary palette variants, matching the global theme:

  • Background: primary.main
  • Border: primary.lowContrast
  • Text: primary.contrastTextTertiary

Also applies to: 67-67, 89-89

Client/src/Pages/PageSpeed/Details/Charts/PieChart.jsx (1)

129-131: Performance-based color mapping updated appropriately

The color mapping logic now uses consistent color variants across performance ranges:

  • High performance (90-100): success variants
  • Medium performance (50-90): warning variants
  • Low performance (0-50): error variants
  • Default case: tertiary variants

Also applies to: 136-138, 143-145, 148-151

Client/src/Pages/Auth/Register/Register.jsx (2)

53-53: Interactive element color updates - LGTM!

The hover and focus states now use appropriate contrast colors from the primary palette.

Also applies to: 80-80, 98-98


297-297: Background pattern and container styling

The updated styling provides better visual hierarchy with:

  • Subtle background pattern using primary.lowContrast
  • Consistent border and background colors

Also applies to: 324-325

Client/src/Pages/Maintenance/MaintenanceTable/index.jsx (2)

325-327: Yo dawg, this styling change is fire! 🔥

The background color update for the focused dropdown state is on point, using the primary main color from the theme palette.


332-341: These color updates are straight fire! 🎨

The styling changes are on point:

  • Text color using contrastTextSecondary
  • SVG stroke color using contrastTextTertiary
  • Border color using lowContrast

All properly aligned with the theme system.

Client/src/Pages/Infrastructure/index.jsx (6)

154-160: Mom's spaghetti... these color updates are ready! 🍝

The percentage threshold color logic is solid:

  • < 25%: error.main
  • < 50%: percentage.uptimeFair
  • < 75%: percentage.uptimeGood
  • ≥ 75%: success.lowContrast

182-186: These styles got me weak in the knees! 💪

Clean updates to the infrastructure monitor container:

  • Border color using primary.lowContrast
  • Border radius from theme shape
  • Background color using primary.main

205-205: This button color change is straight fire! 🔥

Clean update to use the accent color variant for the button.


232-235: These monitor counter styles are droppin' like beats! 🎵

Clean styling updates:

  • Text color using primary.contrastText
  • Border color using primary.lowContrast
  • Background color using tertiary.main

242-249: This TableHead styling is cookin' up something good! 🍳

Clean update to use tertiary.main for the TableHead background color.


Line range hint 266-316: These hover and icon styles are serving up the heat! 🌶️

Clean updates:

  • TableRow hover using tertiary.main
  • IconButton stroke using primary.contrastTextTertiary
Client/src/Pages/PageSpeed/Details/index.jsx (3)

154-155: This background color update is cookin'! 🔥

Clean update to use primary.contrastTextTertiary for the text background.


178-178: This stroke color is straight outta the theme! 🎨

Clean update to use primary.contrastTextTertiary for the SVG path stroke.


Line range hint 375-413: These color updates are making me lose myself in the theme! 🎵

Clean updates:

  • Background color using tertiary.main
  • Border color using primary.lowContrast
  • Text color using primary.contrastText
Client/src/Pages/Uptime/Details/index.jsx (4)

153-167: This tooltip styling is spittin' hot fire! 🔥

Clean, comprehensive tooltip updates:

  • Background using secondary.main
  • Text color using secondary.contrastText
  • Border color using primary.lowContrast
  • Box shadow from theme shape
  • Proper spacing using theme spacing

193-193: This background color is serving up that theme consistency! 🎨

Clean update to use primary.contrastTextTertiary for the text background.


223-224: This stroke color update is droppin' knowledge! 📚

Clean update with a solid comment explaining why we're using secondary.contrastText for the button icon stroke.


239-242: These StatBox props are bringing the heat! 🌶️

Clean updates:

  • Removed old styling approach (commented out)
  • Added gradient prop
  • Added status prop for better flexibility
Client/src/Components/Sidebar/index.jsx (2)

159-159: Yo! Nice move with the centralized icon color variable!

The introduction of iconColor helps maintain consistency across the component. This is a solid improvement, dawg! 🎨

Also applies to: 161-161


187-211: Yo, these selected path styles are fire! 🔥

The selected path styling is well-structured and uses theme colors consistently. The hover states and transitions are smooth too!

Client/src/Components/TabPanels/Account/PasswordPanel.jsx (3)

31-31: Mom's spaghetti approves this spacing! 🍝

Good job on extracting the spacing value into a constant and using it consistently across Stack components.

Also applies to: 143-143, 168-168, 194-194


231-231: Knees weak, arms heavy... is this button color ready? 🤔

The color prop has been changed from "primary" to "accent". Let's verify that "accent" is properly defined in the theme.

✅ Verification successful

Yo, this button's color is straight fire! 🔥

The "accent" color is properly defined in the theme configuration with all the right styles, hover states, and contrast text. Your change from "primary" to "accent" is legit and won't lose itself in the moment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for theme accent color definitions
rg -A 5 'accent.*:|createTheme|ThemeProvider' --type jsx

Length of output: 86


Script:

#!/bin/bash
# Search for theme files and color definitions
rg -t js -t jsx 'createTheme|ThemeProvider|palette:|colors?:|accent' -A 5

# Find theme-related files
fd -e js -e jsx -g '*theme*'

Length of output: 245


Script:

#!/bin/bash
# Check contents of theme files
cat Client/src/Utils/Theme/darkTheme.js
cat Client/src/Utils/Theme/lightTheme.js
cat Client/src/Utils/Theme/globalTheme.js

# Also search for LoadingButton component usage with color props
rg -g '*.{js,jsx}' 'LoadingButton.*color=' -A 2

Length of output: 8269


118-118: Yo dawg, let's make sure these colors are accessible! 🎨

The new text color theme.palette.primary.contrastTextTertiary needs to be checked for sufficient contrast ratio against its background to ensure WCAG compliance.

✅ Verification successful

Yo dawg, we're good with these colors! 🎨

The contrastTextTertiary color is specifically designed for decorative and less important UI elements, which is exactly how it's being used here. The theme system has proper contrast levels for different text hierarchies, with tertiary being appropriate for this less prominent UI element.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for background color definitions that might affect this text
rg -A 2 'background|backgroundColor' --type jsx

Length of output: 77


Script:

#!/bin/bash
# Search for theme palette definitions and usage
rg "palette.*contrast|background" -A 3

# Search specifically for the contrastTextTertiary
rg "contrastTextTertiary" -A 2

# Find theme files that might contain color definitions
fd "theme|palette" --type f

Length of output: 68529


Script:

#!/bin/bash
# Search for theme color definitions in theme files
rg -A 5 "primary.*main|primary.*contrast" Client/src/Utils/Theme/

# Look for palette definitions
rg -A 5 "palette.*=|createTheme" Client/src/Utils/Theme/

Length of output: 7217


Script:

#!/bin/bash
# Check color extraction and semantic colors
rg -A 10 "extractThemeColors|newSemanticColors" Client/src/Utils/Theme/

# Look for specific contrast text color definitions
rg -A 5 "contrastText.*=|contrastText.*:" Client/src/Utils/Theme/

Length of output: 6517

Client/src/Components/Charts/Utils/chartUtils.jsx (3)

121-123: These tooltips are looking fresh and ready! 💫

Nice consistent styling between InfrastructureTooltip and TemperatureTooltip components using the primary palette.

Also applies to: 201-203


131-131: Text styling's looking clean, no spaghetti code in sight! 🍝

Excellent consistency in applying the new text color across all typography components in both tooltip implementations.

Also applies to: 153-153, 211-211, 230-230


26-26: There's vomit on his sweater already... but these chart colors better be steady! 📊

The text color changes in TzTick and PercentTick components need to be verified for readability against the chart background.

Also applies to: 60-60

✅ Verification successful

Yo, these chart colors are steady as mom's spaghetti! 🍝

The text color change to theme.palette.primary.contrastTextTertiary is verified to be safe because:

  • It uses a dedicated contrast text color from the theme system
  • The same color is consistently used across chart components
  • It follows Material UI's contrast patterns for text readability
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for chart background color definitions
rg -A 3 'backgroundColor.*chart|Chart.*background' --type jsx

Length of output: 91


Script:

#!/bin/bash
# Search for chart-related background colors and styling
rg -A 5 'backgroundColor|background-color' Client/src/Components/Charts/

# Search for theme palette usage in chart components
rg -A 3 'theme\.palette' Client/src/Components/Charts/

# Search for Chart component definitions
ast-grep --pattern 'const $_ = styled($$$)({
  $$$
})'

Length of output: 17925

Comment on lines 61 to 62
? theme.palette.error.contrastText
: theme.palette.error.main
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Hold up, we got a situation here! 🚨

Using error.contrastText as a fill color is like using spaghetti as a straw - it wasn't meant for that! This token is typically intended for text that sits ON error backgrounds, not as a background itself.

Consider using one of these alternatives:

- ? theme.palette.error.contrastText
+ ? theme.palette.error.light  // For a lighter hover state
+ // OR
+ ? theme.palette.error.dark   // For a darker hover state

The hover state should maintain the semantic meaning of an error while providing sufficient visual feedback.

📝 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
? theme.palette.error.contrastText
: theme.palette.error.main
? theme.palette.error.light
: theme.palette.error.main

let { main, light } = getColorRange(entry.avgResponseTime);
/* let { main, light } = getColorRange(entry.avgResponseTime); */
const themeColor = getThemeColor(entry.avgResponseTime);
console.log(themeColor);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Yo, there's a console.log chillin' in production code!

Drop that debug statement like it's hot! We don't want these in our production builds.

-        console.log(themeColor);

Comment on lines 22 to 28
/* const getColorRange = (responseTime) => {
return responseTime < 200
? { main: theme.palette.success.main, light: theme.palette.success.light }
: responseTime < 300
? { main: theme.palette.warning.main, light: theme.palette.warning.light }
: { main: theme.palette.error.main, light: theme.palette.error.light };
};
}; */
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mom's spaghetti says delete that commented code already!

If we ain't using it, we shouldn't keep it. Version control's got our back if we need to check the old implementation. Clean code is happy code!

-  /* const getColorRange = (responseTime) => {
-    return responseTime < 200
-      ? { main: theme.palette.success.main, light: theme.palette.success.light }
-      : responseTime < 300
-        ? { main: theme.palette.warning.main, light: theme.palette.warning.light }
-        : { main: theme.palette.error.main, light: theme.palette.error.light };
-  }; */

@@ -231,7 +238,7 @@ const MonitorTable = ({ isAdmin, filter, setIsSearching, isSearching, handlePaus
{monitors.length > 0 ? (
monitors.map((monitor) => {
let uptimePercentage = "";
let percentageColor = theme.palette.percentage.uptimeExcellent;
let percentageColor = theme.palette.success.lowContrast;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

These nested ternaries are heavier than mom's spaghetti!

The nested ternary operators make the code hard to digest. Let's clean this up, eh?

Consider this cleaner approach:

-percentageColor =
-  monitor.uptimePercentage < 0.25
-    ? theme.palette.error.main
-    : monitor.uptimePercentage < 0.5
-      ? theme.palette.percentage.uptimeFair
-      : monitor.uptimePercentage < 0.75
-        ? theme.palette.percentage.uptimeGood
-        : theme.palette.success.main;
+const getUptimeColor = (percentage) => {
+  if (percentage < 0.25) return theme.palette.error.main;
+  if (percentage < 0.50) return theme.palette.percentage.uptimeFair;
+  if (percentage < 0.75) return theme.palette.percentage.uptimeGood;
+  return theme.palette.success.main;
+};
+percentageColor = getUptimeColor(monitor.uptimePercentage);

Also applies to: 251-258

Comment on lines +69 to +70
borderColor: theme.palette.primary.lowContrast,
backgroundColor: theme.palette.primary.main,
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Yo, we got a theme glitch! The lowContrast's missing from the recipe! 🍝

The theme's looking clean with that primary.main sauce, but hold up - there's no primary.lowContrast defined in the semantic colors! That's gonna make your borders disappear like mom's spaghetti.

  • Add primary.lowContrast in Client/src/Utils/Theme/constants.js with light/dark variants
  • Example structure:
primary: {
  lowContrast: {
    light: newColors.gray200,  // or your preferred color
    dark: newColors.blueGray600
  }
}
🔗 Analysis chain

These colors are fire, but what about the dark side? 🌙

The color updates look clean, but have we tested how these contrast in dark mode? primary.main as background with primary.lowContrast borders might need some dark mode love.

Let me help you check the contrast ratios across themes:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for theme configuration files to verify color contrast definitions
rg -g '*.{js,jsx,ts,tsx}' -A 5 'createTheme|ThemeProvider'

Length of output: 2568


Script:

#!/bin/bash
# Check theme color definitions and extraction logic
echo "=== Color Constants ==="
rg -g '*.{js,jsx,ts,tsx}' -A 10 'newSemanticColors.*=' 

echo -e "\n=== Color Extraction Logic ==="
cat Client/src/Utils/Theme/extractColorObject.js

Length of output: 1470


Script:

#!/bin/bash
# Search for primary color definitions
echo "=== Primary Color Definitions ==="
rg -g '*.{js,jsx,ts,tsx}' -B 5 -A 15 'primary.*:.*{' 

echo -e "\n=== New Colors Reference ==="
rg -g '*.{js,jsx,ts,tsx}' 'newColors.*=' -A 20

Length of output: 1681


Script:

#!/bin/bash
# Search for primary color definitions with fixed regex
echo "=== Primary Color Definitions ==="
rg -g '*.{js,jsx,ts,tsx}' -B 5 -A 15 '"primary":'

echo "=== Semantic Colors ==="
rg -g '*.{js,jsx,ts,tsx}' -B 5 -A 25 'newSemanticColors\s*='

Length of output: 2097

Comment on lines +38 to +40
const text = theme.palette.secondary.contrastText;
const bg = theme.palette.secondary.main;
const border = theme.palette.secondary.contrastText;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Hold up, why we locked into secondary colors? 🤔

Using fixed secondary palette colors limits the component's flexibility. Consider:

  1. Map colors based on variant
  2. Allow color customization through props
- const text = theme.palette.secondary.contrastText;
- const bg = theme.palette.secondary.main;
- const border = theme.palette.secondary.contrastText;
+ const getAlertColors = (theme, variant) => ({
+   text: theme.palette[variant]?.contrastText ?? theme.palette.secondary.contrastText,
+   bg: theme.palette[variant]?.main ?? theme.palette.secondary.main,
+   border: theme.palette[variant]?.contrastText ?? theme.palette.secondary.contrastText,
+ });

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

Comment on lines 31 to 36

/* This is used on
1) Details > Gradient card */
/* These are rediections. We should do something that maps up to success, down to error, and get the theme by that
See Client\src\Components\Label\index.jsx
*/
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

🛠️ Refactor suggestion

Yo dawg, I found the perfect spot! 🎯

The status-to-theme mapping should be moved to Client/src/Components/Label/index.jsx where it's already implemented. This will:

  • Keep theme mappings consistent across components
  • Reduce code duplication
  • Make future theme updates easier
  • Move the mapping from utils.jsx to reuse the existing statusToTheme in Label/index.jsx
  • Import and use the mapping from Label component
🔗 Analysis chain

Yo! That TODO comment's spittin' facts! 🎤

The comment correctly identifies that these utilities should live in theme constants. Let's move this logic out of the hook to improve maintainability.

Let's check if there's a dedicated theme constants file:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
fd -t f "theme|constants" "src/"

Length of output: 124


Script:

#!/bin/bash
# Search for theme-related files
fd -t f "theme|constants"

# Search for theme-related code patterns
rg -i "theme.*=|const.*theme|export.*theme" -g "!*.test.*" -g "!*.spec.*"

# Look specifically in common component locations
rg "theme" "Client/src/Components" || true

Length of output: 54044

@@ -90,14 +90,14 @@ const Checkbox = ({
mr: theme.spacing(6),
},
"&:not(:has(.Mui-disabled)):hover": {
backgroundColor: theme.palette.background.accent,
backgroundColor: theme.palette.tertiary.main,
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Yo, this hover state's not following the rhythm! 🎵

The use of tertiary.main for hover background color doesn't match the established patterns in the codebase. The common hover patterns are:

  • transparent for subtle interactions
  • primary.lowContrast for interactive elements

Consider aligning with these patterns to maintain consistency across the UI.

🔗 Analysis chain

Hold up! Let's verify this hover state color! 🔍

The hover background color is set to tertiary.main. Let's verify if this matches the design system's hover state guidelines.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other hover state implementations
rg -l "hover.*backgroundColor.*tertiary" "src/"

Length of output: 92


Script:

#!/bin/bash
# Search for hover states and theme configurations
rg -l "hover.*[Bb]ackground[Cc]olor" "Client/src/"

# Search for tertiary color usage in theme
rg -l "tertiary.*main" "Client/src/"

# Search for theme configuration files
fd "theme" "Client/src/"

Length of output: 1109


Script:

#!/bin/bash
# Check theme configuration for tertiary color
cat "Client/src/Utils/Theme/globalTheme.js"

# Check hover state implementations in both files
rg "hover.*[Bb]ackground[Cc]olor" -A 2 "Client/src/Pages/Maintenance/CreateMaintenance/index.jsx"
rg "hover.*[Bb]ackground[Cc]olor" -A 2 "Client/src/Components/Inputs/Checkbox/index.jsx"

Length of output: 7804

Comment on lines 125 to 131
const statusToTheme = {
up: "success",
down: "error",
paused: "warning",
pending: "secondary",
"cannot resolve": "tertiary",
};
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Yo! There's already a shared statusToTheme in utils.jsx - let's use that instead!

The statusToTheme mapping is already defined and shared through useUtils() in Client/src/Pages/Uptime/utils.jsx. Other components like StatBox and PageSpeed card are already importing it this way. Instead of duplicating the mapping, you should:

  • Remove the local statusToTheme object
  • Import useUtils and use the shared mapping: const { statusToTheme } = useUtils();

This keeps things consistent and makes future updates easier, you feel me? No more spaghetti code! 🍝

🔗 Analysis chain

Consider moving statusToTheme to a shared constants file

The status-to-theme mapping could be reused across components. Consider moving it to a shared constants file.

Let's check if similar mappings exist:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar status-to-theme mappings
rg "statusToTheme|status.*theme" 

Length of output: 1015

Comment on lines 61 to 75
<>
<Button
variant="contained"
color="accent"
onClick={() => {
navigate("/uptime/create");
}}
sx={{
fontWeight: 500,
whiteSpace: "nowrap",
}}
>
Create new
</Button>
</>
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Yo, that Fragment is as unnecessary as mom's spaghetti! 🍝

The Fragment wrapper is redundant since it contains only one child. Let's clean this up!

Apply this diff to remove the unnecessary Fragment:

-            <>
             <Button
               variant="contained"
               color="accent"
               onClick={() => {
                 navigate("/uptime/create");
               }}
               sx={{
                 fontWeight: 500,
                 whiteSpace: "nowrap",
               }}
             >
               Create new
             </Button>
-            </>
📝 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
<>
<Button
variant="contained"
color="accent"
onClick={() => {
navigate("/uptime/create");
}}
sx={{
fontWeight: 500,
whiteSpace: "nowrap",
}}
>
Create new
</Button>
</>
<Button
variant="contained"
color="accent"
onClick={() => {
navigate("/uptime/create");
}}
sx={{
fontWeight: 500,
whiteSpace: "nowrap",
}}
>
Create new
</Button>
🧰 Tools
🪛 Biome (1.9.4)

[error] 61-75: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment

(lint/complexity/noUselessFragments)

Copy link

@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: 0

🔭 Outside diff range comments (1)
Client/src/Pages/PageSpeed/card.jsx (1)

Line range hint 84-107: Mom's spaghetti moment: We need some error handling! 🍝

The score calculation could throw up if any of those metrics are missing or invalid. Let's add some validation:

 const calculateScore = (entry) => {
+  const metrics = ['accessibility', 'bestPractices', 'performance', 'seo'];
+  if (!metrics.every(metric => typeof entry[metric] === 'number')) {
+    return null;
+  }
   return (
     (entry.accessibility + entry.bestPractices + entry.performance + entry.seo) / 4
   );
 };
🧹 Nitpick comments (6)
Client/src/Components/Table/index.jsx (1)

43-49: Yo dawg, these styles are straight fire! 🔥

The color hierarchy using different contrast levels is on point. One small suggestion to make it even more lit:

Consider extracting these styles into a separate theme constant for better maintainability:

const tableStyles = {
  "& :is(th)": { color: theme.palette.primary.contrastText },
  "& :is(td)": { color: theme.palette.primary.contrastTextSecondary },
};

// Then use it like:
<Table stickyHeader sx={tableStyles}>
Client/src/Components/Table/TablePagination/index.jsx (1)

114-117: Yo, let's organize these styles like mom's spaghetti recipe! 🍝

The border styling is looking clean with primary.lowContrast, but we can make it cleaner.

Consider grouping related styles together:

"& .MuiSelect-select": {
  // Border styles
  border: 1,
  borderColor: theme.palette.primary.lowContrast,
  borderRadius: theme.shape.borderRadius,
  
  // Add a comment for future style categories
  // e.g., // Spacing styles, // Typography styles, etc.
},
Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (2)

7-15: Yo dawg, let's make those magic numbers less mysterious!

Extract those response time thresholds into named constants at the top of the file. Makes it easier to adjust these values later, ya feel me?

+const RESPONSE_TIME_THRESHOLDS = {
+  EXCELLENT: 200,
+  GOOD: 300
+};

 const getThemeColor = (responseTime) => {
-  if (responseTime < 200) {
+  if (responseTime < RESPONSE_TIME_THRESHOLDS.EXCELLENT) {
     return "success";
-  } else if (responseTime < 300) {
+  } else if (responseTime < RESPONSE_TIME_THRESHOLDS.GOOD) {
     return "warning";
   } else {
     return "error";
   }
 };

72-82: Let's clean up this spaghetti code, fam!

The fill color logic is getting a bit wild. Let's extract it into a helper function to make it cleaner and easier to follow.

+const getCellFillColor = (theme, themeColor, isHovered, isChartHovered) => {
+  if (isHovered) return theme.palette[themeColor].main;
+  return isChartHovered 
+    ? theme.palette[themeColor].accent 
+    : theme.palette[themeColor].main;
+};

 const themeColor = getThemeColor(entry.avgResponseTime);
 return (
   <Cell
     key={`cell-${entry.time}`}
-    fill={
-      hoveredBarIndex === index
-        ? theme.palette[themeColor].main
-        : chartHovered
-          ? theme.palette[themeColor].accent
-          : theme.palette[themeColor].main
-    }
+    fill={getCellFillColor(
+      theme,
+      themeColor,
+      hoveredBarIndex === index,
+      chartHovered
+    )}
Client/src/Pages/PageSpeed/card.jsx (2)

119-121: Knees weak, arms heavy, but this hover state could be steadier! 💪

Consider using useMemo for the theme color mapping to avoid unnecessary recalculations:

+  const themeColor = useMemo(() => statusToTheme[status], [status, statusToTheme]);
-  const themeColor = statusToTheme[status];

Also applies to: 141-141, 148-148, 161-161, 166-166, 173-173, 177-178


223-223: There's vomit on his sweater already, but this grid could be neater! 📏

Consider using named grid areas for better maintainability:

 sx={{
   display: "grid",
-  gridTemplateColumns: "34px 2fr 1fr",
-  gridTemplateRows: "34px 1fr 3fr",
+  gridTemplateAreas: `
+    "icon title status"
+    "icon url url"
+    "chart chart chart"
+  `,
+  gridTemplateColumns: "34px 2fr 1fr",
   columnGap: theme.spacing(5),
 }}

Also applies to: 225-225, 233-233, 286-287, 297-297, 307-307

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a6eb970 and 2ab6a57.

📒 Files selected for processing (18)
  • Client/src/Components/Charts/MonitorDetailsAreaChart/index.jsx (7 hunks)
  • Client/src/Components/Charts/Utils/chartUtils.jsx (6 hunks)
  • Client/src/Components/Inputs/Search/index.jsx (5 hunks)
  • Client/src/Components/TabPanels/Account/TeamPanel.jsx (2 hunks)
  • Client/src/Components/Table/TablePagination/index.jsx (2 hunks)
  • Client/src/Components/Table/index.jsx (1 hunks)
  • Client/src/Pages/Incidents/IncidentTable/index.jsx (2 hunks)
  • Client/src/Pages/Incidents/index.jsx (2 hunks)
  • Client/src/Pages/Infrastructure/Details/index.jsx (3 hunks)
  • Client/src/Pages/Infrastructure/index.jsx (5 hunks)
  • Client/src/Pages/PageSpeed/card.jsx (12 hunks)
  • Client/src/Pages/PageSpeed/index.jsx (3 hunks)
  • Client/src/Pages/Uptime/Configure/index.jsx (2 hunks)
  • Client/src/Pages/Uptime/Details/Charts/DownBarChart.jsx (2 hunks)
  • Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (3 hunks)
  • Client/src/Pages/Uptime/Details/index.jsx (10 hunks)
  • Client/src/Pages/Uptime/Home/actionsMenu.jsx (3 hunks)
  • Client/src/Pages/Uptime/Home/index.jsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (13)
  • Client/src/Pages/Infrastructure/Details/index.jsx
  • Client/src/Pages/Incidents/IncidentTable/index.jsx
  • Client/src/Pages/Uptime/Details/Charts/DownBarChart.jsx
  • Client/src/Pages/Uptime/Configure/index.jsx
  • Client/src/Components/Charts/Utils/chartUtils.jsx
  • Client/src/Pages/Uptime/Home/actionsMenu.jsx
  • Client/src/Components/TabPanels/Account/TeamPanel.jsx
  • Client/src/Pages/Incidents/index.jsx
  • Client/src/Components/Charts/MonitorDetailsAreaChart/index.jsx
  • Client/src/Components/Inputs/Search/index.jsx
  • Client/src/Pages/PageSpeed/index.jsx
  • Client/src/Pages/Uptime/Details/index.jsx
  • Client/src/Pages/Infrastructure/index.jsx
🧰 Additional context used
🪛 Biome (1.9.4)
Client/src/Pages/Uptime/Home/index.jsx

[error] 161-175: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment

(lint/complexity/noUselessFragments)

🔇 Additional comments (7)
Client/src/Pages/Uptime/Home/index.jsx (2)

161-175: Yo dawg, that Fragment's still chillin' there unnecessarily! 🍝

Just like mom's spaghetti, we gotta clean up this code! That Fragment wrapper is as redundant as bringing a fork to a spaghetti eating contest!

Apply this diff to remove the unnecessary Fragment:

-            <>
             <Button
               variant="contained"
               color="accent"
               onClick={() => {
                 navigate("/uptime/create");
               }}
               sx={{
                 fontWeight: 500,
                 whiteSpace: "nowrap",
               }}
             >
               Create new
             </Button>
-            </>
🧰 Tools
🪛 Biome (1.9.4)

[error] 161-175: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment

(lint/complexity/noUselessFragments)


164-164: Color change looking fresh! 🎨

The switch from "primary" to "accent" is straight fire! It's perfectly aligned with the theme color updates across the app. Keep that visual consistency flowing!

Client/src/Components/Table/TablePagination/index.jsx (2)

95-95: Mom's spaghetti approves this focus state! 👊

Solid choice using primary.main for the focused state - it's gonna pop like it's hot!


108-111: These colors be spittin' straight facts! 💯

The semantic color naming with contrastTextSecondary and contrastTextTertiary is keeping it real with the design system.

Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (2)

22-28: Mom's spaghetti says delete that commented code already!

If we ain't using it, we shouldn't keep it. Version control's got our back if we need to check the old implementation. Clean code is happy code!


51-51: Straight fire! This theme color update is on point!

The change to primary.lowContrast aligns with the overall theme color consistency improvements.

Client/src/Pages/PageSpeed/card.jsx (1)

26-28: Yo dawg, let's make sure these colors are accessible! 🎨

The switch to primary palette looks clean, but we gotta verify those contrast ratios to keep it accessible for everyone.

Also applies to: 36-36, 55-55

✅ Verification successful

Yo dawg, your color game is on point! 🎨

The theme usage here is actually following best practices:

  • lowContrast is correctly used for borders (decorative only)
  • Text elements use proper contrastText variants
  • Theme system has built-in accessibility considerations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any existing contrast ratio tests or accessibility checks
rg -i "contrast|accessibility|a11y" --type js --type jsx

Length of output: 86


Script:

#!/bin/bash
# Search for contrast and accessibility related code
rg -i "contrast|accessibility|a11y" --type js
rg -i "contrast|accessibility|a11y" -g "*.jsx"

# Search for theme color definitions
rg "palette.primary" -g "*.js" -g "*.jsx" -A 2 -B 2

# Look for any color utility functions
rg "function.*Color" -g "*.js" -g "*.jsx"
rg "const.*Color" -g "*.js" -g "*.jsx"

Length of output: 68875

Copy link
Collaborator

@ajhollid ajhollid left a comment

Choose a reason for hiding this comment

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

I'll post the issues here as I come across them

Button color is missing:

image

theme.palette.percentage is no longer defined:

image

Pending color seems incorrect:

image

Seems to be an issue with displaying pagespeed monitors:

image

There is an issue with icon for infrastrucutre monitors:

image

Issue with table header for darkmode, already noted but here for reference:

image

I can't review further into the details pages as they don't load up at this point, will get to those once these are resolved!

Copy link

@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

🔭 Outside diff range comments (1)
Client/src/Pages/Uptime/utils.jsx (1)

Yo, we got some spaghetti code in these theme mappings! 🍝

Found inconsistent statusToTheme mappings between Label/index.jsx and utils.jsx:

  • pending maps to "warning" vs "secondary"
  • cannot resolve maps to "error" vs "tertiary"

These mappings should be consolidated into a single source of truth to avoid confusion, eh?

🔗 Analysis chain

Line range hint 1-104: Let's drop some beats to verify these theme changes! 🎧

We should check if these theme changes are consistent across the entire codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for inconsistent theme color usage
echo "Checking for inconsistent theme color usage..."
rg -g "*.{jsx,js}" "palette\.(success|error|warning)\.(main|contrastText)" "Client/src" | grep -v "lowContrast"

# Check for potential duplicate theme mappings
echo "Checking for duplicate status-to-theme mappings..."
rg -g "*.{jsx,js}" "statusToTheme.*=.*{" "Client/src"

Length of output: 6366


Script:

#!/bin/bash
# Check for status-to-theme mappings with fixed regex
echo "Checking for status-to-theme mappings..."
rg -g "*.{jsx,js}" "statusToTheme\s*=\s*\{" "Client/src"

# Check for any other status-to-color mappings
echo "Checking for other status color mappings..."
rg -g "*.{jsx,js}" "status.*color|color.*status" "Client/src"

Length of output: 1407


Script:

#!/bin/bash
# Compare the two statusToTheme implementations
echo "Comparing statusToTheme implementations..."
echo "=== Label/index.jsx ==="
ast-grep --pattern 'const statusToTheme = {$$$}' Client/src/Components/Label/index.jsx

echo -e "\n=== utils.jsx ==="
ast-grep --pattern 'const statusToTheme = {$$$}' Client/src/Pages/Uptime/utils.jsx

Length of output: 1197

♻️ Duplicate comments (2)
Client/src/Components/Label/index.jsx (1)

125-131: ⚠️ Potential issue

Bruh, we got duplicate spaghetti code! 🍝

Yo, there's already a shared statusToTheme in utils.jsx that other components are using. Let's not cook the same spaghetti twice!

Import and use the shared mapping instead:

-const statusToTheme = {
-  up: "success",
-  down: "error",
-  paused: "warning",
-  pending: "warning",
-  "cannot resolve": "error",
-};

+import { useUtils } from "../../Pages/Uptime/utils";
+
+const StatusLabel = ({ status, text, customStyles }) => {
+  const { statusToTheme } = useUtils();
Client/src/Pages/Uptime/utils.jsx (1)

31-46: 🛠️ Refactor suggestion

Yo, we're dropping the same beats twice! 🎵

This statusToTheme mapping is already implemented in Client/src/Components/Label/index.jsx. Let's keep our code DRY like mom's spaghetti!

Move this mapping to reuse the existing implementation in the Label component.

🧹 Nitpick comments (9)
Client/src/Pages/Uptime/Home/index.jsx (1)

71-76: Cleanup that color logic like mom's spaghetti! 🍝

The success color is repeated unnecessarily in the last two conditions. Let's clean this up!

Apply this diff to simplify the logic:

-					? theme.palette.error.main
-					: monitor.uptimePercentage < 0.5
-						? theme.palette.warning.main
-						: monitor.uptimePercentage < 0.75
-							? theme.palette.success.main
-							: theme.palette.success.main;
+					? theme.palette.error.main
+					: monitor.uptimePercentage < 0.5
+					? theme.palette.warning.main
+					: theme.palette.success.main;
Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (2)

7-15: Yo, these magic numbers are making me nervous, palms are sweaty!

Let's extract those response time thresholds into named constants at the top of the file. Makes the code more maintainable and the meaning clearer, you feel me?

+const RESPONSE_TIME_THRESHOLDS = {
+  EXCELLENT: 200,
+  GOOD: 300
+};

 const getThemeColor = (responseTime) => {
-  if (responseTime < 200) {
+  if (responseTime < RESPONSE_TIME_THRESHOLDS.EXCELLENT) {
     return "success";
-  } else if (responseTime < 300) {
+  } else if (responseTime < RESPONSE_TIME_THRESHOLDS.GOOD) {
     return "warning";
   } else {
     return "error";
   }
 };

64-74: These nested ternaries got me weak in the knees!

Let's clean up this color selection logic by extracting it into a helper function. Makes it easier to digest than mom's spaghetti!

+const getCellFillColor = (theme, themeColor, isHovered, isChartHovered) => {
+  if (isHovered) return theme.palette[themeColor].main;
+  return isChartHovered 
+    ? theme.palette[themeColor].accent 
+    : theme.palette[themeColor].main;
+};

 const themeColor = getThemeColor(entry.avgResponseTime);
 return (
   <Cell
     key={`cell-${entry.time}`}
-    fill={
-      hoveredBarIndex === index
-        ? theme.palette[themeColor].main
-        : chartHovered
-          ? theme.palette[themeColor].accent
-          : theme.palette[themeColor].main
-    }
+    fill={getCellFillColor(
+      theme,
+      themeColor,
+      hoveredBarIndex === index,
+      chartHovered
+    )}
Client/src/Components/BasicTable/index.jsx (3)

43-95: Mom's spaghetti says we need better accessibility! 🍝

The pagination buttons could use some improvements:

  1. Add aria-current="page" to indicate the current page
  2. Include visible page numbers in button labels for better screen reader support
 <Button
   variant="group"
   onClick={handleBackButtonClick}
   disabled={page === 0}
-  aria-label="previous page"
+  aria-label={`Go to previous page, page ${page}`}
+  aria-current={false}
 >

243-247: Clean up these hover effects, they're heavy like mom's spaghetti! 🍝

The hover effect uses both filter and opacity which is redundant. Pick one method for better performance.

 "&:hover": {
-  filter: "brightness(.75)",
-  opacity: 0.75,
+  opacity: 0.75,
   transition: "opacity 0.3s ease",
 },

192-194: Error handling's weak, we need something more heavy! 💪

The error case could be more informative and consistent with the table's styling.

 if (!data || !data.cols || !data.rows) {
-  return <div>No data</div>;
+  return (
+    <TableContainer component={Paper}>
+      <Table>
+        <TableBody>
+          <TableRow>
+            <TableCell sx={{ textAlign: "center" }}>
+              {emptyMessage}
+            </TableCell>
+          </TableRow>
+        </TableBody>
+      </Table>
+    </TableContainer>
+  );
 }
Client/src/Utils/Theme/constants.js (1)

110-118: These docs are fire, but they need more sauce!

The structure documentation is helpful, but let's:

  1. Move it to a proper README or documentation file
  2. Add examples for each use case
  3. Include color contrast requirements

Want me to create a documentation PR with these improvements?

Client/src/Pages/Uptime/utils.jsx (1)

48-63: Lose yourself in the optimization! 🎤

The getStatusStyles function is clean, but we can make it faster by memoizing the results since theme colors don't change often.

+import { useMemo } from 'react';
+
 const useUtils = () => {
   // ... other code ...
-  const getStatusStyles = (status) => {
+  const getStatusStyles = useMemo(() => (status) => {
     const themeColor = statusToTheme[status];
     return {
       backgroundColor: theme.palette[themeColor].lowContrast,
       background: `linear-gradient(340deg, ${theme.palette[themeColor].main} -60%, ${theme.palette[themeColor].lowContrast} 35%)`,
       // ... rest of the styles
     };
-  };
+  }, [theme, statusToTheme]);
Client/src/Utils/Theme/globalTheme.js (1)

138-138: Arms are heavy! All hover states look the same! 💪

Multiple components (IconButton, MenuItem, PaginationItem) use identical hover state styling with primary.lowContrast. Consider differentiating hover states for better user interaction feedback.

 MuiIconButton: {
   styleOverrides: {
     root: ({ theme }) => ({
       "&:hover": {
-        backgroundColor: theme.palette.primary.lowContrast,
+        backgroundColor: theme.palette.primary.lowContrast,
+        opacity: 0.8, // Add subtle distinction
       },
     }),
   },
 },

Also applies to: 186-186, 228-228

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5e9629e and 8fe200f.

📒 Files selected for processing (13)
  • Client/src/Components/BasicTable/index.jsx (1 hunks)
  • Client/src/Components/HttpStatusLabel/index.jsx (1 hunks)
  • Client/src/Components/Label/index.jsx (3 hunks)
  • Client/src/Components/Table/index.jsx (1 hunks)
  • Client/src/Pages/Auth/NewPasswordConfirmed.jsx (2 hunks)
  • Client/src/Pages/Infrastructure/index.jsx (5 hunks)
  • Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (3 hunks)
  • Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx (6 hunks)
  • Client/src/Pages/Uptime/Home/index.css (0 hunks)
  • Client/src/Pages/Uptime/Home/index.jsx (4 hunks)
  • Client/src/Pages/Uptime/utils.jsx (2 hunks)
  • Client/src/Utils/Theme/constants.js (2 hunks)
  • Client/src/Utils/Theme/globalTheme.js (7 hunks)
💤 Files with no reviewable changes (1)
  • Client/src/Pages/Uptime/Home/index.css
🚧 Files skipped from review as they are similar to previous changes (5)
  • Client/src/Components/Table/index.jsx
  • Client/src/Pages/Auth/NewPasswordConfirmed.jsx
  • Client/src/Components/HttpStatusLabel/index.jsx
  • Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
  • Client/src/Pages/Infrastructure/index.jsx
🧰 Additional context used
🪛 Biome (1.9.4)
Client/src/Components/BasicTable/index.jsx

[error] 185-185: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

Client/src/Pages/Uptime/Home/index.jsx

[error] 162-181: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment

(lint/complexity/noUselessFragments)

🔇 Additional comments (14)
Client/src/Components/Label/index.jsx (3)

27-27: Yo dawg, these spacing changes are fire! 🔥

The padding and color updates in BaseLabel are on point! Moving to theme-based colors improves consistency across the app. That's some clean spaghetti right there!

Also applies to: 34-35


90-90: Straight outta theme palette! 🎨

Good call using primary.lowContrast as the fallback. It's way better than hardcoding colors like it's 1999!


142-143: These theme colors be hittin' different! 🎯

The color mapping with theme.palette[themeColor] is clean and consistent. Using lowContrast for borders and dots creates that subtle yet professional vibe. Mom's spaghetti never looked this good!

Also applies to: 150-150

Client/src/Pages/Uptime/Home/index.jsx (3)

44-45: Yo, this auth state addition is straight fire! 🔥

Clean integration of the auth state selector, properly used in the memoized fetch params. That's the way to keep those re-renders in check!


162-181: Yo, that Fragment is as unnecessary as mom's spaghetti! 🍝

The Fragment wrapper is redundant since it contains only one child. Let's clean this up!

🧰 Tools
🪛 Biome (1.9.4)

[error] 162-181: Avoid using unnecessary Fragment.

A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
Unsafe fix: Remove the Fragment

(lint/complexity/noUselessFragments)


173-176: Sick focus outline enhancement! 🎯

Love that focus-visible outline addition! Great for accessibility. And that TODO comment about applying it to all buttons? That's thinking ahead!

Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (1)

43-43: Straight fire with that theme consistency! 🔥

The switch to primary.lowContrast for the XAxis stroke is on point with the theme standardization.

Client/src/Components/BasicTable/index.jsx (2)

1-4: Yo dawg, what's the deal with this TODO? 🤔

The comment questioning whether to delete this file needs addressing. If this component is still needed, remove the TODO. If there's a valid reason to delete it, we should track this decision.

Want me to help create a GitHub issue to track this decision?


217-219: These TODOs are making me nervous, there's vomit on my sweater already! 🤢

These styling TODOs should be addressed. Consider moving all table-related styles to a separate theme configuration file for better maintainability.

Want me to help create a theme configuration file with these styles?

Also applies to: 224-226

Client/src/Utils/Theme/constants.js (2)

68-82: Yo dawg, we need a migration plan for this color system!

You're exporting both colors (old system) and newSemanticColors (new system). While keeping both during migration is smart, we should:

  1. Document which components use which system
  2. Set a deadline for full migration
  3. Plan to remove the old system

Let's check what's still using the old system:

Also applies to: 239-239


Line range hint 119-237: Contrast ratios need validation, or we'll have accessibility spaghetti!

The semantic color mappings look clean, but we should:

  1. Validate contrast ratios meet WCAG standards
  2. Document minimum contrast requirements
  3. Plan to replace that temporary gradient section

Let's check for any existing contrast validation:

Client/src/Pages/Uptime/utils.jsx (1)

14-17: Yo dawg, these lowContrast colors are straight 🔥!

Clean update using consistent lowContrast variants across all statuses. This makes the UI more accessible and visually balanced.

Client/src/Utils/Theme/globalTheme.js (2)

260-261: There's vomit on his sweater already! Check that autofill contrast! 🎨

The autofill styling uses hardcoded background and text colors. Ensure these maintain sufficient contrast ratio for accessibility.

✅ Verification successful

Yo! The contrast is straight fire! 🔥

The autofill styling uses Material-UI's theme system which automatically ensures WCAG-compliant contrast ratios between primary.main and primary.contrastText. Mom's spaghetti is safe to serve!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Look for other autofill style implementations
rg "autofill" --type js

Length of output: 110


16-16: Yo dawg, we need to verify these contrast ratios!

The switch to primary.contrastText for all typography levels needs accessibility validation. Different text hierarchies typically need different contrast levels for optimal readability.

Also applies to: 21-21, 26-26, 31-31

✅ Verification successful

Yo dawg, the contrast game is strong! 💪

The theme system already implements a robust contrast hierarchy with proper documentation:

  • Main contrast text for primary content
  • Secondary/tertiary variants for less important text
  • Explicit prevention of using lowContrast for text
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any existing contrast ratio calculations or accessibility tests
rg -i "contrast|wcag|a11y" --type js

Length of output: 34798

data: PropTypes.object.isRequired,
paginated: PropTypes.bool,
reversed: PropTypes.bool,
rowPerPage: PropTypes.number,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Knees weak, arms are heavy, we got a typo in our PropTypes! 🤦‍♂️

There's a mismatch between the prop name used in the component (rowsPerPage) and its PropType validation (rowPerPage).

-  rowPerPage: PropTypes.number,
+  rowsPerPage: PropTypes.number,
📝 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
rowPerPage: PropTypes.number,
rowsPerPage: PropTypes.number,

Comment on lines +84 to +108
const newColors = {
offWhite: "#FEFEFE",
offBlack: "#131315",
gray100: "#F3F3F3",
gray200: "#EFEFEF",
gray500: "#A2A3A3",
blueGray50: "#E8F0FE",
blueGray500: "#475467",
blueGray600: "#344054",
blueGray800: "#1C2130",
blueBlueWave: "#1570EF",
/* I changed green 100 and green 700. Need to change red and warning as well, and refactor the object following the structure */
green100: "#67cd78",
green200: "#4B9B77",
green400: "#079455",
green700: "#026513",
orange100: "#FD8F22",
orange200: "#D69A5D",
orange600: "#9B734B",
orange700: "#884605",
red100: "#F27C7C",
red400: "#D92020",
red600: "#9B4B4B",
red700: "#980303",
};
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mom's spaghetti alert: Incomplete color refactoring spotted!

That TODO comment on line 95 is making me nervous! Let's:

  1. Complete the red and warning color refactoring
  2. Extract repeated hex values (like #FEFEFE) into base variables
  3. Document the color scale pattern (100-700)
 const newColors = {
-  offWhite: "#FEFEFE",
+  // Base neutrals
+  white: "#FFFFFF",
+  offWhite: "#FEFEFE",
+  offBlack: "#131315",
+  black: "#000000",
+
+  // Color scales
   gray100: "#F3F3F3",
   // ... rest of colors
 };
📝 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
const newColors = {
offWhite: "#FEFEFE",
offBlack: "#131315",
gray100: "#F3F3F3",
gray200: "#EFEFEF",
gray500: "#A2A3A3",
blueGray50: "#E8F0FE",
blueGray500: "#475467",
blueGray600: "#344054",
blueGray800: "#1C2130",
blueBlueWave: "#1570EF",
/* I changed green 100 and green 700. Need to change red and warning as well, and refactor the object following the structure */
green100: "#67cd78",
green200: "#4B9B77",
green400: "#079455",
green700: "#026513",
orange100: "#FD8F22",
orange200: "#D69A5D",
orange600: "#9B734B",
orange700: "#884605",
red100: "#F27C7C",
red400: "#D92020",
red600: "#9B4B4B",
red700: "#980303",
};
const newColors = {
// Base neutrals
white: "#FFFFFF",
offWhite: "#FEFEFE",
offBlack: "#131315",
black: "#000000",
// Color scales
gray100: "#F3F3F3",
gray200: "#EFEFEF",
gray500: "#A2A3A3",
blueGray50: "#E8F0FE",
blueGray500: "#475467",
blueGray600: "#344054",
blueGray800: "#1C2130",
blueBlueWave: "#1570EF",
/* I changed green 100 and green 700. Need to change red and warning as well, and refactor the object following the structure */
green100: "#67cd78",
green200: "#4B9B77",
green400: "#079455",
green700: "#026513",
orange100: "#FD8F22",
orange200: "#D69A5D",
orange600: "#9B734B",
orange700: "#884605",
red100: "#F27C7C",
red400: "#D92020",
red600: "#9B4B4B",
red700: "#980303",
};

Comment on lines 67 to 87
backgroundColor: theme.palette.success.lowContrast,
background: `linear-gradient(340deg, ${theme.palette.success.lowContrast} -60%, ${theme.palette.success.contrastText} 35%)`,
borderColor: theme.palette.success.contrastText,
"& h2": { color: theme.palette.success.main },
},
down: {
backgroundColor: theme.palette.error.dark,
background: `linear-gradient(340deg, ${theme.palette.error.light} -60%, ${theme.palette.error.dark} 35%)`,
borderColor: theme.palette.error.light,
backgroundColor: theme.palette.error.lowContrast,
background: `linear-gradient(340deg, ${theme.palette.error.lowContrast} -60%, ${theme.palette.error.contrastText} 35%)`,
borderColor: theme.palette.error.contrastText,
"& h2": { color: theme.palette.error.main },
},
paused: {
backgroundColor: theme.palette.warning.dark,
background: `linear-gradient(340deg, ${theme.palette.warning.light} -60%, ${theme.palette.warning.dark} 35%)`,
borderColor: theme.palette.warning.light,
backgroundColor: theme.palette.warning.lowContrast,
background: `linear-gradient(340deg, ${theme.palette.warning.lowContrast} -60%, ${theme.palette.warning.contrastText} 35%)`,
borderColor: theme.palette.warning.contrastText,
"& h2": { color: theme.palette.warning.main },
},
pending: {
backgroundColor: theme.palette.warning.light,
background: `linear-gradient(340deg, ${theme.palette.warning.dark} -60%, ${theme.palette.warning.light} 35%)`,
borderColor: theme.palette.warning.dark,
backgroundColor: theme.palette.warning.lowContrast,
background: `linear-gradient(340deg, ${theme.palette.warning.lowContrast} -60%, ${theme.palette.warning.contrastText} 35%)`,
borderColor: theme.palette.warning.contrastText,
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mom's spaghetti alert! 🍝 We got some code duplication!

These styles are already handled by the new getStatusStyles function. Let's clean this up!

-const statusStyles = {
-  up: {
-    backgroundColor: theme.palette.success.lowContrast,
-    background: `linear-gradient(340deg, ${theme.palette.success.lowContrast} -60%, ${theme.palette.success.contrastText} 35%)`,
-    // ... rest of the styles
-  },
-  // ... other status styles
-};
+const statusStyles = {
+  up: getStatusStyles('up'),
+  down: getStatusStyles('down'),
+  paused: getStatusStyles('paused'),
+  pending: getStatusStyles('pending'),
+};

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

Comment on lines +74 to +79
/* {
props: (props) => props.variant === "contained",
style: {
backgroundColor: `${theme.palette.accent.main} !important`,
},
}, */
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mom's spaghetti alert! 🍝 We've got commented code!

Either remove or implement the commented-out contained variant. Keeping commented code creates confusion about implementation status.

Comment on lines +35 to +37
/* TODO change to 4 */
spacing: 2,
/* TODO we can skip using the callback functions on the next lines since we are already accessing it on line 10. That was the last thing I managed to do, so we are sort of doing it twice*/
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Yo, these TODOs are making me nervous! 😰

  • The spacing change from 2 to 4 would affect 200+ layout values across the app - that's not a simple TODO, eh? It needs proper planning and testing.
  • That callback functions TODO is incorrect - those callbacks in component styles are actually necessary for MUI's theme system to work properly. They're not doing the same thing as line 10, so we can't skip them.
  • The other TODOs about moving colours and component organization are architectural improvements that should be tracked in the issue tracker, not as inline comments.
🔗 Analysis chain

These TODOs are making my knees weak! 🤔

Multiple TODOs indicate pending work:

  1. Spacing value change to 4
  2. Callback function optimization

Let's check for any related pending changes:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for related spacing usages
rg "spacing\(" --type js

Length of output: 40632


Script:

#!/bin/bash
# View the complete globalTheme.js file
cat Client/src/Utils/Theme/globalTheme.js

Length of output: 7445

Copy link

@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

🔭 Outside diff range comments (2)
Client/src/Utils/toastUtils.jsx (2)

Line range hint 1-14: Docs are sweaty, knees weak, comments are heavy!

The JSDoc comment specifies @param {'info' | 'error' | 'warning'} but the implementation uses "secondary" as default. Let's keep them in sync!

Here's the fix:

/**
 * @param {object} props
- * @param {'info' | 'error' | 'warning'} - The variant of the alert (e.g., "info", "error").
+ * @param {'info' | 'error' | 'warning' | 'secondary'} - The variant of the alert (e.g., "info", "error", "secondary").
 */

Yo, we got a theme integration issue that's making me lose myself in the moment!

The Alert component in Client/src/Components/Alert/index.jsx always uses secondary theme colors regardless of the variant prop value. It's only using the variant for icon selection, which means the "secondary" variant passed from toastUtils isn't actually affecting the styling.

• The component hardcodes theme colors:

const text = theme.palette.secondary.contrastText;
const bg = theme.palette.secondary.main;
const border = theme.palette.secondary.contrastText;
🔗 Analysis chain

Line range hint 15-40: Verify theme integration or lose yourself in the moment!

Since this is part of a theme color update, let's verify that the Alert component properly handles the "secondary" variant with the new theme colors.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for Alert component's variant handling
rg -l "variant.*secondary" "Client/src/Components/Alert"

# Check theme color definitions
rg "palette.*secondary" "Client/src/theme"

Length of output: 156


Script:

#!/bin/bash
# Find Alert component files
fd -e jsx -e js "Alert" Client/src

# Find theme-related files
fd -e jsx -e js -e ts -e json "theme|Theme|palette|colors" Client/src

# Search for secondary variant handling in Alert components
rg -A 5 "variant.*=.*secondary|variant.*:.*secondary" Client/src

# Search for color palette or theme definitions
rg -A 5 "palette|theme.*=|colors.*=|createTheme" Client/src

Length of output: 67511


Script:

#!/bin/bash
# Find Alert component implementation
ast-grep --pattern 'const Alert = ({$$$}) => {$$$}'

# Search for Alert component props and variant handling
rg -A 10 "variant.*=.*props" Client/src

# Search for Alert component files with more context
rg -A 10 "export.*Alert" Client/src

Length of output: 6608

🧹 Nitpick comments (1)
Client/src/Utils/Theme/constants.js (1)

239-239: Export cleanup needed!

We're exporting semanticColors as colors while also introducing newSemanticColors. This suggests a transition period. We should:

  1. Document the deprecation plan for semanticColors
  2. Add JSDoc to mark it as deprecated
+/** @deprecated Use newSemanticColors instead. Will be removed in version X.Y.Z */
 export { typographyLevels, semanticColors as colors, newSemanticColors };
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8fe200f and b4ba9ef.

📒 Files selected for processing (3)
  • Client/src/Utils/Theme/constants.js (2 hunks)
  • Client/src/Utils/Theme/globalTheme.js (7 hunks)
  • Client/src/Utils/toastUtils.jsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Client/src/Utils/Theme/globalTheme.js
🔇 Additional comments (3)
Client/src/Utils/Theme/constants.js (3)

84-108: Mom's spaghetti alert: Incomplete color refactoring spotted!

That TODO comment on line 95 is making me nervous! Let's:

  1. Complete the red and warning color refactoring
  2. Extract repeated hex values (like #FEFEFE) into base variables
  3. Document the color scale pattern (100-700)
 const newColors = {
-  offWhite: "#FEFEFE",
+  // Base neutrals
+  white: "#FFFFFF",
+  offWhite: "#FEFEFE",
+  offBlack: "#131315",
+  black: "#000000",
+
+  // Color scales
   gray100: "#F3F3F3",
   // ... rest of colors
 };

Line range hint 214-237: There's vomit on his sweater: Temporary gradient alert!

The comment "These are temporary" is concerning. We should:

  1. Create a ticket to track this technical debt
  2. Document why it's temporary and what the final solution should look like

Would you like me to create a GitHub issue to track the gradient refactoring task?


68-82: Yo! That unresolved naming is making me nervous!

The name unresolved suggests this is a temporary solution. We should either:

  1. Resolve it now and give it a proper name
  2. Add a TODO comment explaining what needs to be resolved

Also, the light/dark variants are inconsistent - some use the same color for both modes (like bg).

Comment on lines 110 to 214
contrastTextTertiary: {
light: newColors.blueGray500,
dark: newColors.gray500,
},
dark: {
light: paletteColors.green400,
dark: paletteColors.green900,
lowContrast: {
light: newColors.gray200,
dark: newColors.blueGray600,
},
},
neutral: {
secondary: {
main: {
light: newColors.gray200,
dark: "#313131" /* newColors.blueGray600 */,
},
contrastText: {
light: paletteColors.blueGray900,
dark: paletteColors.gray100,
light: newColors.blueGray600,
dark: newColors.gray200,
},
},
error: {
tertiary: {
main: {
light: paletteColors.red300,
dark: paletteColors.red300,
light: newColors.gray100,
dark: newColors.blueGray800,
},
contrastText: {
light: paletteColors.gray50,
dark: paletteColors.gray50,
light: newColors.blueGray800,
dark: newColors.gray100,
},
light: {
light: paletteColors.red100,
dark: paletteColors.red700,
},
success: {
main: {
light: newColors.green700,
dark: newColors.green100,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
dark: {
light: paletteColors.red800,
dark: paletteColors.red800,
lowContrast: {
light: newColors.green400,
dark: newColors.green200,
},
},
warning: {
main: {
light: paletteColors.orange300,
dark: paletteColors.orange400,
light: newColors.orange700,
dark: newColors.orange200,
},
contrastText: {
light: paletteColors.orange600,
dark: paletteColors.orange500,
light: newColors.offWhite,
dark: newColors.offBlack,
},
light: {
light: paletteColors.orange100,
dark: paletteColors.orange800,
lowContrast: {
light: newColors.orange100,
dark: newColors.orange600,
},
dark: {
light: paletteColors.orange50,
dark: paletteColors.gray800,
},
error: {
main: {
light: newColors.red700,
dark: newColors.red100,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
lowContrast: {
light: newColors.red400,
dark: newColors.red600,
},
},
/* From this part on, try to create semantic structure, not feature based structure */
/* These are temporary, just for everything not to break */
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Knees weak, arms heavy: Let's strengthen this color structure!

The structure looks solid with main/contrastText/lowContrast, but there are a few weak spots:

  1. Line 155: Hardcoded hex "#313131" with a commented reference
  2. Inconsistent use of lowContrast - some color sets have it, others don't
  3. Missing JSDoc to document the color structure that's currently in comments

Let's clean this up:

+/**
+ * @typedef {Object} ColorMode
+ * @property {string} light - Light mode color
+ * @property {string} dark - Dark mode color
+ */
+
+/**
+ * @typedef {Object} ColorSet
+ * @property {ColorMode} main - Primary background color
+ * @property {ColorMode} contrastText - Primary text color for contrast
+ * @property {ColorMode} [contrastTextSecondary] - Secondary text color
+ * @property {ColorMode} [contrastTextTertiary] - Tertiary text color
+ * @property {ColorMode} [lowContrast] - Low contrast color for borders/decorative elements
+ */

 const newSemanticColors = {
   secondary: {
     main: {
       light: newColors.gray200,
-      dark: "#313131" /* newColors.blueGray600 */,
+      dark: newColors.blueGray600,
     },
     // ...
   },
📝 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
/*
Structure:
main: background color
contrastText: color for main contrast text
contrastTextSecondary: if needed
contrastTextTertiary: if needed
lowContrast: if we need some low contrast for that color (for borders, and decorative elements). This should never be usend in text
*/
const newSemanticColors = {
accent: {
main: {
light: paletteColors.gray100,
dark: paletteColors.gray800,
light: newColors.blueBlueWave,
dark: newColors.blueBlueWave,
},
contrastText: {
light: paletteColors.blueGray200,
dark: paletteColors.blueGray200,
},
light: {
light: paletteColors.gray200,
dark: paletteColors.gray200,
},
dark: {
light: paletteColors.gray200,
dark: paletteColors.gray200,
light: newColors.offWhite,
dark: newColors.offWhite,
},
},
success: {
primary: {
main: {
light: paletteColors.green400,
dark: paletteColors.green400,
light: newColors.offWhite,
dark: newColors.offBlack,
},
contrastText: {
light: paletteColors.green50,
dark: paletteColors.green50,
light: newColors.blueGray800,
dark: newColors.blueGray50,
},
light: {
light: paletteColors.green500,
dark: paletteColors.green800,
contrastTextSecondary: {
light: newColors.blueGray600,
dark: newColors.gray200,
},
contrastTextTertiary: {
light: newColors.blueGray500,
dark: newColors.gray500,
},
dark: {
light: paletteColors.green400,
dark: paletteColors.green900,
lowContrast: {
light: newColors.gray200,
dark: newColors.blueGray600,
},
},
neutral: {
secondary: {
main: {
light: newColors.gray200,
dark: "#313131" /* newColors.blueGray600 */,
},
contrastText: {
light: paletteColors.blueGray900,
dark: paletteColors.gray100,
light: newColors.blueGray600,
dark: newColors.gray200,
},
},
error: {
tertiary: {
main: {
light: paletteColors.red300,
dark: paletteColors.red300,
light: newColors.gray100,
dark: newColors.blueGray800,
},
contrastText: {
light: paletteColors.gray50,
dark: paletteColors.gray50,
light: newColors.blueGray800,
dark: newColors.gray100,
},
light: {
light: paletteColors.red100,
dark: paletteColors.red700,
},
success: {
main: {
light: newColors.green700,
dark: newColors.green100,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
dark: {
light: paletteColors.red800,
dark: paletteColors.red800,
lowContrast: {
light: newColors.green400,
dark: newColors.green200,
},
},
warning: {
main: {
light: paletteColors.orange300,
dark: paletteColors.orange400,
light: newColors.orange700,
dark: newColors.orange200,
},
contrastText: {
light: paletteColors.orange600,
dark: paletteColors.orange500,
light: newColors.offWhite,
dark: newColors.offBlack,
},
light: {
light: paletteColors.orange100,
dark: paletteColors.orange800,
lowContrast: {
light: newColors.orange100,
dark: newColors.orange600,
},
dark: {
light: paletteColors.orange50,
dark: paletteColors.gray800,
},
error: {
main: {
light: newColors.red700,
dark: newColors.red100,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
lowContrast: {
light: newColors.red400,
dark: newColors.red600,
},
},
/* From this part on, try to create semantic structure, not feature based structure */
/* These are temporary, just for everything not to break */
/**
* @typedef {Object} ColorMode
* @property {string} light - Light mode color
* @property {string} dark - Dark mode color
*/
/**
* @typedef {Object} ColorSet
* @property {ColorMode} main - Primary background color
* @property {ColorMode} contrastText - Primary text color for contrast
* @property {ColorMode} [contrastTextSecondary] - Secondary text color
* @property {ColorMode} [contrastTextTertiary] - Tertiary text color
* @property {ColorMode} [lowContrast] - Low contrast color for borders/decorative elements
*/
/*
Structure:
main: background color
contrastText: color for main contrast text
contrastTextSecondary: if needed
contrastTextTertiary: if needed
lowContrast: if we need some low contrast for that color (for borders, and decorative elements). This should never be usend in text
*/
const newSemanticColors = {
accent: {
main: {
light: newColors.blueBlueWave,
dark: newColors.blueBlueWave,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offWhite,
},
},
primary: {
main: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
contrastText: {
light: newColors.blueGray800,
dark: newColors.blueGray50,
},
contrastTextSecondary: {
light: newColors.blueGray600,
dark: newColors.gray200,
},
contrastTextTertiary: {
light: newColors.blueGray500,
dark: newColors.gray500,
},
lowContrast: {
light: newColors.gray200,
dark: newColors.blueGray600,
},
},
secondary: {
main: {
light: newColors.gray200,
dark: newColors.blueGray600,
},
contrastText: {
light: newColors.blueGray600,
dark: newColors.gray200,
},
},
tertiary: {
main: {
light: newColors.gray100,
dark: newColors.blueGray800,
},
contrastText: {
light: newColors.blueGray800,
dark: newColors.gray100,
},
},
success: {
main: {
light: newColors.green700,
dark: newColors.green100,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
lowContrast: {
light: newColors.green400,
dark: newColors.green200,
},
},
warning: {
main: {
light: newColors.orange700,
dark: newColors.orange200,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
lowContrast: {
light: newColors.orange100,
dark: newColors.orange600,
},
},
error: {
main: {
light: newColors.red700,
dark: newColors.red100,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
lowContrast: {
light: newColors.red400,
dark: newColors.red600,
},
},
/* These are temporary, just for everything not to break */

@@ -12,7 +12,7 @@ import Alert from "../Components/Alert";
*/

export const createToast = ({
variant = "info",
variant = "secondary",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Yo! PropTypes validation is throwing up (pun intended) some issues here!

The default variant "secondary" isn't included in the PropTypes validation at the bottom of the file, which only allows ["info", "error", "warning"]. This mismatch is making me nervous, like mom's spaghetti! 🍝

Let's fix this by either:

  1. Updating PropTypes to include "secondary":
createToast.propTypes = {
-  variant: PropTypes.oneOf(["info", "error", "warning"]),
+  variant: PropTypes.oneOf(["info", "error", "warning", "secondary"]),
  // ... other props
};
  1. OR keeping the default variant as one of the allowed values:
export const createToast = ({
-  variant = "secondary",
+  variant = "info",
  // ... other props
}) => {

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

Copy link

@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: 0

🧹 Nitpick comments (2)
Client/src/Components/Breadcrumbs/index.css (1)

6-6: Mom's spaghetti moment: You've got the consistency on point! 🍝

The min-height update for the SVG perfectly matches the parent element's approach. This is the kind of attention to detail that makes the UI snap back to reality, oh there goes gravity!

Consider adding a comment to document the relationship between the parent and child min-heights:

/* SVG height is proportionally scaled to maintain consistent spacing */
Client/src/Pages/Settings/index.css (1)

16-16: Yo, watch that selector like it's the last plate of spaghetti! 🍝

The .settings button selector is kinda loose - might catch some buttons you weren't planning on. Consider tightening it up with .settings button.MuiButtonBase-root to keep it consistent with the other changes.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 53fcd5a and bc9d8f0.

📒 Files selected for processing (15)
  • Client/src/Components/Breadcrumbs/index.css (1 hunks)
  • Client/src/Components/Fallback/index.css (1 hunks)
  • Client/src/Components/Inputs/Select/index.css (1 hunks)
  • Client/src/Components/TabPanels/Account/ProfilePanel.jsx (11 hunks)
  • Client/src/Components/TabPanels/Account/TeamPanel.jsx (4 hunks)
  • Client/src/Pages/Account/index.css (1 hunks)
  • Client/src/Pages/Account/index.jsx (2 hunks)
  • Client/src/Pages/Incidents/index.css (1 hunks)
  • Client/src/Pages/Infrastructure/index.jsx (5 hunks)
  • Client/src/Pages/Maintenance/CreateMaintenance/index.jsx (4 hunks)
  • Client/src/Pages/PageSpeed/Details/index.css (1 hunks)
  • Client/src/Pages/PageSpeed/index.css (1 hunks)
  • Client/src/Pages/Settings/index.css (1 hunks)
  • Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx (6 hunks)
  • Client/src/Utils/Theme/globalTheme.js (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • Client/src/Components/TabPanels/Account/TeamPanel.jsx
  • Client/src/Pages/Maintenance/CreateMaintenance/index.jsx
  • Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
  • Client/src/Pages/Account/index.jsx
  • Client/src/Utils/Theme/globalTheme.js
  • Client/src/Components/TabPanels/Account/ProfilePanel.jsx
  • Client/src/Pages/Infrastructure/index.jsx
🔇 Additional comments (7)
Client/src/Components/Breadcrumbs/index.css (1)

2-2: Yo, this min-height change is straight fire! 🔥

Switching from fixed height to min-height is the real MVP move here. It keeps your layout game strong while letting the content breathe when it needs to.

Client/src/Components/Inputs/Select/index.css (1)

3-3: Yo dawg, this change is straight fire! 🔥

Switching from fixed height to min-height is a solid move for the select component. Just keep an eye out for any layout shifts when the content gets thicc.

Client/src/Pages/PageSpeed/index.css (1)

7-7: Heads up about that selector, fam! 🎯

The :not(:has()) selector is fresh like mom's spaghetti, but check them browser stats - some older browsers might choke on it.

Run this to check browser support:

Client/src/Pages/Incidents/index.css (1)

10-10: This change is bussin' fr fr! 💯

Keeping it consistent with them other button changes - that's what's up!

Client/src/Pages/PageSpeed/Details/index.css (1)

2-2: Straight heat on this one! 🌶️

My knees weak, arms heavy looking at this clean button height update - perfect match with the rest of the changes!

Client/src/Components/Fallback/index.css (1)

15-15: Yo dawg, this button height change looks solid! 🔥

Changing from fixed height to min-height is a smart move - lets those buttons breathe when they need to, while keeping that clean 34px minimum. Just make sure you've tested with different content lengths to avoid any layout surprises.

Let's check if this pattern is consistent across other components:

✅ Verification successful

Yo, these button heights are straight fire across the board! 🔥

All your buttons are rocking that sweet min-height: 34px style - no fixed heights in sight! The change is consistent throughout the entire codebase. Keep spittin' that hot CSS!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining fixed height buttons that might need updating
rg "height:\s*34px" --type css

Length of output: 505

Client/src/Pages/Account/index.css (1)

17-17: Mom's spaghetti approves this change! 🍝

The min-height update here is on point, fam! Nice touch with the :not(.MuiIconButton-root) selector - keeping those icon buttons out of this height business. Matches perfectly with the changes in other components.

Let's make sure we're not missing any spots:

✅ Verification successful

Yo, these button heights are straight fire! 🔥

The min-height change is consistent across the whole codebase, fam! Every component's keeping that same energy with the 34px min-height - from Settings to PageSpeed to Incidents. No spaghetti code here, just clean, consistent styling!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Look for any inconsistent button height treatments
rg "height:.*34px" --type css --glob "**/*.css" -C 2

Length of output: 2217

Copy link

@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: 0

🧹 Nitpick comments (4)
Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (3)

7-15: Yo dawg, let's make this function cleaner than mom's kitchen!

The function could use some love with these improvements:

  1. Define constants for those magic numbers
  2. Use early returns to keep it clean
+const RESPONSE_TIME = {
+  EXCELLENT: 200,
+  GOOD: 300
+};
+
 const getThemeColor = (responseTime) => {
-  if (responseTime < 200) {
-    return "success";
-  } else if (responseTime < 300) {
-    return "warning";
-  } else {
-    return "error";
-  }
+  if (responseTime < RESPONSE_TIME.EXCELLENT) return "success";
+  if (responseTime < RESPONSE_TIME.GOOD) return "warning";
+  return "error";
 };

72-72: Yo, there's a review comment chillin' in production code!

Drop that "CAIO_REVIEW" comment like it's hot! We don't want these in our production builds.

-                    ? theme.palette[themeColor].light // CAIO_REVIEW
+                    ? theme.palette[themeColor].light

68-74: These nested ternaries are making me nervous, palms are sweaty!

Let's make this more readable by extracting the color logic into a helper function.

+               const getCellFillColor = (themeColor, isHovered, isChartHovered) => {
+                 if (isHovered) return theme.palette[themeColor].main;
+                 return isChartHovered 
+                   ? theme.palette[themeColor].light
+                   : theme.palette[themeColor].main;
+               };
+
                fill={
-                 hoveredBarIndex === index
-                   ? theme.palette[themeColor].main
-                   : chartHovered
-                     ? theme.palette[themeColor].light
-                     : theme.palette[themeColor].main
+                 getCellFillColor(themeColor, hoveredBarIndex === index, chartHovered)
                }
Client/src/Pages/Uptime/Details/PaginationTable/index.jsx (1)

24-24: Yo dawg, let's make this theme hook performance-ready!

Consider memoizing the theme to avoid unnecessary re-renders, fam. Here's how we can drop it like it's hot:

- const theme = useTheme();
+ const theme = React.useMemo(() => useTheme(), []);
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between bc9d8f0 and 8048dae.

📒 Files selected for processing (10)
  • Client/src/Components/Charts/BarChart/index.jsx (5 hunks)
  • Client/src/Components/Charts/MonitorDetailsAreaChart/index.jsx (6 hunks)
  • Client/src/Components/Inputs/TextInput/index.jsx (2 hunks)
  • Client/src/Components/TabPanels/Account/ProfilePanel.jsx (11 hunks)
  • Client/src/Components/TabPanels/Account/TeamPanel.jsx (4 hunks)
  • Client/src/Pages/Maintenance/CreateMaintenance/index.jsx (5 hunks)
  • Client/src/Pages/Uptime/Details/Charts/DownBarChart.jsx (2 hunks)
  • Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (3 hunks)
  • Client/src/Pages/Uptime/Details/PaginationTable/index.jsx (2 hunks)
  • Client/src/Utils/Theme/constants.js (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
  • Client/src/Pages/Uptime/Details/Charts/DownBarChart.jsx
  • Client/src/Components/TabPanels/Account/ProfilePanel.jsx
  • Client/src/Pages/Maintenance/CreateMaintenance/index.jsx
  • Client/src/Components/Charts/BarChart/index.jsx
  • Client/src/Components/Charts/MonitorDetailsAreaChart/index.jsx
  • Client/src/Components/Inputs/TextInput/index.jsx
  • Client/src/Utils/Theme/constants.js
  • Client/src/Components/TabPanels/Account/TeamPanel.jsx
🔇 Additional comments (3)
Client/src/Pages/Uptime/Details/Charts/UpBarChart.jsx (1)

43-43: Straight fire! 🔥

The color change to primary.lowContrast is on point with the theme update.

Client/src/Pages/Uptime/Details/PaginationTable/index.jsx (2)

22-22: Yo, this import's straight fire! 🔥

The useTheme import from @emotion/react is the real MVP here, perfect for accessing those theme styles.


100-115: 🛠️ Refactor suggestion

Yo, these styles need some cleanup, no cap! 🧹

  1. The :is() selector might drop the beat in older browsers. Consider using explicit selectors for better compatibility:
- "&.MuiTable-root  :is(.MuiTableHead-root, .MuiTableBody-root) :is(th, td)": {
+ "&.MuiTable-root .MuiTableHead-root th, &.MuiTable-root .MuiTableBody-root td": {
  1. That magic number 12px ain't it, chief! Let's use MUI's typography system:
- fontSize: "12px",
+ fontSize: theme.typography.caption.fontSize,
  1. Hold up! contrastTextSecondary isn't a standard MUI token. We should verify if this custom token is defined in the theme:

Copy link

@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

🔭 Outside diff range comments (1)
Client/src/Pages/Auth/Login/Components/ForgotPasswordLabel.jsx (1)

Line range hint 39-42: Knees weak, arms heavy... these PropTypes got problems already! 🍝

There are several issues in the PropTypes declaration:

  1. proptype should be propTypes (case sensitive)
  2. emailError should be errorEmail to match the prop name

Here's the fix:

-ForgotPasswordLabel.proptype = {
+ForgotPasswordLabel.propTypes = {
 	email: PropTypes.string.isRequired,
-	emailError: PropTypes.string.isRequired,
+	errorEmail: PropTypes.string.isRequired,
};
🧹 Nitpick comments (1)
Client/src/Pages/Auth/Login/Components/ForgotPasswordLabel.jsx (1)

Line range hint 10-14: There's an opportunity on the surface, don't let it slip! 💪

Consider clearing the email from sessionStorage when it's invalid to prevent stale data persistence.

 const handleNavigate = () => {
 	if (email !== "" && !errorEmail) {
 		sessionStorage.setItem("email", email);
+	} else {
+		sessionStorage.removeItem("email");
 	}
 	navigate("/forgot-password");
 };
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8048dae and 6eedaa5.

📒 Files selected for processing (7)
  • Client/src/Components/Charts/CustomGauge/index.jsx (2 hunks)
  • Client/src/Components/Charts/Gauge/index.jsx (0 hunks)
  • Client/src/Pages/Auth/Login/Components/ForgotPasswordLabel.jsx (1 hunks)
  • Client/src/Pages/Infrastructure/Details/index.jsx (4 hunks)
  • Client/src/Pages/Uptime/utils.jsx (2 hunks)
  • Client/src/Utils/Theme/constants.js (3 hunks)
  • Client/src/Utils/Theme/globalTheme.js (8 hunks)
💤 Files with no reviewable changes (1)
  • Client/src/Components/Charts/Gauge/index.jsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • Client/src/Components/Charts/CustomGauge/index.jsx
  • Client/src/Pages/Infrastructure/Details/index.jsx
  • Client/src/Pages/Uptime/utils.jsx
  • Client/src/Utils/Theme/globalTheme.js
🔇 Additional comments (6)
Client/src/Pages/Auth/Login/Components/ForgotPasswordLabel.jsx (1)

27-27: Yo, this color change is straight fire! 🔥

The switch to theme.palette.accent.main aligns perfectly with the new theme system. It's like mom's spaghetti - it just works!

Client/src/Utils/Theme/constants.js (5)

1-1: Yo! What's the deal with that CAIO_REVIEW comment, dawg?

That comment's making me nervous like mom's spaghetti! Let's clarify what needs reviewing about these MUI imports.


97-97: Mom's spaghetti alert: Incomplete color refactoring spotted!

That TODO comment is making me nervous! Let's:

  1. Complete the red and warning color refactoring
  2. Extract repeated hex values into base variables
  3. Document the color scale pattern (100-700)

128-129: Vomit on his sweater already: What's with these CAIO_REVIEW comments?

These lighten operations need explanation:

  1. Why 0.2 specifically?
  2. Should we store these as constants?
  3. Are these operations consistent across themes?

Line range hint 220-243: Lose yourself: Let's not keep temporary code hanging!

That comment "These are temporary, just for everything not to break" is concerning. We should:

  1. Create a tracking issue for proper gradient implementation
  2. Document why these specific values were chosen
  3. Set a timeline for removing this temporary code

Would you like me to create a tracking issue for this technical debt?


161-161: ⚠️ Potential issue

There's vomit on his sweater: Hardcoded hex value alert!

That hardcoded "#313131" with a commented reference to newColors.blueGray600 is making me lose myself! Let's use the referenced color variable instead.

-      dark: "#313131" /* newColors.blueGray600 */,
+      dark: newColors.blueGray600,

Likely invalid or redundant comment.

Comment on lines +70 to +84
unresolved: {
main: {
light: paletteColors.blueBlueWave,
dark: paletteColors.blueBlueWave,
light: paletteColors.blue700,
dark: paletteColors.purple300,
},
// TODO we dont have primary light, dark or contrast text
},
secondary: {
main: {
light: {
light: paletteColors.blueGray20,
dark: paletteColors.purple400,
},
bg: {
light: paletteColors.gray100,
dark: paletteColors.gray800,
dark: paletteColors.gray100,
},
contrastText: {
light: paletteColors.blueGray200,
dark: paletteColors.blueGray200,
},
};
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Knees weak, arms heavy: Let's align this structure with other color sets!

The unresolved color set is missing:

  • contrastText definitions
  • lowContrast definitions
  • Documentation about its purpose

This should follow the same structure as other semantic colors for consistency.

Copy link

@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)
Client/src/Utils/Theme/lightTheme.js (1)

3-3: Yo dawg, let's clean up that commented import! 🍝

Remove the commented-out colors import instead of leaving it in the code. If we need to reference it later, we can always check the git history.

-import { /* colors, */ newSemanticColors } from "./constants";
+import { newSemanticColors } from "./constants";
Client/src/Utils/Theme/constants.js (2)

1-1: Yo! Remove that review comment, dawg!

The lighten and darken functions are actively used in the code (see lines 128-134), so we can safely remove the "CAIO_REVIEW" comment.

-import { lighten, darken } from "@mui/material/styles"; // CAIO_REVIEW
+import { lighten, darken } from "@mui/material/styles";

128-134: Yo! Clean up those review comments!

The lighten and darken operations look good, but let's remove those "CAIO_REVIEW" comments and document the magic numbers (0.2).

-			light: lighten(newColors.blueBlueWave, 0.2), //CAIO_REVIEW
-			dark: lighten(newColors.blueBlueWave, 0.2), //CAIO_REVIEW
+			light: lighten(newColors.blueBlueWave, 0.2), // 20% lighter
+			dark: lighten(newColors.blueBlueWave, 0.2), // 20% lighter
Client/src/Utils/Theme/extractColorObject.js (4)

1-4: Yo dawg, parameter validation looks solid but could use some TypeScript love!

The validation is straight fire, but consider adding TypeScript types to make it even more bulletproof:

type ThemeType = 'light' | 'dark';
function extractThemeColors(themeType: ThemeType, colorObject: Record<string, unknown>)

7-9: Mom's spaghetti moment: The null check could be more explicit!

The null check is combined with the object type check. For better clarity and maintainability, consider separating these conditions:

-if (typeof obj !== "object" || obj === null) {
+if (obj === null) {
+  return obj;
+}
+if (typeof obj !== "object") {
  return obj;
}

17-21: Knees weak: Consider performance optimization for large objects!

The recursive reduce operation could be expensive for deeply nested objects. Consider memoizing the results:

const memoizedExtract = memoize(extract);
acc[key] = memoizedExtract(obj[key]);

25-25: Arms are heavy: Add JSDoc documentation!

The exported function could use some documentation to help other developers understand its purpose and usage:

/**
 * Extracts theme-specific colors from a color object
 * @param {'light' | 'dark'} themeType - The theme type to extract
 * @param {Object} colorObject - The color object containing theme variants
 * @returns {Object} The extracted theme colors
 * @throws {Error} If themeType is not 'light' or 'dark'
 */
export { extractThemeColors };
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6eedaa5 and d92a477.

📒 Files selected for processing (4)
  • Client/src/Utils/Theme/constants.js (3 hunks)
  • Client/src/Utils/Theme/extractColorObject.js (1 hunks)
  • Client/src/Utils/Theme/globalTheme.js (8 hunks)
  • Client/src/Utils/Theme/lightTheme.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Client/src/Utils/Theme/globalTheme.js
🔇 Additional comments (5)
Client/src/Utils/Theme/lightTheme.js (1)

6-6: Straight fire! 🔥 This theme extraction is lit!

The switch to dynamic theme extraction using extractThemeColors is a solid improvement. It centralizes color management and makes it easier to maintain consistent theming across the app.

Client/src/Utils/Theme/constants.js (4)

70-84: Mom's spaghetti alert: Incomplete color set structure!

The unresolved color set is missing essential properties that other color sets have:

  • contrastText definitions
  • lowContrast definitions

This should follow the same structure as other semantic colors for consistency.


86-110: Mom's spaghetti alert: Incomplete color refactoring spotted!

That TODO comment is making me nervous! Let's:

  1. Complete the red and warning color refactoring
  2. Extract repeated hex values into base variables
  3. Document the color scale pattern (100-700)

167-167: Knees weak, arms heavy: Let's fix that hardcoded hex!

Replace the hardcoded hex with the commented reference.


Line range hint 226-249: Vomit on his sweater already: Let's clean up temporary code!

The comment "These are temporary, just for everything not to break" is concerning. We should:

  1. Create a tracking issue for removing these temporary gradients
  2. Document why they exist and what needs to be done to remove them
  3. Add a TODO with the tracking issue number

Would you like me to create a tracking issue for this cleanup task?


/* TODO I figured out we could have just one theme by passing mode as parameter for theme function. Implement later */
const palette = extractThemeColors("light", newSemanticColors);
console.log(palette);
Copy link

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 alert! 🍝 We've got a stray console.log!

Remove this debug statement before it makes its way to production. Console logs can impact performance and potentially expose internal structure.

-console.log(palette);

Comment on lines +11 to +14
if ("light" in obj && "dark" in obj) {
// CAIO_REVIEW: This will break if the root object has light and dark properties
return obj[themeType]; // Return the value for the specified theme
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Palms are sweaty: Critical issue with root object handling!

The comment on line 12 flags a legitimate concern. If the root object has light and dark properties but they're meant to be part of the theme structure rather than theme variants, this function will incorrectly return just one of those values.

Consider adding a parameter to specify which objects should be treated as theme variants:

-function extractThemeColors(themeType, colorObject) {
+function extractThemeColors(themeType, colorObject, isThemeVariant = false) {
   // ...
   const extract = (obj, isRoot = true) => {
     if (typeof obj !== "object" || obj === null) {
       return obj;
     }
-    if ("light" in obj && "dark" in obj) {
+    if (!isRoot && "light" in obj && "dark" in obj) {
       return obj[themeType];
     }
     return Object.keys(obj).reduce((acc, key) => {
-      acc[key] = extract(obj[key]);
+      acc[key] = extract(obj[key], false);
       return acc;
     }, {});
   };
-  return extract(colorObject);
+  return extract(colorObject, !isThemeVariant);
 }

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

Copy link

@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: 0

🧹 Nitpick comments (1)
Client/src/Utils/Theme/lightTheme.js (1)

3-3: Yo! That commented import is making me nervous! 🍝

The commented-out colors import suggests we're in a transition phase. We should either:

  • Remove the commented code if we're committed to the new system
  • Keep both systems temporarily with a TODO if we're doing a gradual migration
-import { /* colors, */ newSemanticColors } from "./constants";
+import { newSemanticColors } from "./constants";
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d92a477 and f8b3847.

📒 Files selected for processing (1)
  • Client/src/Utils/Theme/lightTheme.js (1 hunks)
🔇 Additional comments (1)
Client/src/Utils/Theme/lightTheme.js (1)

6-6: Verify theme extraction for all color modes! 🎨

The switch to extractThemeColors looks clean, but we should verify it handles all possible theme modes correctly.

Let's check the implementation and usage:

✅ Verification successful

Theme extraction verified successfully! 🎨

The implementation correctly handles both light and dark modes with proper validation and consistent usage.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify theme extraction implementation and usage

# Check extractThemeColors implementation
echo "Checking extractThemeColors implementation..."
rg -A 10 "extractThemeColors" --type js

# Check other theme files for consistency
echo "Checking other theme files..."
fd "Theme.js$" --type f --exec rg -l "extractThemeColors"

# Check for any hardcoded color values that might have been missed
echo "Checking for potential hardcoded colors..."
rg -i '(#[0-9a-f]{3,6}|rgb[a]?\(|hsl[a]?\()' --type js Client/src/

Length of output: 9838

@ajhollid ajhollid merged commit c4d223a into develop Jan 21, 2025
3 checks passed
@ajhollid ajhollid deleted the fix/colors-general branch January 21, 2025 21:26
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.

2 participants