Skip to content

Shreya P taking over for Vamsidhar create grouped bar graph showing injury severity#4479

Open
vamsidharpanithi wants to merge 3 commits intodevelopmentfrom
vamsidhar-create-grouped-bar-graph-showing-injury-severity
Open

Shreya P taking over for Vamsidhar create grouped bar graph showing injury severity#4479
vamsidharpanithi wants to merge 3 commits intodevelopmentfrom
vamsidhar-create-grouped-bar-graph-showing-injury-severity

Conversation

@vamsidharpanithi
Copy link
Copy Markdown
Contributor

Description

This PR fixes dark mode styling issues for filter categories on the "Injury Severity by Category of Worker Injured" card. In dark mode, the dropdown category labels and options (Projects, Severities, Injury types, Start date, End date) were blending into the background and were difficult or impossible to see. Text and control borders did not have enough contrast against the dark card background.

Priority: MEDIUM

Fixes dark mode visibility issues for filter controls on the Injury Category Bar Chart component.

Related PRS (if any):

This frontend PR is related to backend PR #1405.

The original implementation was in PR #3619 .

Main changes explained:

  • Updated InjuryCategoryBarChart.module.css:

    • Added comprehensive dark mode styles for filter labels (Projects, Severities, Injury types, Start date, End date)
    • Enhanced react-select dark mode styles with proper hover, focus, and selected states using :global() for CSS modules
    • Added complete dark mode styles for react-datepicker inputs and calendar dropdown
    • Updated chart elements (axis ticks, legend text) for dark mode visibility
    • Applied dark mode colors to loading, error, and empty state messages
  • Updated InjuryCategoryBarChart.jsx:

    • Applied dark mode styles to YAxis tick colors
    • Updated Tooltip with dark mode background, border, and text colors
    • Updated Legend with dark mode text color
    • Updated Bar fill colors (second bar uses gray in dark mode instead of black)
    • Updated LabelList with dark mode text color
    • Updated loading, error, and empty state messages with dark mode classes
  • Fixed Header.jsx:

    • Removed duplicate isAckLoading declaration that was causing test failures (introduced during merge with development)

How to test:

  1. Check out the current branch: vamsidhar-create-grouped-bar-graph-showing-injury-severity
  2. Run npm install to install dependencies
  3. Run npm start to start the development server
  4. Clear site data/cache in your browser
  5. Log in as an admin user
  6. Navigate to: http://localhost:3000/bmdashboard/totalconstructionsummary
  7. Scroll to the "Injury Severity by Category of Worker Injured" card
  8. Test in Light Mode
  9. Test in Dark Mode
  10. Test with different filter combinations

Screenshots or videos of changes:

Note:

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 30, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit a31a982
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/692ba92c369bdc000878154b
😎 Deploy Preview https://deploy-preview-4479--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.

@sonarqubecloud
Copy link
Copy Markdown

@vamsidharpanithi vamsidharpanithi added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Jan 8, 2026
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Vamsidhar,

I have reviewed your PR locally and the below issues are found:

  • In light mode, the calendar is still as that of dark mode
  • Also in light mode, the title of the graph does not again with the title.
  • The color of the legend is not co-related to anything and only 3 of the 5 projects are listed in both the modes
Screenshot 2026-01-15 at 10 34 14 PM Screenshot 2026-01-15 at 10 34 33 PM Screenshot 2026-01-15 at 10 35 07 PM Screenshot 2026-01-15 at 10 35 28 PM

Copy link
Copy Markdown
Contributor

@shashank-madan shashank-madan left a comment

Choose a reason for hiding this comment

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

Functionality works as expected.
UI can be improved to fill the page rather than be constricted in the left half.

Total.Construction.Summary.-.Google.Chrome.2026-01-31.13-31-11.mp4

@ShreyaMP1999 ShreyaMP1999 changed the title Vamsidhar create grouped bar graph showing injury severity Shreya P taking over for Vamsidhar create grouped bar graph showing injury severity Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants