Skip to content

Abhishek_fix: add missing dark mode styles for pie chart legend table text#5366

Open
Abhi-R0211 wants to merge 2 commits into
developmentfrom
Abhishek_Fix_PeopleTasksPieChart_DarkMode
Open

Abhishek_fix: add missing dark mode styles for pie chart legend table text#5366
Abhi-R0211 wants to merge 2 commits into
developmentfrom
Abhishek_Fix_PeopleTasksPieChart_DarkMode

Conversation

@Abhi-R0211

Copy link
Copy Markdown
Contributor

Related PRs:

Main changes explained

The "Tasks With Completed Hours" table (Dashboard → Reports → People → select person) references a pie-chart-legend-table-dark CSS class in PieChart.jsx for dark mode styling, but this class was never actually defined in PieChart.module.css — only referenced once inside an unrelated hover selector. As a result, task name and hours text in the table body had no explicit dark-mode color and inherited a hardcoded semi-transparent black (rgb(0 0% 50%)) from a parent wrapper, rendering nearly invisible against the dark background.

Added the missing .pie-chart-legend-table-dark styles (header background, header text color, cell text color) in PieChart.module.css. Light mode styling and all other functionality are untouched — this component (src/components/common/PieChart) is only used by the People report, so the change has no impact on other pages.

Files changed:

  • src/components/common/PieChart/PieChart.module.css

How to test

  1. Check out branch Abhishek_Fix_PeopleTasksPieChart_DarkMode
  2. Run:
   yarn install
   yarn start:local
  1. Start the backend on development
  2. Clear cache, log in as admin
  3. Navigate: Dashboard → Reports dropdown → Reports → People
  4. Select a person with multiple completed tasks (e.g. one with several rows in "Tasks With Completed Hours")
  5. Toggle dark mode on
  6. Verify: In the "Tasks With Completed Hours" section, all table text (Task Name, Hours) is clearly legible — white/light text against the dark background, with a dark header row background
  7. Toggle dark mode off
  8. Verify: Light mode table appearance is unchanged (white header background, gray body text)

Screenshots or videos of changes

Screenshot 2026-07-03 140939 Screenshot 2026-07-03 141022

@Abhi-R0211 Abhi-R0211 self-assigned this Jul 3, 2026
@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 179b1e9
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a481ea71ae04700083eec73
😎 Deploy Preview https://deploy-preview-5366--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@Abhi-R0211

Copy link
Copy Markdown
Contributor Author

Hi @one-community, opened this PR to address the dark mode text contrast issue on the People Report "Tasks With Completed Hours" table (flagged in the Reports UI issues task, related to #4283 and #5015). Could you assign a reviewer or take a look when you get a chance? Let me know if any additional context is needed.

@Abhi-R0211 Abhi-R0211 changed the title fix: add missing dark mode styles for pie chart legend table text Abhishek_fix: add missing dark mode styles for pie chart legend table text Jul 3, 2026

@kzou55 kzou55 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Abhishek,

I ran and tested the PR locally

Verified

  • Can toggle to Dark Mode

  • The component contains the header title(Tasks With Completed Hours, the pie chart, and the associated information related to the pie chart)

    Image
  • Light Mode is unchanged when I toggle Dark Mode off

    Image

-- Issues

  1. The section title "Tasks With Completed Hours" text has poor contrast in Dark Mode

    Image
  2. There's a background color different from the Task With Completed Hours section background color. Is this intended?

    Image

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@Abhi-R0211

Copy link
Copy Markdown
Contributor Author

Hi @kzou55, thank you for the review!

To clarify scope: this PR was originally opened to fix a dark mode text contrast issue specifically in the "Tasks With Completed Hours" table (task name and hours text were unreadable against the dark background due to a missing CSS class). That's the fix described in the PR description and covered by the listed test steps.

The header contrast issue you flagged on "Time Logged to Projects/Non-tasks" is technically a separate element outside that original scope, but since it's the same root cause (a missing dark mode text color rule) in the same component, I've gone ahead and included the fix here rather than opening a new task for it.

Issues addressed:

  1. Section title contrast ("Tasks With Completed Hours" / "Time Logged to Projects/Non-tasks") — Fixed. Both headers were missing an explicit dark mode text color and were inheriting a low-contrast inherited color. Added a .text-light override so both render in light text against the dark background.

  2. Background color difference between the two sections — This is intentional, not a bug. Both sections use the same shared ReportPage.ReportBlock component. In dark mode, the outer wrapper is transparent (showing the page background, #0b1d3a) while the inner content has its own background (#1a2639) with a 2px margin gap between them. This creates a subtle frame/border effect around each card without using an actual border property. This design was introduced in Sayali: dark mode background for Reports People page #5015 and applies uniformly to every ReportBlock on the page, so both sections are styled identically by design.

Please re-review when you get a chance. Let me know if anything else needs attention!

@HemanthNidamanuru HemanthNidamanuru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Abhishek,

I tested this PR locally.

The table text in the “Tasks With Completed Hours” section is clearly visible in dark mode, and light mode is unchanged.

Everything is working fine.

Image Image

@DeepighaJ DeepighaJ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Tested the PR locally and the pie chart loads well and dark mode is perfect. However i noticed the "Hours Logged This Week" metric displays NaN instead of a valid numeric value. The application should display the correct hours or a fallback value (such as 0 or N/A) when no data is available.

Image

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.

4 participants