Skip to content

fix: improve dark mode container harmony#320

Open
Harshwardhan-1 wants to merge 1 commit into
GitMetricsLab:mainfrom
Harshwardhan-1:fix-dark-mode
Open

fix: improve dark mode container harmony#320
Harshwardhan-1 wants to merge 1 commit into
GitMetricsLab:mainfrom
Harshwardhan-1:fix-dark-mode

Conversation

@Harshwardhan-1
Copy link
Copy Markdown

@Harshwardhan-1 Harshwardhan-1 commented May 18, 2026

Related Issue


Description

Improved dark mode container background harmony by updating elevated container styles to better match the application's dark theme.

Changes made:

• Updated Tracker input section background styling
• Updated "No Data Found" container styling
• Updated table container backgrounds in dark mode
• Added subtle border and blur effect for better elevation consistency


How Has This Been Tested?

• Tested locally on Chrome
• Verified dark mode appearance on localhost
• Checked visual consistency between background and elevated containers

Screenshots (if applicable)

Before:
image

After:
image


Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • Style
    • Improved dark mode visual styling on the tracker interface with enhanced contrast, background effects, and consistent visual design across key interface sections.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit cce8e42
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a0b44420122d30008d51746
😎 Deploy Preview https://deploy-preview-320--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

Tracker.tsx applies consistent dark-mode-aware styling to three UI containers: the auth form, empty-state card, and results table wrapper. Each now conditionally uses a lighter background color, backdrop blur filter, and conditional border based on theme mode to improve visual elevation and color harmony.

Changes

Dark-mode container elevation

Layer / File(s) Summary
Apply theme-aware styling to page containers
src/pages/Tracker/Tracker.tsx
Auth form container, "No Data Found" empty-state card, and results table wrapper are refactored to use theme.palette.mode-dependent background colors, backdropFilter blur effects, and conditional dark borders for consistent dark-mode visual elevation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

level:intermediate, quality:clean, type:accessibility

Poem

🐰 Three boxes now shimmer with starlight glow,
Dark mode's soft blur makes them steal the show,
Borders so crisp, backgrounds aligned—
Elevation and harmony, perfectly designed! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: improving dark mode container harmony through styling updates to match the dark theme.
Description check ✅ Passed The description follows the template with all required sections completed: related issue, detailed description of changes, testing approach, before/after screenshots, and type of change clearly marked.
Linked Issues check ✅ Passed The PR successfully addresses issue #310 by updating elevated container backgrounds to use dark-mode-aware styling with backdrop filters and borders, creating natural elevation harmony.
Out of Scope Changes check ✅ Passed All changes are scoped to the Tracker component's styling to address dark mode container harmony; no unrelated modifications to data fetching, logic, or component exports are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/pages/Tracker/Tracker.tsx (1)

171-183: ⚡ Quick win

Extract shared elevated-container sx to avoid style drift.

The same dark-mode elevation styles are repeated in three places. Centralizing this style keeps the UI consistent and makes future tuning safer.

♻️ Proposed refactor
+  const elevatedContainerSx = {
+    backgroundColor:
+      theme.palette.mode === "dark"
+        ? "rgba(30, 41, 59, 0.65)"
+        : theme.palette.background.paper,
+    backdropFilter: "blur(8px)",
+    border:
+      theme.palette.mode === "dark"
+        ? "1px solid rgba(148, 163, 184, 0.15)"
+        : "none",
+  };

 <Paper
   elevation={1}
   sx={{
     p: 2,
     mb: 4,
-    backgroundColor:
-      theme.palette.mode === "dark"
-        ? "rgba(30, 41, 59, 0.65)"
-        : theme.palette.background.paper,
-    backdropFilter: "blur(8px)",
-    border:
-      theme.palette.mode === "dark"
-        ? "1px solid rgba(148, 163, 184, 0.15)"
-        : "none",
+    ...elevatedContainerSx,
   }}
 >

 <Paper
   elevation={1}
   sx={{
     p: 4,
     textAlign: "center",
-    backgroundColor:
-      theme.palette.mode === "dark"
-        ? "rgba(30, 41, 59, 0.65)"
-        : theme.palette.background.paper,
-    backdropFilter: "blur(8px)",
-    border:
-      theme.palette.mode === "dark"
-        ? "1px solid rgba(148, 163, 184, 0.15)"
-        : "none",
+    ...elevatedContainerSx,
   }}
 >

 <TableContainer
   component={Paper}
   sx={{
-    backgroundColor:
-      theme.palette.mode === "dark"
-        ? "rgba(30, 41, 59, 0.65)"
-        : theme.palette.background.paper,
-    backdropFilter: "blur(8px)",
-    border:
-      theme.palette.mode === "dark"
-        ? "1px solid rgba(148, 163, 184, 0.15)"
-        : "none",
+    ...elevatedContainerSx,
   }}
 >

Also applies to: 355-367, 383-393

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/Tracker/Tracker.tsx` around lines 171 - 183, Extract the repeated
dark-mode elevation style block used in the sx props into a single shared
constant (e.g., elevatedContainerSx) and replace the inline sx objects in
Tracker.tsx with a reference to that constant; locate the inline sx blocks that
use theme.palette.mode checks (the sx prop that sets p, mb, backgroundColor
using theme.palette.mode === "dark", backdropFilter, and border) and move those
style rules into the shared elevatedContainerSx so all three occurrences (the
one shown plus the blocks at the other two usages) reference the same object,
keeping any component-specific overrides (like p or mb) by merging or extending
the shared sx where needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/pages/Tracker/Tracker.tsx`:
- Around line 171-183: Extract the repeated dark-mode elevation style block used
in the sx props into a single shared constant (e.g., elevatedContainerSx) and
replace the inline sx objects in Tracker.tsx with a reference to that constant;
locate the inline sx blocks that use theme.palette.mode checks (the sx prop that
sets p, mb, backgroundColor using theme.palette.mode === "dark", backdropFilter,
and border) and move those style rules into the shared elevatedContainerSx so
all three occurrences (the one shown plus the blocks at the other two usages)
reference the same object, keeping any component-specific overrides (like p or
mb) by merging or extending the shared sx where needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 735aba5c-0ea2-4b8c-81a9-d728f866c5c0

📥 Commits

Reviewing files that changed from the base of the PR and between 8d17610 and cce8e42.

📒 Files selected for processing (1)
  • src/pages/Tracker/Tracker.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: UI/UX: Dark mode container backgrounds clash with the main background hue

1 participant