Merged
Conversation
Fix mentee registration form (#248)
…tions Shared Zod schemas (technicalAreaProficiency, languageProficiency, mentorshipFocusArea, country, network) were duplicated verbatim between mentorSchema.ts and menteeSchema.ts, so any enum change required editing two files and risked silent divergence. These are extracted into a new commonSchema.ts with dedicated unit tests. Hardcoded option arrays (spoken languages, experience levels, filter options) scattered across form components are consolidated into named exports in mentorshipConstants.ts. New technical areas (Security, SRE, Network Engineering) and technologies (Bash, Terraform, HCL, Scala, Swift, Dart, Rego, YAML, OpenTofu) are added to reflect a broader range of mentor skills. UI labels updated from "Programming languages" to "Technologies & Languages" to accurately reflect the expanded list.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Mentorship registration forms previously defined Zod schemas and option arrays inline and independently in both
menteeSchema.tsandmentorSchema.ts, leading to duplication and divergence. This PR introducessrc/schemas/commonSchema.tsas the single source of truth for shared schemas (technicalAreaSchema,technicalLanguageSchema, proficiency schemas,countrySchema,networkSchema,mentorshipFocusAreaSchema), and consolidates all UI option arrays intomentorshipConstants.ts. It also expands the available tech areas (Security, SRE, Network Engineering) and languages (Bash, Dart, HCL, Scala, Swift, Terraform, OpenTofu, Rego, YAML) to align with the backend changes introduced in Women-Coding-Community/wcc-backend#563. Implements the frontend counterpart of Women-Coding-Community/wcc-backend#559.Type
Related Issue
Women-Coding-Community/wcc-backend#559
Related backend PR: Women-Coding-Community/wcc-backend#563
Screenshots
Testing
Unit tests added:
src/schemas/__tests__/commonSchema.test.ts— coverstechnicalAreaSchema,technicalLanguageSchema, proficiency schemas,countrySchema,networkSchema, andmentorshipFocusAreaSchemaincluding the newly added enum valuesManual testing steps:
/mentorship/mentors— verify the experience filter still works correctlyPull request checklist