Skip to content

Yu Yan - Fix: Dark Mode compatibility for InjuryChart component (PR #4316 foll…#5064

Open
yany960 wants to merge 5 commits intodevelopmentfrom
fix-injurychart-darkmode
Open

Yu Yan - Fix: Dark Mode compatibility for InjuryChart component (PR #4316 foll…#5064
yany960 wants to merge 5 commits intodevelopmentfrom
fix-injurychart-darkmode

Conversation

@yany960
Copy link
Copy Markdown
Contributor

@yany960 yany960 commented Mar 26, 2026

Description

Fix Dark Mode compatibility for InjuryChart component (PR #4316 follow-up).

The original PR #4316 used Bootstrap's bg-white class which forced white background in Dark Mode, causing visual inconsistency. This PR replaces Bootstrap utility classes with CSS module-based Dark Mode support.

Related PRS (if any):

Reference Previous PRs - FE-#4316 + BE-#1468 --> replaced by #2347

Main changes explained:

  • InjuryChartForm.jsx: Replaced Bootstrap bg-white with CSS module styles.lightBackground
  • InjuryChartForm.module.css: Added .lightBackground class for Light Mode styling
  • Ensures filter form and chart container properly adapt to Dark/Light theme

Files modified:

  1. src/components/BMDashboard/InjuryChart/InjuryChartForm.jsx

    • Added import styles from './InjuryChartForm.module.css'
    • Replaced bg-white with styles.lightBackground
    • Replaced bg-dark text-light/bg-secondary text-light with styles.wrapperDark
  2. src/components/BMDashboard/InjuryChart/InjuryChartForm.module.css

    • Added .lightBackground class for Light Mode background
  3. src/components/BMDashboard/InjuryChart/InjuryChart.module.css

    • Minor formatting improvements

How to test:

  1. Check into current branch: git checkout fix-injurychart-darkmode
  2. Do npm install and npm start to run this PR locally
  3. Clear site data/cache
  4. Log as admin user
  5. Go to http://localhost:5173/bmdashboard/injurychart
  6. Light Mode Test: Verify filter form and chart container show white background
  7. Dark Mode Test: Toggle Dark Mode and verify filter form and chart container show dark background (#1b2a41)
  8. Cross-check that chart data displays correctly in both modes

Screenshots of changes:

Before (Dark Mode - Issue):

  • Filter form shows white background in Dark Mode
  • Chart container shows white background in Dark Mode

After (Dark Mode - Fixed):

  • Filter form shows dark background (#1b2a41) in Dark Mode
  • Chart container shows dark background in Dark Mode
  • Text color properly adjusted for readability

Note:

This is a follow-up fix to PR #4316 to address the Dark Mode compatibility issue mentioned in the review comments.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 26, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 1266393
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69d85b0c8f849e00087f1bdd
😎 Deploy Preview https://deploy-preview-5064--highestgoodnetwork-dev.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.

…ow-up)

Replace Bootstrap 'bg-white' class with CSS module 'styles.lightBackground'
to ensure proper Dark Mode support across filter form and chart containers.
@yany960 yany960 force-pushed the fix-injurychart-darkmode branch 3 times, most recently from e0bbe69 to 860e795 Compare March 26, 2026 04:17
@yany960 yany960 force-pushed the fix-injurychart-darkmode branch from 860e795 to f0ce8c2 Compare March 26, 2026 04:31
@sonarqubecloud
Copy link
Copy Markdown

@one-community one-community changed the title Fix: Dark Mode compatibility for InjuryChart component (PR #4316 foll… Yu Yan - Fix: Dark Mode compatibility for InjuryChart component (PR #4316 foll… Apr 10, 2026
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