-
Notifications
You must be signed in to change notification settings - Fork 32
Feat/mentor registration #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat/mentor registration #216
Conversation
- Set up react-hook-form/zod resolver - navigation logic
…bile layout according to figma for step 1
…hah/wcc-frontend into feat/mentor-registration
| <Grid container spacing={2}> | ||
| <Grid item xs={12} sm={6}> | ||
| <TextField select fullWidth label="Country" defaultValue="" {...register("country")} error={!!errors.country} helperText={errors.country?.message as string}> | ||
| <MenuItem value="United Kingdom">United Kingdom</MenuItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you use something like this: https://github.com/Women-Coding-Community/wcc-backend/pull/422/changes#diff-2d76955f9febfba0d43a126354b7e0ea76522338691db9c3d08c2c52f7a1be85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted country list to mentorshipConstants.ts
| <RadioGroup {...field}> | ||
| <FormControlLabel value="linkedin" control={<Radio sx={{ '&.Mui-checked': { color: 'black' } }} />} label="Linked In" /> | ||
| <FormControlLabel value="slack" control={<Radio sx={{ '&.Mui-checked': { color: 'black' } }} />} label="Slack" /> | ||
| <FormControlLabel value="other" control={<Radio sx={{ '&.Mui-checked': { color: 'black' } }} />} label="Image link from a public profile" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This are is duplicated in the form, from the screenshot. I think you can keep the second option when you add the link you want us to use. As the first step, but I need to adjust the backend, because now we are asking to upload the file, would that be too much problem for you do do? @stepsen89
Please check the mentor registration for to confirm the current attributes
|
|
||
| <Box component="ul" sx={{ pl: 2, mb: 2, typography: 'body2', color: 'text.primary' }}> | ||
| <li style={{ marginBottom: '8px' }}> | ||
| Have read and agree to the <Link href="https://www.womencodingcommunity.com/code-of-conduct" target="_blank" rel="noopener noreferrer" underline="always" sx={{ color: 'custom.linkBlue' }}>code of conduct</Link>{' '} and the {' '}<Link href="https://www.womencodingcommunity.com/mentorship-code-of-conduct" target="_blank" rel="noopener noreferrer" underline="always" sx={{ color: 'custom.linkBlue' }}>mentorship code of conduct</Link>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL needs to be dynamic or in the context of the website from code of conduct page of mentorship.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from hardcoded external URLs to relative paths
Links now point to /code-of-conduct and /mentorship/code-of-conduct
|
|
||
| else if (activeStep === 5) { | ||
| isStepValid = await formMethods.trigger([ | ||
| 'linkedin', 'github', 'instagram', 'medium', 'website', 'otherSocial', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LinkedIn is the only mandatory attribute for social media.
| isLongTermMentor: z.boolean().optional(), | ||
| isAdHocMentor: z.boolean().optional(), | ||
|
|
||
| maxMentees: z.string().optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review the mentor registration to align with the requested and mandatory attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add dynamic country dropdown using COUNTRIES constant - Update code of conduct links
- Update 'home.page.spec.ts' to assert the correct page title ('WCC: Registration Form for Mentors') following the UI from figma design.
- Fix a Next.js serialization error in timeline pages (e.g., 'long-term-timeline.tsx').
- Ensure 'getServerSideProps' returns 'null' instead of 'undefined' when API data is missing, preventing Status 500 crashes during the test run.
|




Description
Implements the frontend UI and Zod validation for the new Mentor Registration flow (Steps 1-5).
Changes
react-hook-form,zod, and MUI.theme.tsfor consistent branding.Notes
How to Test
/mentorship/mentor-registration.Type
Related Issue
Closes #84
Screenshots
Testing
Pull request checklist
Please check if your PR fulfills the following requirements: