feat(clerk-js,types): Fetch custom roles and localize them#2004
feat(clerk-js,types): Fetch custom roles and localize them#2004panteliselef merged 8 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: bc8b4d6 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 |
chanioxaris
left a comment
There was a problem hiding this comment.
Let's add to any newly introduced resource and type the experimental tag as the feature is currently under active development
cbe3aea to
a83fa63
Compare
|
!snapshot |
dimkl
left a comment
There was a problem hiding this comment.
☁️ I will approve this PR since i don't have the context of this feature but i am kind of thinking that i will have a performance impact for all customers. Based on the test changes with this PR we introduce an API call in each of the the following components loading. Shouldn't we somehow make that call only for the customers that have the custom roles feature enabled or is it by default enabled for all customers?
| */ | ||
| roles: { | ||
| [r: string]: LocalizationValue; | ||
| }; |
Custom roles comes with the organization feature, every app from now on should fetch the roles as they are introduced dynamically per instance and stored in the DB. The "legacy" roles that continue to exist in the database are only there until FAPI starts serving all of our clients with custom roles. |
0d465db to
faac9bf
Compare
ba188b6 to
d4c7861
Compare
d4c7861 to
bc8b4d6
Compare
* feat(clerk-js,types): Fetch custom roles and localize them * test(clerk-js): Fetch custom roles and localize them * feat(clerk-js,types): Create PermissionResource * chore(clerk-js): Add changeset * chore(clerk-js): Add experimental tags * test(clerk-js): Add test case for displaying custom roles in select menu * chore(clerk-js): Improve types & add comments * chore(clerk-js): Address PR comments (cherry picked from commit 0293f29)
…2039) * feat(clerk-js,types): Fetch custom roles and localize them * test(clerk-js): Fetch custom roles and localize them * feat(clerk-js,types): Create PermissionResource * chore(clerk-js): Add changeset * chore(clerk-js): Add experimental tags * test(clerk-js): Add test case for displaying custom roles in select menu * chore(clerk-js): Improve types & add comments * chore(clerk-js): Address PR comments (cherry picked from commit 0293f29)
Description
This PR
InviteMembersPage&ActiveMembers.This PR will need to backported to v4 as it is complementary to "custom roles & permissions"
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/clerk-expo@clerk/fastifygatsby-plugin-clerk@clerk/localizations@clerk/nextjs@clerk/clerk-react@clerk/remix@clerk/clerk-sdk-node@clerk/shared@clerk/themes@clerk/typesbuild/tooling/chore