-
Notifications
You must be signed in to change notification settings - Fork 475
feat(ui): show provider logo on enterprise connection chooser #9895
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
NicolasLopes7
merged 3 commits into
main
from
nicolas/enterprise-connection-chooser-logo
Sep 24, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@clerk/ui': patch | ||
| '@clerk/clerk-js': patch | ||
| '@clerk/shared': patch | ||
| '@clerk/localizations': patch | ||
| --- | ||
|
|
||
| Show the provider logo next to each connection name on the enterprise account chooser. |
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
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
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
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
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
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
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
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
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
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
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
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
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
60 changes: 60 additions & 0 deletions
60
packages/ui/src/components/SignIn/__tests__/SignInFactorOneEnterpriseConnections.test.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import { describe, expect, it } from 'vitest'; | ||
|
|
||
| import { bindCreateFixtures } from '@/test/create-fixtures'; | ||
| import { render, screen } from '@/test/utils'; | ||
|
|
||
| import { SignInFactorOne } from '../SignInFactorOne'; | ||
|
|
||
| const { createFixtures } = bindCreateFixtures('SignIn'); | ||
|
|
||
| describe('SignInFactorOneEnterpriseConnections', () => { | ||
| it('renders each connection with its logo, or its initial when there is no logo', async () => { | ||
| const { wrapper } = await createFixtures(f => { | ||
| f.withEmailAddress(); | ||
| f.startSignInWithEnterpriseSSO({ | ||
| enterpriseConnections: [ | ||
| { | ||
| id: 'conn_msft', | ||
| name: 'Microsoft Engineering', | ||
| logoPublicUrl: 'https://img.clerk.com/msft.png', | ||
| provider: 'saml_microsoft', | ||
| }, | ||
| { id: 'conn_okta', name: 'Okta', provider: 'saml_okta' }, | ||
| ], | ||
| }); | ||
| }); | ||
|
|
||
| render(<SignInFactorOne />, { wrapper }); | ||
|
|
||
| await screen.findByText('Choose an account'); | ||
| screen.getByText('Select an enterprise account to continue.'); | ||
|
|
||
| const logo = screen.getByLabelText("Microsoft Engineering's icon"); | ||
| expect(logo).toHaveStyle({ backgroundImage: 'url(https://img.clerk.com/msft.png)' }); | ||
| expect(logo).toHaveClass('cl-providerIcon__microsoft'); | ||
|
|
||
| const oktaButton = screen.getByRole('button', { name: /Okta/ }); | ||
| expect(oktaButton.querySelector('.cl-socialButtonsProviderInitialIcon__okta')).toHaveTextContent('O'); | ||
| expect(screen.queryByLabelText("Okta's icon")).not.toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it('renders the logo and initial when the backend omits the provider', async () => { | ||
| const { wrapper } = await createFixtures(f => { | ||
| f.withEmailAddress(); | ||
| f.startSignInWithEnterpriseSSO({ | ||
| enterpriseConnections: [ | ||
| { id: 'conn_msft', name: 'Microsoft Engineering', logoPublicUrl: 'https://img.clerk.com/msft.png' }, | ||
| { id: 'conn_okta', name: 'Okta' }, | ||
| ], | ||
| }); | ||
| }); | ||
|
|
||
| render(<SignInFactorOne />, { wrapper }); | ||
|
|
||
| const logo = await screen.findByLabelText("Microsoft Engineering's icon"); | ||
| expect(logo).toHaveStyle({ backgroundImage: 'url(https://img.clerk.com/msft.png)' }); | ||
|
|
||
| const oktaButton = screen.getByRole('button', { name: /Okta/ }); | ||
| expect(oktaButton.querySelector('.cl-socialButtonsProviderInitialIcon')).toHaveTextContent('O'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
馃搻 Maintainability & Code Quality | 馃數 Trivial | 馃挙 Low value
馃攷 Supported by static analysis
馃弫 Script executed:
Repository: clerk/javascript
Length of output: 3231
Declare the exported helper鈥檚 return type.
The TypeScript guideline requires explicit return types for public APIs. Add
: OAuthProvidertogetEnterpriseProviderIconId.Suggested fix
馃摑 Committable suggestion
馃 Prompt for AI Agents