Skip to content

Sayali: restore promote button visibility and persist promoted state after refresh#5239

Open
sayali-2308 wants to merge 2 commits into
developmentfrom
Sayali_Fix_Promotion_Button_Visibility
Open

Sayali: restore promote button visibility and persist promoted state after refresh#5239
sayali-2308 wants to merge 2 commits into
developmentfrom
Sayali_Fix_Promotion_Button_Visibility

Conversation

@sayali-2308
Copy link
Copy Markdown
Contributor

Description

Fixes reviewer-reported issue where the 🏆 Promote button was not visible on the PR Grading Screen after PR #5152 was merged. Also fixes "Error saving grades" error when using mock data, and adds localStorage persistence so promoted state survives page refresh.

Related PRS (if any):

Follow-up fix for PR #5152

Main changes explained:

  • Updated src/components/PRGradingScreen/PRGradingScreen.jsx — restored 🏆 Promote button and batch promotion checkboxes in the Reviewer Name column
  • Updated src/components/PRGradingScreen/PRGradingScreen.jsx — added localStorage persistence for confirmed promotions so Promoted state survives page refresh
  • Updated src/components/PRGradingScreen/PRGradingScreen.jsx — fixed "Error saving grades" error when using mock data (no teamCode available)

How to test:

  1. Check out branch Sayali_Fix_Promotion_Button_Visibility
  2. Run npm install and npm run start:local
  3. Clear site data/cache
  4. Log in as admin
  5. Navigate to localhost:5173/pr-grading-screen
  6. Verify Promote button is visible under each reviewer name
  7. Click Promote on any reviewer → verify confirmation modal opens
  8. Click Confirm Promotion → verify Promoted state shows
  9. Refresh the page → verify Promoted state persists
  10. Select multiple reviewers via checkboxes → verify "Promote Selected" bar appears
  11. Click Done → verify no "Error saving grades" error
  12. Verify dark mode works

Screenshots or videos of changes:

image

Note:

  1. The Promote button was missing after merge because the merged version of PRGradingScreen.jsx had updated code that didn't include the Promote button in the table rows.
  2. Promoted state is now persisted in localStorage keyed by team name so it survives refresh.
  3. "Error saving grades" was occurring because mock data uses simple IDs (not MongoDB ObjectIds) fixed by skipping the API save call when no teamCode is present.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 05204ae
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69febd6c736b76000877017c
😎 Deploy Preview https://deploy-preview-5239--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.

@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 May 8, 2026
Copy link
Copy Markdown

@kunchalasireesha kunchalasireesha left a comment

Choose a reason for hiding this comment

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

PR-5239.mov

Tested the flow everything is working as expected but I feel below changes are needed

  1. Both confirmation popups/modals are missing bottom spacing/padding, which makes the UI look cramped.
  2. In the “Select Multiple Reviewers” flow, the “Promote Selected” action bar appears at the bottom-right corner and overlaps/collides with the up-arrow button in the same position.
    • Suggestion: move the action bar to the top-right corner for better visibility and to avoid overlap.

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 Sayali,

Thank you for working on this PR. Everything works as expected.

One minor observation:

The confirmation modal overlaps with the arrow when multiple reviewers are selected. Please position the modal higher to avoid the overlap.

Image Image Image Image Image Image

@one-community one-community changed the title Sayali: restore promote button visibility and persist promoted state after refresh Sayali: 🔥 restore promote button visibility and persist promoted state after refresh May 8, 2026
@sayali-2308 sayali-2308 changed the title Sayali: 🔥 restore promote button visibility and persist promoted state after refresh Sayali: restore promote button visibility and persist promoted state after refresh May 9, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 9, 2026

@sayali-2308
Copy link
Copy Markdown
Contributor Author

Hi, resolved the merge conflict and fixed both issues: (1) repositioned the floating 'Promote Selected' bar higher (bottom: 80px) to avoid overlap, and (2) added padding to the confirmation modal footer so Cancel/Confirm buttons don't touch the edge. Please re-review PR #5239.

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.

4 participants