-
Notifications
You must be signed in to change notification settings - Fork 406
feat(clerk-js): Introduce development modal to enable organizations #7159
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 5aebc26 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
2014336 to
c9c9e99
Compare
c9c9e99 to
b8fb3db
Compare
b8fb3db to
06a951f
Compare
06a951f to
c990467
Compare
c990467 to
9ade3ae
Compare
8953897 to
a3f9bed
Compare
a3f9bed to
c145bf9
Compare
c145bf9 to
b456c24
Compare
b456c24 to
81ce300
Compare
81ce300 to
b2b3ad4
Compare
| }; | ||
|
|
||
| componentsControls.openModal = (name, props) => { | ||
| // Prevent opening enableOrganizations prompt if it's already open |
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.
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.
Our components also use organizations hooks internally, and therefore prompting with it would cause developers to be confused: "i've rendered OrganizationSwitcher but the prompt is mentioning useOrganization"
So I believe it makes sense to open the prompt on the first call and avoid updating the state afterwards.
315bb10 to
8724eea
Compare
8724eea to
51fbac8
Compare
51fbac8 to
26647c0
Compare
|
Here's a video of the current state of the UI: Area.mp4 |
| caller, | ||
| // Reload current window to all invalidate all resources | ||
| // related to organizations, eg: roles | ||
| onSuccess: () => window.location.reload(), |
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.
There's still some delay in which the window is reloading and the screen kepts showing a blank state without having the component mounted due to the stale environment data.
I'm thinking of applying an optimistic update, at least on the "enabled" status, to have the components mounted meanwhile, or not closing the modal and introduce a loading status until the window gets reloaded.
26647c0 to
ca50670
Compare
ca50670 to
2f15b24
Compare
2f15b24 to
8635ede
Compare
da837ec to
7a03be4
Compare
|
Waiting on https://github.com/clerk/clerk_go/pull/14838/files to be merged to send a |
6662001 to
5aebc26
Compare

Description
This PR allows developers to enable the organization's featureset in-app instead of having to go to the Clerk Dashboard, decreasing friction to build B2B apps.
The prompt only appears for development instances only.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change