Shravya_Kudlu/bugfix/css-module.css-#3829#3921
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR converts a CSS component to use CSS modules following project conventions. The main changes involve deleting a regular CSS file and creating a module.css file with proper naming conventions, while also adding a new route for a PR reviewers analytics component.
- Refactored CSS to use CSS modules pattern with scoped class names
- Added new route for ReviewersStackedBarChart component
- Created mock data file for the reviewers component
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/routes.jsx | Added new protected route for reviewers stacked bar chart component |
| src/components/HGNPRDashboard/ReviewersStackedBarChart/reviewersMockData.js | New mock data file containing reviewer analytics test data |
| src/components/HGNPRDashboard/ReviewersStackedBarChart/ReviewersStackedBarChart.module.css | CSS module file with scoped styles for the chart component |
| src/components/HGNPRDashboard/ReviewersStackedBarChart/ReviewersStackedBarChart.jsx | Main React component for displaying reviewer analytics in a stacked bar chart |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/components/HGNPRDashboard/ReviewersStackedBarChart/ReviewersStackedBarChart.module.css
Outdated
Show resolved
Hide resolved
src/components/HGNPRDashboard/ReviewersStackedBarChart/ReviewersStackedBarChart.jsx
Outdated
Show resolved
Hide resolved
src/components/HGNPRDashboard/ReviewersStackedBarChart/ReviewersStackedBarChart.jsx
Outdated
Show resolved
Hide resolved
src/components/HGNPRDashboard/ReviewersStackedBarChart/ReviewersStackedBarChart.jsx
Show resolved
Hide resolved
| return ( | ||
| <div | ||
| className={`${styles.reviewersChartContainer} ${darkMode ? styles.darkMode : ''}`} | ||
| style={{ |
There was a problem hiding this comment.
For a consistent background color, I used this inline style. Since I couldn't find a way to import our darkTheme color within this route, I'm not sure if this is the best approach. Could you please review and let me know if there's a better way to handle this?
There was a problem hiding this comment.
I tested this PR as an admin user following the provided steps. The stacked bar chart renders correctly in both light and dark mode.
Additional checks:
-
Verified the Teams category across All, Alpha, Beta, Delta, and Gamma are all displayed as expected.
-
Confirmed that Ascending/Descending sorting works correctly.
abhirambj
left a comment
There was a problem hiding this comment.
Tested the Reviewers Stacked Bar Chart on /pr-team-analytics/reviewers-stacked-bar-chart. All legacy CSS has been properly migrated to CSS modules, classNames are scoped, and there are no inline or global styles left. UI renders as expected with all filters and chart features working correctly in both dark and light modes.
No regressions, and the code is now much cleaner and more maintainable.
aryanrachala54
left a comment
There was a problem hiding this comment.
I’ve reviewed the changes and tested the /pr-team-analytics/reviewers-stacked-bar-chart route. The chart displays correctly when the duration is set to "All Time", but selecting other options like "Last Week", "Last 2 Weeks", or "Last Month" results in a "No PR data available" message, and no chart is shown.
Aside from this, everything else functions as expected such as filters, sorting, and team categories render correctly. The use of scoped styles and the transition to module.css significantly improve code clarity and maintainability.
ed9dfca
2d9b1b2 to
f1d942f
Compare
|
|
|
Fixed responisive mentioned in the comments, and the filter in darkmode |
|
Thank you all, merging! |


























Description
Fixes # (Bug from #3829)
Related PRS (if any):
This frontend PR is related to the development backend branch
…
Main changes explained:
…
How to test:
npm installand...to run this PR locally/pr-team-analytics/reviewers-stacked-bar-chartScreenshots or videos of changes:
Note