Amaan - Fix Material Summary dashboard styling and dark mode - #5490
Amaan - Fix Material Summary dashboard styling and dark mode#5490AmaanSyed09 wants to merge 2 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
DeMoliT1on
left a comment
There was a problem hiding this comment.
Hi @AmaanSyed09,
Thanks for the PR. I tested locally on the branch amaan-fix-material-summary-header-dark-mode while everything seems to styled correctly I want you to address just a small dark mode UI artifact before approval.
The percentage change on the usage trend is unreadable in dark mode. Also the value is not properly centered around the badge
The PR can be approved post these changes.
iAbhi001
left a comment
There was a problem hiding this comment.
Hi @AmaanSyed09,
I tested the branch locally on amaan-fix-material-summary-header-dark-mode.
The dashboard header, layout alignment, and the "Materials" center-label fix all look solid. However, following up on @DeMoliT1on's feedback, the dark mode UI artifact is still present:
- Usage Trend Badge Contrast & Centering: In dark mode, the percentage change text on the usage trend badge remains difficult to read due to low contrast, and the text is not vertically/horizontally centered within the badge container.
- Donut Slice Text Contrast: Additionally, the segment values inside the donut chart (e.g.,
50,30) have very low contrast against the colored slices in dark mode.
Once the badge styling and text contrast are adjusted, this will be ready for approval.
|
|
Addressed the remaining issues. Updated the Usage Trend percentage badge styling to properly center the percentage text within the badge and improved its dark mode contrast with a scoped dark-mode background while preserving the existing light mode appearance. Also updated the Material Summary donut chart data labels with larger, bold text and improved contrast so the segment values remain clearly readable across the chart slices. Verified the Usage Trend badge alignment and readability in both light and dark modes, including confirming that the light mode styling remains unchanged. Verified the donut chart segment values in both themes to ensure the labels are clearly visible and readable against the different slice colors. The changes remain scoped to the Material Summary dashboard and do not modify the underlying chart data, filters, or Material Summary functionality. Ready for re-review. |



Description
Phase 2 follow-up work for the Material Summary functionality introduced in PR #4642. The Material Summary page did not consistently match the standard dashboard layout and had styling issues affecting alignment, spacing, responsive behavior, and dark mode.

This update improves the Material Summary dashboard layout while preserving the existing filters, chart data, and Material Summary functionality. It also prevents the globally registered Project Status Chart.js center-text plugin from displaying the unrelated "Total Projects 0" label on the Material Summary donut chart.
Related PRS (if any):
Related to PR #4642, which introduced the Material Summary Dashboard functionality.
Main changes explained:
How to test:
npm install.npm run start:local.Screenshots or videos of changes:
Before :
After:
Note:
The Project Status center-text plugin change makes the globally registered Chart.js plugin opt-in. The Project Status chart explicitly enables the plugin, preserving its existing center-text behavior while preventing the label from appearing on unrelated Chart.js charts.