Skip to content

Alekya - Fix dark mode date inputs in Financials (Cost Variance Trend, Cost Breakdown) - #5712

Open
AlekyaJogini wants to merge 3 commits into
developmentfrom
alekya_fix_financials_date_inputs_dark_mode
Open

AlekyaJogini wants to merge 3 commits into
developmentfrom
alekya_fix_financials_date_inputs_dark_mode

Conversation

@AlekyaJogini

@AlekyaJogini AlekyaJogini commented Oct 24, 2026 •

Copy link
Copy Markdown

Description
In dark mode, the date inputs in the Financials section of the Total Construction Summary were white. Cost Variance Trend (Start Date / End Date) showed white boxes, and Cost Breakdown by Category (From / To) showed white boxes with invisible text.

Location: Dashboard → Reports → Total Construction Summary → Financials (/bmdashboard/totalconstructionsummary)

Main changes explained:

  • ToolsStoppageHorizontalBarChart.module.css: the rule :global(.react-datepicker-wrapper input) used !important and applied to every date picker in the app, forcing them white. Scoped it to the Reason of Stoppage chart's own wrapper (.datepickerWrapper), so it no longer affects other charts. The Stoppage chart looks the same as before.
  • CostVarianceTrendGraph.module.css: with the global rule scoped, the dark date input rule (.dateInput.darkDateInput) applies without !important. Also scoped the base .dateInput rule to .datePickerWrapper so the light mode border stays thin.
  • CostBreakDown.module.css: the global input[type='date'] rule set a white background. Added a dark mode rule (.wrapperDark .filterInput) using the chart's existing dark colors, plus color-scheme: dark so the calendar icon is visible.
  • Also fixed 2 existing stylelint errors in CostVarianceTrendGraph.module.css (media query range notation and a hex color shorthand); no visual change.
  • Light mode is unchanged.

How to test:

  1. Check out this branch, run npm install and npm run start:local, log in as admin.
  2. Go to /bmdashboard/totalconstructionsummary and open Financials.
  3. Switch to dark mode: the Start Date / End Date boxes (Cost Variance Trend) and From / To boxes (Cost Breakdown by Category) are dark with readable text.
  4. Click each box: the calendar opens and picking dates updates the chart.
  5. Switch to light mode: all four boxes look as before (white, thin border).
  6. Open Tools and Equipment Tracking → Reason of Stoppage of Tools: the "Filter by Date Range" box looks the same as before in light and dark mode, and the calendar opens.
  7. Check the other date pickers (Loss Tracking, Paid Labor Cost, Issue Tracking, Global Distribution): they are readable and the calendar opens in light and dark mode.

Screenshots:
Before (dark mode):

Screenshot 2026-10-24 at 5 30 20 PM Screenshot 2026-10-24 at 5 31 02 PM

After (dark mode):
Screenshot 2026-10-24 at 5 31 39 PM
Screenshot 2026-10-24 at 5 32 18 PM

After (light mode, calendar open):
Screenshot 2026-10-24 at 5 32 57 PM

After scoping the global date picker rule:

Cost Variance Trend, light mode (thin border):
Screenshot 2026-10-29 at 9 17 25 PM

Reason of Stoppage, dark mode (same as before):

Screenshot 2026-10-29 at 9 19 56 PM

Reason of Stoppage, light mode (calendar opens):

Screenshot 2026-10-29 at 9 20 39 PM

Issue Tracking, dark mode (date boxes now dark, they were white before):

Screenshot 2026-10-29 at 9 23 43 PM

Note:
Tested the other date pickers on the page after scoping the global rule: Reason of Stoppage, Loss Tracking, Paid Labor Cost, Issue Tracking and Global Distribution all still work in light and dark mode, and Issue Tracking's date boxes are now dark in dark mode (they were forced white before). SonarCloud quality gate passes with 0 new issues.

@netlify

netlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit d67561c
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6aed55fd8c090df81aa713f8
😎 Deploy Preview https://deploy-preview-5712--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.

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Oct 30, 2026

@rahulrubugunday rahulrubugunday 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.

I have reviewed your PR locally (frontend commit 59d3860, backend on development).

Working:

  1. Dark mode: Cost Variance Trend Start/End Date and Cost Breakdown From/To boxes are dark with readable text.
  2. Picking dates updates both charts (Cost Variance Trend filtered to May 5 to 15, Cost Breakdown total changed with a To date).
  3. Light mode: all four boxes are white with a thin border as before.
  4. Reason of Stoppage date range and the other date pickers (Loss Tracking, Paid Labor Cost, Issue Tracking, Global Distribution) are readable and open in both modes.

Needs fixing:

  1. Cost Breakdown From/To in dark mode: the calendar icon is dark on the dark box and hard to see. The new color-scheme: dark and the existing invert(1) filter on the icon cancel each other out. Please keep only one of them so the icon shows light.
Image

@iAbhi001
iAbhi001 self-requested a review October 31, 2026 07:14

@iAbhi001 iAbhi001 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.

I tested PR #5712 locally at commit 59d3860 paired with the backend on development in dark mode. The dark input background styling resolves the bright white box issue, the text is legible, and the calendar popup opens and filters data cleanly. However, as shown in testing, the calendar picker indicator icon inside the "From" and "To" boxes of Cost Breakdown by Category is invisible/dark against the input background. Combining color-scheme: dark with the existing invert(1) filter cancels out the icon lightness. Please remove the redundant filter so the calendar icon renders with proper light contrast in dark mode. Requesting changes until this contrast issue is addressed.

Image Image

@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

4 participants