Skip to content

Saurabh taking over for Saicharan - Implement Project Status Donut Chart (Frontend)#4040

Open
Saicharan1505 wants to merge 27 commits into
developmentfrom
feature/project-status-donut-frontend
Open

Saurabh taking over for Saicharan - Implement Project Status Donut Chart (Frontend)#4040
Saicharan1505 wants to merge 27 commits into
developmentfrom
feature/project-status-donut-frontend

Conversation

@Saicharan1505

@Saicharan1505 Saicharan1505 commented Sep 7, 2025

Copy link
Copy Markdown

Description

Implements Phase 2 Summary Dashboard: Project Status Donut Chart (Frontend).
This feature adds a donut chart visualization with Active, Completed, and Delayed projects, supporting date filters and tooltips.
Implements # (Phase 2 Action Item)

image

Related PRS (if any):

This frontend PR is related to the #1709 backend PR.
To test this PR you need to checkout the #1709 backend PR.

Main changes explained:

  • Created ProjectStatus.jsx component for donut chart visualization.
  • Added From Date and To Date filters using react-datepicker.
  • Integrated with backend API via projectStatusService.js.
  • Implemented hover tooltips showing project counts and percentages.
  • Displayed total projects count at the center of the donut chart.
  • Styled components with CSS modules for consistent UI.
  • Added right-side panel displaying numeric values for Active, Completed, and Delayed projects.

How to test:

  1. Check out the current branch(or)
    Check into this branch:
    git fetch origin feature/project-status-donut-frontend
    git checkout feature/project-status-donut-frontend
  2. Run npm install and npm run start:local.
  3. Clear site data/cache.
  4. Log in as admin user.
  5. Go to: http://localhost:5173/projectstatus.
  6. Verify:
    • Donut chart renders with Active, Completed, and Delayed segments.
    • From/To date filters work correctly.
    • Hover tooltips display counts and percentages.
    • Total projects count is shown at chart center.
    • Right-side panel shows correct numbers for each category.

Screenshots or videos of changes:

frontend #2 frontend #3

@netlify

netlify Bot commented Sep 7, 2025

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev failed.

Name Link
🔨 Latest commit 821a383
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a331fc65860b90008050b14

akshith312
akshith312 previously approved these changes Sep 9, 2025

@akshith312 akshith312 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested the PR locally. Applied the date range, chart renders based on the dates. Hover works for different categories and the respective data is displayed in the right section of the page.

image

@Prem203 Prem203 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have tested the PR with an admin account.

The chart is displayed correctly with the data visible on hover and it matched with the data shown on the side. Although there are several factors which needs to be handled.

  1. On changing to dark mode there is no visible change to the component.
  2. The date filter allows end date before start date and it does not throw any error messages. The chart vanishes on this instant and the values on the right also reflect the previous value instead of responsible error message.
image image image image

@Swetha-1306 Swetha-1306 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.

Tested the PR according to the instructions given, the chart and it's data are not being fetched even when the date filter is applied.
image

@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 Sep 28, 2025
@SnelPatare

Copy link
Copy Markdown
Contributor

Tested this PR. The chart is not displayed with or without dates.

Screenshot 2025-09-29 at 5 55 36 PM Screenshot 2025-09-29 at 5 55 23 PM

@Saicharan1505 Saicharan1505 changed the title Implement Project Status Donut Chart (Frontend) Saicharan - Implement Project Status Donut Chart (Frontend) Oct 4, 2025
@Saicharan1505 Saicharan1505 force-pushed the feature/project-status-donut-frontend branch from b68d843 to 265d805 Compare October 5, 2025 01:18
Saicharan1505 and others added 6 commits October 4, 2025 22:02
- Removed package-lock.json to avoid conflicts
- Updated yarn.lock to resolve Windows-specific package issues
- Fixed platform compatibility for Linux/macOS CI environments
- Add --ignore-platform flag to yarn install commands in all workflows
- Fixes Windows-specific package installation errors on Linux CI environment
- Resolves @rollup/rollup-win32-x64-msvc platform incompatibility issues
- Add secure token retrieval with error handling
- Improve error messages and user feedback
- Add loading and error states with retry functionality
- Enhance service error handling with proper token validation
- Fix SonarCloud security hotspot and reliability issues
- Reduce code duplication by improving error handling patterns
Aswin20010
Aswin20010 previously approved these changes Oct 22, 2025

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

Reviewed PR #4040+1709 (Project Status Donut Chart Visualization). Verified proper integration with backend and correct rendering of the donut chart with Active, Completed, and Delayed project segments. Confirmed hover tooltips display accurate counts and percentages, and total project count appears at the chart center. Tested From/To date filters for functional accuracy and verified numeric data alignment in the right-side panel. Checked CSS module styling consistency and responsiveness. No functional or UI regressions found — approved the PR.

Screenshot 2025-10-22 at 1 13 43 PM Screenshot 2025-10-22 at 1 14 15 PM

@one-community one-community added Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it. do not review Do not review or look at code without full context and removed High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible labels Oct 26, 2025

@Anusha-Gali Anusha-Gali 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 Juhitha,

As per your request to review i had ran your PR locally and the issue still exists.
Screenshot 2026-01-12 at 8 43 26 PM

@roshini1212 roshini1212 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested this PR, all core functionality works perfectly at http://localhost:5173/projectstatus: the donut chart renders Active/Completed/Delayed segments correctly, From/To date filters function properly, hover tooltips display accurate counts and percentages, total projects count appears at the chart center, and the right-side panel shows correct category numbers.

However, there's one minor issue in dark mode where the date picker text becomes invisible (white-on-white contrast problem).

Image Image Image

@maithili20

Copy link
Copy Markdown
Contributor

Hi @vamsidharpanithi
I am trying to review your PR and I am geting below error. I have checked out of your branches both FE and BE. But still the 404 error is there.
Screenshot 2026-02-10 at 4 20 48 PM

@sonarqubecloud

sonarqubecloud Bot commented Mar 1, 2026

Copy link
Copy Markdown

@one-community one-community changed the title Vamsidhar taking over for Juhitha taking over for Saicharan - Implement Project Status Donut Chart (Frontend) Juhitha taking over for Saicharan - Implement Project Status Donut Chart (Frontend) Mar 2, 2026
@Juhitha-Reddy

Copy link
Copy Markdown
Contributor

Resolved merge conflicts and tested locally. Please verify

Screen.Recording.2026-03-02.at.10.32.27.PM.mov

naznin07
naznin07 approved these changes Mar 7, 2026
setPending(true);
setError('');
try {
const token = getToken();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In token retrieval add authorization header.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PR #4040

@Anusha-Gali Anusha-Gali 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 Juhitha,

I re-reviewed your PR locally, thanks for fixing the calendar issue however the hover and tooltip appears to be broken. There is no tooltip being displayed and when i hover on two of the three status the chart freezes.

4040.mp4

// Secure token retrieval with error handling
const getToken = () => {
try {
return localStorage.getItem('token') || null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Token retrieval should be handled by the API service layer or read from Redux state, not accessed directly in a component. The token is re-read on every load call rather than being reactive to auth state changes.

<div className={styles.leftSection}>
{/* Header + Filters */}
<div className={styles.header}>
<div className={styles.title}>PROJECT STATUS</div>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The same title is shown both above the component and inside the chart itself, which is redundant.

Comment thread src/components/ProjectStatus/ProjectStatus.jsx Outdated
@SharadhaKasiviswanathan

Copy link
Copy Markdown
Contributor

I tested this locally with the frontend PR against the linked backend PR (#1709). The page renders and the date filter updates the right-side counts correctly. For 2025-01-01 to 2025-12-31, the UI showed '345 / 113 / 17', which matched the API response.

One issue still needs to be fixed before merge:

  • The donut chart tooltip throws 'TypeError: pct?.toFixed is not a function'. The frontend calls 'toFixed(1)' on 'data.percentages.*', but the backend currently returns those percentage values as strings (for example "72.6"), so the tooltip logic breaks during chart interaction. Please either return numeric percentages from the backend or coerce them to numbers in the frontend before calling 'toFixed'.

Also, the backend is currently calculating 'delayedProjects' from inactive non-archived projects (isActive === false && !isArchived). If the intended metric is truly 'Delayed' rather than 'Inactive', that aggregation/label should be aligned.

Screenshot 2026-03-28 at 11 25 34 PM

@sonarqubecloud

sonarqubecloud Bot commented Apr 6, 2026

Copy link
Copy Markdown

@rajanidi1999 rajanidi1999 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,
Your UI looks clean and structured, but there are a few issues worth addressing. The main problem is the failed data fetch state—right now it only shows a generic error message, so it would be better to include more context (e.g., network error vs. no data) and possibly auto-retry or logging for debugging. The date filters are clear, but they should have validation (like preventing invalid ranges) and maybe default values to improve UX. The stats panel on the right is neat, though showing all zeros without explanation can feel confusing—consider a placeholder or tooltip. Also, ensure loading states (spinners/skeletons) are visible before the error appears. Overall, solid layout, but improving error handling, feedback, and edge-case UX will make it much more robust.

Image

@one-community one-community changed the title Juhitha taking over for Saicharan - Implement Project Status Donut Chart (Frontend) Vamsidhar taking over for Saicharan - Implement Project Status Donut Chart (Frontend) Apr 26, 2026
@ShreyaMP1999 ShreyaMP1999 changed the title Vamsidhar taking over for Saicharan - Implement Project Status Donut Chart (Frontend) Shreya P taking over for Vamsidhar taking over for Saicharan - Implement Project Status Donut Chart (Frontend) Apr 27, 2026

@kunchalasireesha kunchalasireesha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Shreya, it looks like this PR currently has merge conflicts with the base branch. Could you please rebase or merge the latest changes from development into your branch and resolve the conflicts? Once the build passes, I’ll finish the review.

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

Checked into current branch.
The error "Failed to fetch project status data" is displayed. Also resolve the merge conflicts as well.
Image

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

Tested locally on branch: feature/project-status-donut-frontend with backend on feature/project-status-donut-backend

Testing:

  • Donut chart renders correctly with Active (Purple), Completed (Teal), and Delayed (Orange) segments
  • Total Projects count displays correctly in the chart center
  • Right-side panel shows correct Active/Completed/Delayed counts
  • From/To date filters update the chart correctly
  • Hover tooltips show segment counts and percentages
  • Today's date displays below the chart

Issue:
In dark mode, the From Date and To Date input fields have a white background, but the selected date text is not visible; the text color blends into the white background, making entered dates unreadable.
This PR has active merge conflicts that must be resolved before merging.

Image Image Image

the selected dates are not visible in the fields in dark mode:
Image

@one-community one-community changed the title Shreya P taking over for Vamsidhar taking over for Saicharan - Implement Project Status Donut Chart (Frontend) Saurabh taking over for Saicharan - Implement Project Status Donut Chart (Frontend) May 31, 2026
@sonarqubecloud

Copy link
Copy Markdown

@handikaharianto handikaharianto 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 @Saicharan1505 , when I tried to review this PR, I received the following error message on the frontend side.
Image

Furthermore, I also received more error messages in the command line.
Image

Please resolve this issue.

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.