-
Notifications
You must be signed in to change notification settings - Fork 291
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
chore(clerk-js): Sort organizations list alphabetically in OrganizationSwitcher #4241
Conversation
🦋 Changeset detectedLatest commit: f979cb7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
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.
Thanks @reinert!
We're aware that this experience can be improved. There's an upcoming feature on our roadmap to introduce search capabilities on OrganizationSwitcher
😄
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.
Hi @reinert! We need to perform some adjustments here to handle the server-side rendering case.
As @LauraBeatris mentioned, we will be improving the soon. That being said, we appreciate your efforts and for pushing us to improve the UX here. Here are the issues I see with the proposed solution from this PR:
Since this requires more changes to the codebase, I propose that we take over to ensure the issues above are resolved before shipping this to everyone. (We may need to make changes in parts that are not accessible to OSS contributors.) |
Thanks guys for the feedback. Do we have any ETA regarding those improvements in the OrganizationSwitcher component? This unsorted listing is causing us several issues like many tickets being submitted to our support channel. It's a daily pain for our back-office and a cost that's increasing exponentially. We really need an immediate workaround at least if we can't have a definitive solution soon. I really appreciate your timely response. In case this client-side sorting is not stable, I'd love to expose a prop to optionally enable sorted rendering (since we don't use pagination). |
Co-authored-by: Laura Beatris <[email protected]>
!snapshot |
Hey @panteliselef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact
npm i @clerk/[email protected] --save-exact |
@reinert I've cut a snapshot version for you to try. The pagination is used inside the component, but end-users will experience it only if they've joined more than 10 organizations. If you are using the |
Thank you @panteliselef. Do we have the ability to quickly lookup for one organization over several alternatives in this snapshot version? (otherwise pagination is going to cause even more pain in this scenario) |
This snapshot only includes the solution from this PR |
Oh, great, I got it. Thanks @panteliselef. Gonna try it out. |
@reinert We're working on a frontend API change to alphabetically order organization memberships by default. This should be shipped by the beginning of next week and it won't require updating your SDK code, just keep using |
Thanks for the feedback @LauraBeatris. Really appreciate the effort to solve this issue. |
May I close this PR? |
@reinert Closing this PR, I'll @ you here once those changes are deployed. |
@reinert We've deployed that change, could you give it a try and let us know? |
Description
<OrganizationSwitcher/>
displays the organizations in random order by default. It's annoying to find an organization over hundreds of randomly sorted options having no ability to search through them. This simple patch sorts the organization list alphabetically by default to make it feasible for the users to find an org when they have several alternatives.Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change