Skip to content

feat: add mentorship type filter to mentors page (#284)#287

Merged
Sowmiya07 merged 1 commit into
Women-Coding-Community:mainfrom
IrynaLypnyk:feat/284-mentorship-type-filter
Jun 25, 2026
Merged

feat: add mentorship type filter to mentors page (#284)#287
Sowmiya07 merged 1 commit into
Women-Coding-Community:mainfrom
IrynaLypnyk:feat/284-mentorship-type-filter

Conversation

@IrynaLypnyk

Copy link
Copy Markdown
Contributor

Description

Added a mentorship type filter to the mentors page.

This allows users to filter mentors by mentorship type:

  • All
  • Long-term
  • Ad-hoc

The filter updates the page URL query and forwards the existing mentorshipTypes query parameter to the /api/mentors endpoint, which then passes it to the CMS mentors endpoint.

This solves issue #284.

Type

  • Bug Fix
  • New Feature
  • Code Refactor
  • Documentation
  • Other

Related Issue

Closes #284

Screenshots

Before / no mentorship type selected:

Screenshot 2026-06-25 at 13 28 02

Mentorship type dropdown options:

Screenshot 2026-06-25 at 13 22 27

Long-term filter selected and query forwarded to /api/mentors:

Screenshot 2026-06-25 at 13 24 45

Testing

Tested locally with API_KEY=local.

Verified:

  • the mentorship type filter is displayed on the mentors page
  • selecting Long-term updates the URL with mentorshipTypes=Long-Term
  • selecting Ad-hoc updates the URL with mentorshipTypes=Ad-Hoc
  • selecting All clears the mentorshipTypes query parameter
  • /api/mentors forwards the mentorshipTypes query parameter to the CMS mentors endpoint
  • verified via Swagger that the local CMS mentors endpoint accepts mentorshipTypes=Long-Term and mentorshipTypes=Ad-Hoc and returns 200 OK
Screenshot 2026-06-25 at 13 38 56 Screenshot 2026-06-25 at 13 34 44

The local CMS mentors endpoint currently returns an empty mentors list, so I tested the visible UI behaviour locally and verified the query/API flow separately.

  • Ran pnpm lint
  • Ran pnpm type-check
  • Ran pnpm test
  • Ran pnpm test:e2e:docker; Playwright reported existing unrelated failures in Become a Mentee content, Home mentor registration text, and Mentorship navigation URL expectations.

Pull request checklist

Please check if your PR fulfills the following requirements:

  • I checked and followed the contributor guide
  • I have tested my changes locally.
  • I have added a screenshot from the website after I tested it locally

@IrynaLypnyk IrynaLypnyk requested review from a team and womencodingcommunity as code owners June 25, 2026 11:09
@IrynaLypnyk IrynaLypnyk added the enhancement New feature or request label Jun 25, 2026
@IrynaLypnyk IrynaLypnyk self-assigned this Jun 25, 2026
@IrynaLypnyk

IrynaLypnyk commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

I checked the failing Playwright job.

The current failures appear to be unrelated to this PR:

  • becomeAMentee.page.spec.ts fails because of an existing text mismatch: Want to start a career... vs Want to start career...
  • home.page.spec.ts fails on missing Welcome to the MentorRegistrationPage text
  • navigation.page.spec.ts fails on an existing Mentorship navigation URL expectation

This PR only changes the mentors page filter and the /api/mentors query forwarding for mentorshipTypes.

I also reproduced the same Playwright failures locally with pnpm test:e2e:docker on this branch and on main, which suggests they are unrelated to the changes in this PR.

Unit tests passed with pnpm test.

@Sowmiya07 Sowmiya07 merged commit 2744197 into Women-Coding-Community:main Jun 25, 2026
2 of 5 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add mentorship type filter for mentors

2 participants