Skip to content

Linlin fix promote buttons under reviewer name - #5491

Open
linlin-husky wants to merge 10 commits into
developmentfrom
Linlin-fix-promote-buttons-under-reviewer-name
Open

Linlin fix promote buttons under reviewer name#5491
linlin-husky wants to merge 10 commits into
developmentfrom
Linlin-fix-promote-buttons-under-reviewer-name

Conversation

@linlin-husky

@linlin-husky linlin-husky commented Sep 2, 2026

Copy link
Copy Markdown
image image Screenshot 2026-09-03 at 9 25 03 AM

Description

Fixes # (PRIORITY URGENT) — PR Review Team Analytics Dashboard: Finishing Followup fixes for the PR 5152. Fix Promote buttons are not under each reviewer name issue.
This PR fixes the layout defect where the Promote button was not rendering under each reviewer's name on the PR Grading screen. It refactors the component structure into a modular MVC pattern, anchors the button directly beneath each reviewer's name, improves confirmation modal styling and hover transitions, and resolves dark mode table contrast issues.

Related PRS (if any):

Main changes explained:

  • Created ReviewerCell.jsx to bundle each reviewer's name and corresponding 🏆 Promote / ✅ Promoted button in a dedicated vertical flex column container directly under the reviewer name column.
  • Created PRGradingView.jsx to separate presentational UI (search filters, reviewer table, modals) from screen logic following MVC architecture.
  • Created usePRPromotion.js custom hook to isolate promotion state management and dynamically evaluate weeklyPRs for accurate consistency indicators (✅ Consistent vs ⚠️ Inconsistent).
  • Updated PRGradingScreen.jsx to act strictly as a controller coordinating data fetching, filtering, and passing callbacks into the view layer.
  • Updated PromotionConfirmationBox.jsx and PRGradingScreen.module.css to migrate inline button styling into modular CSS classes, add smooth :hover transitions, increase footer spacing, and maintain legible background contrasts in dark mode.

How to test:

  1. Check into branch Linlin-fix-promote-buttons-under-reviewer-name
  2. Run npm install and start the frontend locally with npm run start:local
  3. Clear site data/cache
  4. Log in as admin user (devadmin@hgn.net / DeveloperPassword100%!)
  5. Navigate to: Other LinksPR Team Analytics (or open http://localhost:5173/pr-grading-screen)
  6. Verify the 🏆 Promote button appears centered directly under each reviewer's name in the first column.
  7. Click the 🏆 Promote button under any reviewer:
    • Confirm the confirmation modal opens displaying reviewer details, team name, and weekly PR statistics table.
    • Verify dynamic consistency calculation: reviewers with adequate weekly counts show ✅ Consistent, while reviewers below requirements show ⚠️ Inconsistent.
    • Hover over Cancel and Confirm Promotion buttons to verify smooth hover effects and proper spacing.
  8. Click Confirm Promotion and verify the modal closes and the reviewer button updates to ✅ Promoted (disabled).
  9. Toggle into dark mode and verify that table rows, text, inputs, buttons, and the confirmation popup maintain readable contrast and proper styling.

Screenshots or videos of changes:

Screenshot 2026-09-02 at 11 38 04 AM Screenshot 2026-09-02 at 11 33 43 AM Screenshot 2026-09-02 at 11 42 34 AM (2) Screenshot 2026-09-02 at 11 40 52 AM

Note:

  • Backend endpoints (GET /api/promotion-details/:reviewerId and POST /promote-members) were already implemented — no backend changes were required for this task.
  • The promotion confirmation modal uses reviewer data from the endpoint with graceful fallback to local data from the grading screen so the UI never breaks.
  • The consistency flag (✅ Consistent / ⚠️ Inconsistent) is a visual indicator only and does not block the admin from confirming a promotion, which is intentional per task requirements.
  • The ✅ Promoted state is session-only (resets on page refresh); database persistence is out of scope for this task.
  • All styles strictly follow modular CSS (PRGradingScreen.module.css) to avoid generic global CSS class pollution.

akv-iu and others added 3 commits August 13, 2026 22:52
The donut center is an absolutely positioned HTML overlay whose spacing was
tuned with offsets that reserve no layout space. On the mentor chart a
translateY(6px) on the heading plus margin-top: -10px on the count left -2px
between their boxes; on the volunteer chart margin: 0 auto wiped the h2 bottom
margin, leaving 0px. Both collapse further because the font-size scales with
container width (cqw) while the offsets stayed fixed in px.

Delete the offsets and let a flex column gap do the spacing on both charts.
Measured heading-to-count gap goes from 0.0px / -2.0px to a uniform 6.0px,
including when the comparison line is shown.
Value and percentage are already shown permanently via the
externalLabelGuides canvas plugin. The default Chart.js tooltip
duplicated that info and rendered its dark box directly on top of the
external label on hover, reading as overlapping/garbled text.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit b09a02e
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a9b3b01c5002800088c2e76
😎 Deploy Preview https://deploy-preview-5491--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

@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 5, 2026
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.

3 participants