Skip to content

Namitha - fix(JobAnalytics): prevent invalid date range render + react to dark#3994

Merged
one-community merged 5 commits intodevelopmentfrom
fix/Jobanalytics-date-warning-darkmode
Apr 9, 2026
Merged

Namitha - fix(JobAnalytics): prevent invalid date range render + react to dark#3994
one-community merged 5 commits intodevelopmentfrom
fix/Jobanalytics-date-warning-darkmode

Conversation

@Namitha7070
Copy link
Copy Markdown
Contributor

Description

Page: Job Posting Page Analytics
Goal: Create a grouped/stacked horizontal bar chart showing Hits vs Applications per role, and address reviewer feedback.

Fixes (PRIORITY HIGH):
Overlap on small screens: Chart and date controls now reflow without colliding.
Dark mode not updating: UI and chart adopt the active theme correctly.
Dates UX: Replaced single dropdown with two date inputs (Start, End).
Overflow: Graph no longer spills outside its container.

Related PRS (if any):

Main changes explained:

  1. Dates UX (range-first)**
  • Replaced the single Dates dropdown with two inputs: Start date / End date.
  • Filtering applies date range first, then role filter.
  • Added a Clear action to reset both dates and results quickly.
  1. Invalid-range handling**
  • If Start > End, show an inline warning banner and skip filtering/fetching.
  • Chart data is cleared in this state; banner auto-clears once dates become valid.
  1. Chart restoration (Recharts, horizontal)**
  • Restored the original visual spec: gridlines, axes, end-of-bar value labels.
  • Sorted roles least → most popular for quick scanning.
  • Preserved tooltips/labels; long role names truncate with a title/tooltip.
  1. Overflow & responsiveness**
  • Clamped bar widths and contained the chart so it stays inside the card.
  • Adopted a stable flex layout for chart vs. filters to prevent overlap on small screens.
  • Reserved axis/label space to avoid clipping; no horizontal scroll.
  1. Dark mode**
  • Introduced theme CSS variables and supported common selectors: html.dark, [data-theme="dark"], body.dark.
  • Updated bar, grid, axis, and text colors to switch with the theme.
  • Set chart title to a light blue in dark mode for contrast.
  1. Title & typography**
  • Updated page title to “Least popular roles” and aligned typography/spacing with the spec.
  1. Data prep & state**
  • Refactored with useMemo for roles list, grouped counts, and max calculations.
  • Removed dead dropdown logic and simplified state for reliability.

How to test:

check into current branch: git checkout fix/analytics-date-warning-darkmode
do npm install and ... to run this PR locally
Clear site data/cache
log as admin user
go to (http://localhost:5173/applicant-analytics)
Verify the below functions:
Dark mode: Toggle light↔dark
Invalid range: Set Start > End → warning shows
Valid range: Fix dates → warning clears; data renders.
Role filter: Clear all roles → chart clears; no errors.
Minimize the window size to check if the chart is collapsing or not on smaller screens.

Screenshots or videos of changes:

Week.4.mp4

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 30, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 2368038
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/68b29a6aff540a00081b1021
😎 Deploy Preview https://deploy-preview-3994--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@SudheeshTD
Copy link
Copy Markdown
Contributor

I checked into the branch and run npm install and started frontend. I logged in using admin account, I cannot see the page. Should I do any changes?
image

Copy link
Copy Markdown

@sohamsharma08 sohamsharma08 left a comment

Choose a reason for hiding this comment

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

Tested the PR using an admin account. The graph, warnings, and data is portraying as expected and everything is working fine. Relevant screenshots are attached below:

PR 3994 (1) PR 3994 (2) Pr 3994 (3) PR 3994 (4)

vivekchandrabs
vivekchandrabs previously approved these changes Sep 4, 2025
Copy link
Copy Markdown

@vivekchandrabs vivekchandrabs left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-09-04 at 3 33 36 PM Screenshot 2025-09-04 at 3 33 49 PM Screenshot 2025-09-04 at 3 34 22 PM

I checked all the functionality and everything is working as expected.

@Namitha7070 Please document the PR properly. The frontend URL is /application-analytics

Copy link
Copy Markdown

@ezreal2020 ezreal2020 left a comment

Choose a reason for hiding this comment

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

Verified n tested, everything worked as expected.

image image

Copy link
Copy Markdown

@munishpatel munishpatel left a comment

Choose a reason for hiding this comment

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

I am getting Page Not Found in the link, should I change any thing locally to review this pull request?
Screenshot 2025-09-14 at 12 36 09 AM

@beblicarl
Copy link
Copy Markdown
Contributor

This feature works as intended and the code is great

https://www.loom.com/share/a7dcd7a6680f45d093c8283a5799ccb2?sid=9305d921-9823-4b3a-a0bf-65105a389932

@beblicarl beblicarl self-requested a review October 9, 2025 20:12
beblicarl
beblicarl previously approved these changes Oct 9, 2025
@Namitha7070 Namitha7070 changed the title fix(JobAnalytics): prevent invalid date range render + react to dark Namitha fixed(JobAnalytics): prevent invalid date range render + react to dark Jan 23, 2026
@Namitha7070 Namitha7070 changed the title Namitha fixed(JobAnalytics): prevent invalid date range render + react to dark Namitha - fix(JobAnalytics): prevent invalid date range render + react to dark Jan 23, 2026
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Namitha,

I have reviewed your PR locally and though it works as per requirement. Below are the UI issues:

  • The calendar is in light mode when the application is in dark mode
  • The clear button is not within the browser in desktop as well as mobile
Image Image Image Image Image Image

Copy link
Copy Markdown

@HemanthNidamanuru HemanthNidamanuru left a comment

Choose a reason for hiding this comment

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

Hi Namitha,
I have reviewed your PR locally and the functionality works as per requirement, however I noticed a few issues:

  1. The calendar is in light mode when the application is in dark mode
  2. The clear button is not visible in the desktop version but is visible in mobile
  3. I am able to select future dates
Image Image Image Image

@Namitha7070 Namitha7070 dismissed stale reviews from beblicarl and vivekchandrabs via 0855417 March 20, 2026 21:32
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 20, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 251762d
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69d00dfe7681ad0008270abf
😎 Deploy Preview https://deploy-preview-3994--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

…cs-date-warning-darkmode

# Conflicts:
#	src/components/ApplicationAnalytics/index.jsx
#	src/components/ApplicationAnalytics/jobAnalytics.jsx
#	src/components/ApplicationAnalytics/jobAnalytics.module.css
@Namitha7070
Copy link
Copy Markdown
Contributor Author

Hi Namitha,

I have reviewed your PR locally and though it works as per requirement. Below are the UI issues:

  • The calendar is in light mode when the application is in dark mode
  • The clear button is not within the browser in desktop as well as mobile

Image Image Image Image Image Image

The Clear button only pops up when a Date is selected, which is why you are unable to see it. But I have fixed the Calendar in Dark Mode and verified that the Date filter is working as usual.
Screenshot 2026-03-20 141503

Recording.2026-03-20.142006.mp4

Copy link
Copy Markdown

@rohanrastogi311 rohanrastogi311 left a comment

Choose a reason for hiding this comment

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

Hi Namitha,

Well done with this implementation.

Image

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Namitha,

Thank you for fixing the dark mode issues and the clear button however i think the mobile responsiveness got disturbed as you can see it does collapse bit goes out of the layout and the x axis points combine to form a numerical number series. Also if you could increase the brightness of the warning message it would be great.

Image

Issues
Image
Image
Image

@Namitha7070
Copy link
Copy Markdown
Contributor Author

Hi Namitha,

Thank you for fixing the dark mode issues and the clear button however i think the mobile responsiveness got disturbed as you can see it does collapse bit goes out of the layout and the x axis points combine to form a numerical number series. Also if you could increase the brightness of the warning message it would be great.

Image **Issues** Image Image Image

@Namitha7070 Namitha7070 closed this Apr 3, 2026
@Namitha7070 Namitha7070 reopened this Apr 3, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 3, 2026

@Namitha7070
Copy link
Copy Markdown
Contributor Author

Hi Anusha, I have fixed the mobile responsiveness of the page and fixed the x-axis and also the "No data for the selected filters." message is brighter, more visible.
Screenshot 2026-04-03 113050
Screenshot 2026-04-03 113118
Screenshot 2026-04-03 113453

@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 Apr 3, 2026
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Namitha,

Thank you so much for proactively fixing the issues. Everything appears to be as per requirement.

Image Image Image

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit d0d9999 into development Apr 9, 2026
13 checks passed
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.