Amaan - Fix scrollbar/clip artifact on Project Status cards – Total Construction Summary Report - #5516
Amaan - Fix scrollbar/clip artifact on Project Status cards – Total Construction Summary Report#5516AmaanSyed09 wants to merge 4 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
devangsaraogi
left a comment
There was a problem hiding this comment.
Hi @AmaanSyed09,
Tested the current PR head locally on the Total Construction Summary Project Status section. Both light and dark modes and viewport widths across desktop, tablet and mobile.
The responsive card changes are working well.
- card titles and values remain contained
- longer values such as
$27.6Kand$18.4Kfit within their value pills - the cards reflow correctly at narrower widths and
- the updated dark mode styling remains readable
I found one issue with the new comparison-period options. I left an inline comment with testing evidence. Week Over Week, Month Over Month, Year Over Year display the same percentage values while only the comparison label changes. The monthly and yearly selections currently present the existing weekly percentages as if they were calculated for those periods.
I also compared the header date-range clipping against the PR’s base commit and confirmed that behavior was already present before this PR. I am not treating it as a regression here.
Requesting changes for the comparison-period percentage behavior.
Thanks!
| </div> | ||
| {comparisonEnabled && ( | ||
| <div className="weekly-status-change" style={{ color: button.textColor }}> | ||
| {button.change.replace( |
There was a problem hiding this comment.
The new comparison options appear to relabel the existing week-over-week percentages rather than calculate values for the selected comparison period.
I reproduced this locally on the current PR head. For example, Total Projects remains +16% for Week Over Week, Month Over Month and Year Over Year. Only the comparison text changes. The same behavior occurs across the other Project Status cards.
Since these values are still hard-coded as week-over-week percentages, displaying them as month-over-month or year-over-year makes the selected comparison appear to contain calculated data when the underlying percentage has not changed.
Could these percentages be calculated from the selected comparison period or otherwise avoid displaying them for comparison modes where corresponding values are not available?
There was a problem hiding this comment.
Hi @AmaanSyed09,
Tested locally across desktop, tablet, and mobile in both light and dark modes.
What works well:
- Card layout, responsiveness, and dark-mode contrast look great.
- Longer values ($27.6K, $18.4K) fit inside the pills without clipping.
- Switching comparison modes runs smoothly without freezing the UI.
Required change:
- Echoing @devangsaraogi's note: toggling between Week Over Week, Month Over Month, and Year Over Year keeps the same percentage value (e.g.,
+16%) and only swaps the label, which looks misleading.
Please either calculate the true deltas for MoM/YoY, or hide the percentage/restrict options until that data is supported.
Once resolved, this should be good to merge. Thanks!
|
Please see my detailed comment above regarding this behavior. As noted there, the Project Status card values and percentages are hard-coded in the existing frontend implementation and are not currently calculated from report-period data or an API. The dynamic comparison values require separate backend/API changes and will be addressed separately. The current PR preserves the existing static Project Status data behavior. Thanks! |
|






Description
Fixes the Project Status card overflow, clipping, readability, and responsive layout issues in the Total Construction Summary Report.
The original issue caused text and values inside the Project Status summary cards to overflow beyond their intended boundaries, affecting readability and alignment. The cards also became too narrow at intermediate viewport widths because of fixed breakpoint column rules, resulting in clipped titles, values, and week-over-week text.
Additional testing identified that longer values such as
$27.6Kand$18.4Kcould extend outside their value pills. Dark mode also replaced the individual Project Status card colors with a uniform dark background and introduced poor text contrast against the existing pastel value pills.This hotfix keeps the Project Status cards properly contained and responsive across desktop, tablet, intermediate, and mobile viewport widths, allows value pills to accommodate longer values, and preserves readable Project Status card styling in both light and dark mode.
The original task also notes that the Reporting page may become non-responsive when selecting comparison options other than "No Comparison". In the current implementation, the comparison-period dropdown only provides the previous completed week and does not provide a "No Comparison" or alternative comparison option, so this behavior could not currently be reproduced. The changes remain scoped to the Project Status section of the Total Construction Summary Report.
Fixes (Priority Medium) – Fix scrollbar/clip artifact on Project Status cards – Total Construction Summary Report.
Related PRS (if any):
Previous hotfix: PR #5388
Main changes explained:
auto-fitandminmax()instead of conflicting fixed column counts at multiple breakpoints.min-width: 0to prevent card content from forcing grid tracks beyond their available width.$27.6Kand$18.4Kremain contained within their pills.WeeklyProjectSummary.module.csswithout modifying unrelated components or application-wide styling.How to test:
git checkout amaan-fix-project-status-responsive-cardsnpm installif dependencies are not already installed.npm run start:local.Screenshots or videos of changes:
Before
After
pr5516demo_2.mov
Note:
The changes are scoped to the Project Status cards within the Total Construction Summary Report. They address responsive card layout and clipping, dark-mode card colors and text readability, and value-pill sizing for longer values. No global styles, chart logic, backend functionality, or unrelated components were modified.