Skip to content
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

refacto(auth): Simplify workspace lookup and cleanup UI logic #9160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AMoreaux
Copy link
Contributor

Streamlined workspace selection by defaulting to the first available workspace. Adjusted conditional rendering for a separator between authentication providers, improving clarity and reducing redundancy. Minor formatting changes were also applied for consistency.

Close #9094

@AMoreaux AMoreaux self-assigned this Dec 20, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR fixes the horizontal separator visibility in the authentication form by correcting conditional rendering logic when SSO providers are disabled.

  • Fixed logical error in SignInUpGlobalScopeForm.tsx where {authProviders.google || (authProviders.microsoft && <HorizontalSeparator visible />)} incorrectly evaluates, causing separator to show when it shouldn't
  • Simplified workspace selection by defaulting to first available workspace instead of looking up default workspace ID
  • Improved code readability by removing unnecessary whitespace and parentheses in conditional statements
  • Added proper type checking for SSO providers array before mapping in SignInUpSSOIdentityProviderSelection.tsx

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Streamlined workspace selection by defaulting to the first available workspace. Adjusted conditional rendering for a separator between authentication providers, improving clarity and reducing redundancy. Minor formatting changes were also applied for consistency.
@AMoreaux AMoreaux force-pushed the fix/hide-separator-when-sso-is-disable branch from 09fa999 to 4f7d25d Compare December 20, 2024 09:22
@AMoreaux AMoreaux changed the title [refactor](auth): Simplify workspace lookup and cleanup UI logic refacto(auth): Simplify workspace lookup and cleanup UI logic Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Horizontal line on login page when no SSO providers are selected
1 participant