-
Notifications
You must be signed in to change notification settings - Fork 253
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
feat(clerk-js): Update ui of OrganizationSwitcher to better match OrganizationList #1675
Conversation
🦋 Changeset detectedLatest commit: c38aed5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
04f4673
to
2630755
Compare
@@ -1,3 +1,5 @@ | |||
import type { ClerkPaginatedResponse } from '@clerk/types'; |
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.
❓ Should we add tests for these utils?
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.
Yes please
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 couldn't get this to work with swr, so i decoupled the helpers and tested those instead.
@@ -1,3 +1,5 @@ | |||
import type { ClerkPaginatedResponse } from '@clerk/types'; |
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.
Yes please
...common.unstyledScrollbar(t), | ||
})} | ||
> | ||
{(userInvitations?.count ?? 0) > 0 && |
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.
Can we have a top-level condition to avoid the repeated use of .?
?
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.
userInvitations will always be defined, but count may be undefined so I will change this to
{(userInvitations.count ?? 0) > 0 &&
Do you believe that the default returned value for userInvitations.count
should be 0 instead of undefined ?
|
||
{(userSuggestions?.count ?? 0) > 0 && | ||
!userInvitations?.hasNextPage && | ||
userSuggestions?.data?.map(suggestion => { |
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.
Same
…anizationList As part of this commit, was also some refactoring of duplicate code between the list of suggestions and invitations
449db4e
to
c38aed5
Compare
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Type of change
Packages affected
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/types
@clerk/themes
@clerk/localizations
@clerk/clerk-expo
@clerk/backend
@clerk/clerk-sdk-node
@clerk/shared
@clerk/fastify
@clerk/chrome-extension
gatsby-plugin-clerk
build/tooling/chore
Description
npm test
runs as expected.npm run build
runs as expected.This PR implements the following UI
figma
commits