Skip to content

Jaden Taking Over for Peterson - Added improvements to the badge management page (DONE Jaden) - #3517

Open
peterson337 wants to merge 11 commits into
developmentfrom
peterson-implement-badge-management-darkmode-filter-test
Open

Jaden Taking Over for Peterson - Added improvements to the badge management page (DONE Jaden)#3517
peterson337 wants to merge 11 commits into
developmentfrom
peterson-implement-badge-management-darkmode-filter-test

Conversation

@peterson337

@peterson337 peterson337 commented May 13, 2025

Copy link
Copy Markdown
Contributor

Description

This PR improves the Badge Management - Badge Development page by styling the filter inputs, making filter label text white in dark mode, toggling the filter button label between "Add Filters" and "Remove Filters", and fixing alignment of the filter section in dark mode.

Jaden took over from Peterson to resolve a Node version mismatch (branch was authored against Node 14, project is on Node 20), fix a SonarQube cognitive complexity violation (score 16, max 15) by extracting module-level helper functions, and fix the filter section alignment issue flagged by reviewers.

Related PRs:

None

Main changes explained:

  • BadgeDevelopment.jsx - filter button label toggles between "Add Filters" / "Remove Filters"; filter label text uses text-light/text-dark for dark mode; filter rows use flexbox for proper alignment; filter logic extracted to module-level badgeMatchesFilters and normalize helpers to satisfy SonarQube complexity limit
  • BadgeDevelopment.module.css - new CSS module for filter section layout and input styling (replaces inline styles)
  • BadgeManagement.jsx - heading text uses text-light/text-dark for dark mode

How to test:

  1. Check out this branch
  2. Run npm install then npm start
  3. Clear site data/cache
  4. Log in as an admin or owner user
  5. Go to Other Links → Badge Management → Badge Development
  6. In light mode: click "Add Filters" - verify inputs are styled and button label changes to "Remove Filters" on click
  7. In dark mode: click "Add Filters" - verify filter label text is white and all filter rows are properly aligned

Note:

None

vod.mov

@peterson337 peterson337 added the do not review Do not review or look at code without full context label May 13, 2025
@netlify

netlify Bot commented May 13, 2025

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit b1f7334
🔍 Latest deploy log https://app.netlify.com/sites/highestgoodnetwork-dev/deploys/6823548c63eb0300081d90d5
😎 Deploy Preview https://deploy-preview-3517--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 site configuration.

@peterson337 peterson337 removed the do not review Do not review or look at code without full context label May 13, 2025

@vaibhavkoladiya vaibhavkoladiya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Checked out the current branch, ran npm install, and cleared site data before logging in as an admin user. Navigated to Other Links → Badge Management → Badge Development, activated dark mode, and tested the "Add Filters" button. Verified that the text color is white and the button label updates correctly when toggled. Everything works as expected — approving the PR.

Screenshot 2025-05-14 163806

@Anusha-Gali Anusha-Gali left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Peterson,

I tried to review your PR locally and was unable to do so cause of node version discrepancy.

Image

@netlify

netlify Bot commented Apr 14, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 064634a
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a6ffac5474bd80008246d94
😎 Deploy Preview https://deploy-preview-3517--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

Copy link
Copy Markdown

@peterson337
peterson337 requested a review from Anusha-Gali April 25, 2026 14:06

@HemanthNidamanuru HemanthNidamanuru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Peterson,

I tested this locally and the entire Badge Management filter section is not aligned properly in dark mode. The text color and button label changes need to be fixed for dark mode.

Image

Jaden300 added 2 commits July 18, 2026 18:20
Convert filter rows from inline paragraph + input to flex rows with
align-items: center so labels and inputs sit on the same baseline
in both light and dark mode.
@Jaden300 Jaden300 changed the title Peterson added improvements to the badge management page Jaden Taking Over for Peterson - Added improvements to the badge management page Jul 18, 2026
@Jaden300 Jaden300 changed the title Jaden Taking Over for Peterson - Added improvements to the badge management page Jaden Taking Over for Peterson - Added improvements to the badge management page (DONE Jaden) Jul 18, 2026
Jaden300 added 2 commits July 18, 2026 23:11
…velopment

- Replace inline style objects with getBoxStyling(darkMode) and .btn CSS class
- Extract getDark helper to eliminate repeated darkMode ternaries
- Precompute labelClass and inputClass to reduce JSX branching

@kzou55 kzou55 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Jaden,

I ran and tested the PR locally.

Verified

  • Add Filters button present
Image
  • Clicking "Add Filters" causes the search, filter by type, and filter by rank inputs to apear and the Remove Filters button is present

    Image
  • "Add Filters" button looks goo in Dark Mode

    Image

Issues

  • The inputs and the text are not applied in Dark Mode consistently.

    • The input field is white and doesn't have dark mode applied to it.
      • Note: The text is white for some of them which is correct but the issue is that the input field doesn't have dark mode applied to them making it difficult to see
    • The drop down for "Filter by type" also has dark mode issues
    • The "choose a rank" input's placeholder text is not white(doesn't have dark mode applied to it) and the input field for it(white box) needs to have dark mode applied to it
    Image
    Recording.2026-07-26.220130.mp4

@iAbhi001
iAbhi001 requested review from Anusha-Gali and iAbhi001 and removed request for Anusha-Gali July 28, 2026 01:23

@iAbhi001 iAbhi001 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi @Jaden300,

I tested the PR locally in dark mode and verified that the "Add Filters" button is present and functioning properly. However, there are a few dark mode styling inconsistencies with the input fields that need to be fixed before merging:

Input Field Backgrounds: The text input boxes remain white in dark mode while the typed text turns white, making the text unreadable against the background. Please apply dark mode styling to the input container backgrounds.

"Filter by Type" Dropdown: The dropdown menu options are missing dark mode styling and have contrast issues.

"Choose a Rank" Placeholder: The placeholder text isn't adapting to dark mode and lacks proper contrast against the input field.

Once these contrast/theme fixes are in place, this should be ready to go. Thanks!

Image Image Image

@DeepighaJ DeepighaJ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • Tested the PR locally, on clicking the button Add filter changes to Remove Filter and filter input loads.
  • The dark mode implementation needs improvement as they are not consistent across the inputs and the page.
  • On selecting/highlighting a row goes white in dark mode, makes text invisible.
Image Image Image

- Remove inline styles from buttons; move box-shadow to CSS module
- Add ::placeholder rule so placeholder text inherits white color in dark mode
- Add ::selection rule to fix invisible text when highlighting rows in dark mode
iAbhi001
iAbhi001 previously approved these changes Aug 2, 2026

@iAbhi001 iAbhi001 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Local Testing & PR Review

I checked out the branch and tested the changes locally on Node 20.

Verified:

  • Filter Toggle: The "Add Filters" button correctly toggles to "Remove Filters" and displays the search/filter controls as expected.
  • Dark Mode Input Styling: Checked the dark mode implementation across input fields, placeholders, and the "Filter by type" dropdown. Dark mode backgrounds apply correctly with readable text contrast.
  • Row Highlighting: Verified that selected/highlighted rows keep high contrast and readable text in dark mode without turning white.
  • Layout & Alignment: The filter section flexbox alignment renders cleanly in both Light and Dark modes.

All checks pass and all previously requested dark mode contrast issues have been resolved. LGTM! Approving the PR.

Image Image Image

@DeepighaJ DeepighaJ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested the PR locally, the dark mode issues are not fixed yet. The dropdown and hover still needs improvement.

Image Image

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants