Skip to content

Siri Sudheeksha Vavila: Fix hgn questionnaire skill filter user details#5205

Merged
one-community merged 12 commits into
developmentfrom
fix-hgn-questionnaire-skill-filter-user-details
May 14, 2026
Merged

Siri Sudheeksha Vavila: Fix hgn questionnaire skill filter user details#5205
one-community merged 12 commits into
developmentfrom
fix-hgn-questionnaire-skill-filter-user-details

Conversation

@sirisudheeksha
Copy link
Copy Markdown
Contributor

Description

image

Fixes the TopCommunityMembers component as it was not displaying any member data after selecting a skill from the dropdown, and navigating to the Community Members page via "Show your team members" required manually re-selecting filters before any members would appear.

Root causes:

TopCommunityMembers was calling /userProfile/skills/:skill and /team-skills/:skill — endpoints that return empty arrays for most users because they depend on HGN form responses being linked to the logged-in user's team. Members were never shown.
The "Show your team members" link navigated to /hgnhelp/community with no state, so CommunityMembersPage started with no filters selected, hiding the member list entirely.

Related PRS (if any):

This frontend PR is related to PR 4214

Main changes explained:

  • Update TopCommunityMembers.jsx — switched from the non-functional /userProfile/skills/:skill and /team-skills/:skill endpoints to GET /hgnform/ranked?skills=skill, the same endpoint already used by CommunityMembersPage/RankedUserList that returns live data. Simplified normalizeMember and scoreOf helpers to match the actual response shape (name, email, slack, score). Updated "Show your team members" Link to pass { state: { initialSkills: [selectedSkill] } } to the community page.
  • Update CommunityMembersPage.jsx — reads location.state?.initialSkills on mount via useLocation() and uses it to pre-populate selectedSkills, so the member list renders immediately without requiring the user to re-select filters.
  • Update URL.js— added HGN_FORM_GET_TEAM_MEMBERS_BY_SKILL and HGN_FORM_GET_TEAM_MEMBERS_BY_SKILL_FALLBACK constants (earlier commits; superseded by the final fix using HGN_FORM_RANKED).

How to test:

  1. Check out branch fix-hgn-questionnaire-skill-filter-user-details
  2. Run npm install then npm run start:local
  3. Clear site data / cache in the browser
  4. Log in as any user (volunteer or admin)
  5. Navigate to /topcommunityembers
  6. Verify: selecting a skill from the dropdown (e.g. HTML) immediately populates the table with ranked members — Name, Email, Slack ID, Phone Number, and Skill Score
  7. Click "Show your team members >"
  8. Verify: the Community Members page opens with the same skill already selected as an active filter and the member cards display immediately — no manual re-selection required
  9. verify this new feature works in dark mode

Screenshots or videos of changes:

Before:

image

After :

image image image

Note:

Include the information the reviewers need to know.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 28, 2026

Deploy Preview for highestgoodnetwork-dev ready!

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

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

I tested this PR locally. Functionality works as expected. The UI of the Top Community Members page can be improved and the dark mode alignment on the Community Members page needs to be fixed.

Image Image Image Image Image

Copy link
Copy Markdown

@rajanidi1999 rajanidi1999 left a comment

Choose a reason for hiding this comment

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

Hi,
I have tested your PR locally and everything is working as expected but in dark mode visibility is need to be fixed
Image

Image

Siri Sudheeksha Vavila added 6 commits May 6, 2026 10:43
- Pass darkMode prop to SkillFilterButtons and PreferenceFilterButtons so
  filter buttons render with dark styling in dark mode
- Add dark border and dark background for accordion border and content area
  in CommunityMembersPage.module.css
- Remove hardcoded white background from .userWrapper in RankedUserList.module.css
  so dark mode background shows through correctly
@sirisudheeksha sirisudheeksha dismissed stale reviews from rajanidi1999 and HemanthNidamanuru May 7, 2026 18:28

fixed the changes and requested re- review

@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

@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.

Thank you for working on this PR. Functionality works as expected and the Community Members page dark mode alignment looks good now.
One remaining issue:

"Top 15 Community Members" page UI needs improvement. The layout and styling can be enhanced for better visual consistency and usability

Image Image

@sirisudheeksha sirisudheeksha dismissed HemanthNidamanuru’s stale review May 9, 2026 22:56

fixed the "Top 15 Community Members" page UI and the layout and styling

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

I tested this PR locally. Functionality works as expected and the dark mode alignment on the Community Members page looks good. One remaining issue though, the table borders in the "Top 15 Community Members" section are not properly aligned with the table structure in dark mode. Please fix the border alignment so they line up correctly with the table rows and columns.

Image

@sonarqubecloud
Copy link
Copy Markdown

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

Thank you for working on improvements. Everything looks good now.

Image

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit d66d134 into development May 14, 2026
10 checks passed
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