-
Notifications
You must be signed in to change notification settings - Fork 255
Enhance Gate app's SignUp component to support SELECT inputs
#767
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
Conversation
d9f4267 to
ed6f61b
Compare
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.
Pull Request Overview
This PR enhances the Gate app's sign-up form to support SELECT dropdown inputs and updates related dependencies. The implementation adds rendering logic for SELECT components alongside existing INPUT field handling, enabling dynamic form construction from server-provided configuration.
Key changes:
- Added SELECT dropdown support in the sign-up form with options rendering, error handling, and hint text display
- Updated
@asgardeo/reactfrom version 0.6.5 to 0.6.6 - Updated
@asgardeo/react-routerfrom version 1.0.5 to 1.0.6
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/pnpm-workspace.yaml | Updated catalog versions for @asgardeo dependencies |
| frontend/pnpm-lock.yaml | Synchronized lock file with updated dependency versions and peer dependencies |
| frontend/apps/thunder-gate/src/components/SignUp/SignUpBox.tsx | Added Select and MenuItem imports, extended form data collection to include SELECT inputs, and implemented SELECT component rendering with options, validation, and error display |
Files not reviewed (1)
- frontend/pnpm-lock.yaml: Language not supported
| {errors[component.config?.identifier] && ( | ||
| <Typography variant="caption" color="error.main" sx={{mt: 0.5}}> | ||
| {errors[component.config?.identifier]} | ||
| </Typography> | ||
| )} |
Copilot
AI
Nov 14, 2025
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.
The error message handling for SELECT inputs is inconsistent with INPUT fields. For INPUT fields (lines 230), errors are displayed using the helperText prop, but for SELECT inputs, errors are displayed using a separate Typography component. This creates an inconsistent user experience.
Consider using the FormHelperText component from MUI or displaying errors consistently across both input types.
| <FormLabel htmlFor={component.config?.identifier}> | ||
| {component.config?.label} | ||
| </FormLabel> | ||
| <Select |
Copilot
AI
Nov 14, 2025
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.
The Select component is missing the labelId prop which should reference the FormLabel. This is important for proper accessibility and semantic HTML structure. The FormLabel should also have an id attribute that matches the labelId prop of the Select.
Consider updating the code as follows:
<FormLabel id={`${component.config?.identifier}-label`} htmlFor={component.config?.identifier}>
{component.config?.label}
</FormLabel>
<Select
labelId={`${component.config?.identifier}-label`}
// ... other props
>| <FormLabel htmlFor={component.config?.identifier}> | |
| {component.config?.label} | |
| </FormLabel> | |
| <Select | |
| <FormLabel | |
| id={`${component.config?.identifier}-label`} | |
| htmlFor={component.config?.identifier} | |
| > | |
| {component.config?.label} | |
| </FormLabel> | |
| <Select | |
| labelId={`${component.config?.identifier}-label`} |
| defaultValue="" | ||
| > | ||
| <MenuItem value="" disabled> | ||
| {component.config?.placeholder || 'Select an option'} | ||
| </MenuItem> |
Copilot
AI
Nov 14, 2025
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.
The Select component uses defaultValue="" with a disabled placeholder option. However, HTML5 form validation may not work as expected because the disabled empty option can still be submitted as a valid value. For required SELECT fields, this could allow form submission without a valid selection.
Consider using a native <select> element for proper HTML5 validation, or implement custom validation logic to ensure required SELECT fields have a non-empty value before submission.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #767 +/- ##
==========================================
+ Coverage 82.75% 82.77% +0.01%
==========================================
Files 297 297
Lines 22950 22950
Branches 506 514 +8
==========================================
+ Hits 18993 18997 +4
+ Misses 2803 2799 -4
Partials 1154 1154
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Purpose
This pull request adds support for rendering select dropdown fields in the sign-up form and updates dependencies to the latest versions of
@asgardeo/reactand@asgardeo/react-router. The main changes are grouped below.Sign-up form enhancements:
SELECTinSignUpBox.tsx, including displaying options as dropdowns and handling related form logic. [1] [2] [3]Dependency updates:
@asgardeo/reactto version0.6.6and@asgardeo/react-routerto version1.0.6across the workspace and lock files to ensure compatibility and access to the latest features and fixes. [1] [2] [3] [4] [5] [6]Approach
Handled the
dropdowntype from the SDK.Related Issues
Sign Upsupport for theGateapplication #699Related PRs
Selectsupport forDROPDOWNtypes javascript#250Checklist
Security checks