Purav fix PR promotion confirmation display box - #5499
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…torage and enhance dark mode styles for better visibility.
|
iAbhi001
left a comment
There was a problem hiding this comment.
All functional and visual test criteria have passed:
[x] Correct modal title displayed
[x] Default check on row checkboxes and master checkbox
[x] Columns labeled PR Reviewer, Team Code, Team Leader Name, and Weekly PRs
[x] Realistic leader names rendered without quotation marks
[x] VIBGYOR color spectrum applied to weekly PR badges
[x] Confirm removes selected users and shows success toast
[x] Unselected rows persist across page reload via localStorage
[x] Empty state reached after confirming all reviewers



Description
Follow-up UI fixes for the PR promotion confirmation modal from PR 3727. Jae tested in Dev and found default checkboxes unselected, weekly PR counts not in VIBGYOR circles, and the column labeled Team Reviewer Name with quote placeholders instead of Team Leader Name.
This PR updates the confirmation box so every reviewer starts selected, weekly PR counts render in rainbow-colored circles, and the column is Team Leader Name with readable names. Confirm removes checked people from the pending list; Cancel closes with no change.
Fixes follow-up for PR 3727 (PRIORITY HIGH): add right title, color, and checkbox on the PR Review Team Analytics promotion display box.
Related PRS (if any):
Frontend follow-up to #3727
No paired backend PR.
Main changes explained:
src/components/PRPromotions/DisplayBox.jsx: Default-check all pending reviewers, rename column to Team Leader Name / Weekly PRs, render weekly counts in VIBGYOR circles, disable Confirm while confirming or when nothing is selected, toast success/error, remove confirmed rows from the pending list.src/components/PRPromotions/DisplayBox.module.css: Clean VIBGYOR circle styles, visible checkboxes, dark mode contrast, and a responsive table layout.src/components/PRPromotions/pendingPromotionReviewers.js: Sample pending-promotion reviewers. Confirmed sample ids are stored in browser localStorage so a refresh keeps them off the list.src/components/PRPromotions/__tests__/DisplayBox.test.jsx: Coverage for default-checked boxes, titles, circles, Cancel, Confirm list updates, remount persistence, and empty remaining list.How to test:
Purav_fix_pr_promotion_display_boxon HighestGoodNetworkAppnpm installif dependencies changed (they did not in this PR)npm run start:local→ http://localhost:5173devadmin@hgn.net/DeveloperPassword100%!Screenshots or videos of changes:
pr.5499_video.mp4
Note:
This is a frontend-only follow-up for Jae's three UI notes on PR 3727 (default checkboxes, VIBGYOR weekly PR circles, Team Leader Name).
Persistence / backend (important for reviewers):
/promotion-eligibilitylist.pending-akshayare not real Mongo user ids, soPOST /api/promote-membersis not called (the API would 400).hgn.prPromotions.promotedReviewerIds). A refresh keeps confirmed people off the list on this browser only. Clearing site data restores the sample list.reviewerIds from eligibility into the box, then Confirm can callPOST /api/promote-memberswith{ memberIds, requestor }, which sets role to Promoted Reviewer. Team code, team leader name, and live weekly PR history still need backend fields (/promotion-details/:idcurrently 404s for real user ids).Jae merges; text Jae if this needs an urgent merge.