Skip to content

Conversation

@brionmario
Copy link
Member

@brionmario brionmario commented Nov 14, 2025

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/react and @asgardeo/react-router. The main changes are grouped below.

Screenshot 2025-11-14 at 22 56 38

Sign-up form enhancements:

  • Added support for rendering components of type SELECT in SignUpBox.tsx, including displaying options as dropdowns and handling related form logic. [1] [2] [3]

Dependency updates:

  • Upgraded @asgardeo/react to version 0.6.6 and @asgardeo/react-router to version 1.0.6 across 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 dropdown type from the SDK.

Related Issues

Related PRs

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Copilot AI review requested due to automatic review settings November 14, 2025 17:23
@brionmario brionmario added the skip-changelog Skip generating changelog for a particular PR label Nov 14, 2025
@brionmario brionmario enabled auto-merge November 14, 2025 17:27
@ThaminduDilshan ThaminduDilshan removed the skip-changelog Skip generating changelog for a particular PR label Nov 14, 2025
Copy link
Contributor

Copilot AI left a 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/react from version 0.6.5 to 0.6.6
  • Updated @asgardeo/react-router from 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

Comment on lines +189 to +193
{errors[component.config?.identifier] && (
<Typography variant="caption" color="error.main" sx={{mt: 0.5}}>
{errors[component.config?.identifier]}
</Typography>
)}
Copy link

Copilot AI Nov 14, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +166 to +169
<FormLabel htmlFor={component.config?.identifier}>
{component.config?.label}
</FormLabel>
<Select
Copy link

Copilot AI Nov 14, 2025

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
>
Suggested change
<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`}

Copilot uses AI. Check for mistakes.
Comment on lines +178 to +182
defaultValue=""
>
<MenuItem value="" disabled>
{component.config?.placeholder || 'Select an option'}
</MenuItem>
Copy link

Copilot AI Nov 14, 2025

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.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.77%. Comparing base (ba08f7e) to head (ed6f61b).
⚠️ Report is 3 commits behind head on main.

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              
Flag Coverage Δ
backend-combined-postgres 56.97% <ø> (ø)
backend-combined-sqlite 56.97% <ø> (ø)
backend-integration-postgres 56.97% <ø> (ø)
backend-integration-sqlite 56.97% <ø> (ø)
backend-unit 64.28% <ø> (+0.01%) ⬆️
frontend-apps-develop-unit 64.28% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brionmario brionmario merged commit 7dfd827 into asgardeo:main Nov 14, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants