-
Notifications
You must be signed in to change notification settings - Fork 282
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,types): Fetch custom roles and localize them #2004
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 |
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.
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
packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
Outdated
Show resolved
Hide resolved
!snapshot |
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 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; | ||
}; |
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.
nice!
packages/clerk-js/src/ui/components/OrganizationProfile/MemberListTable.tsx
Outdated
Show resolved
Hide resolved
packages/clerk-js/src/ui/components/OrganizationProfile/MemberListTable.tsx
Outdated
Show resolved
Hide resolved
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 test
runs as expected.npm run build
runs as expected.Type of change
Packages affected
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/clerk-expo
@clerk/fastify
gatsby-plugin-clerk
@clerk/localizations
@clerk/nextjs
@clerk/clerk-react
@clerk/remix
@clerk/clerk-sdk-node
@clerk/shared
@clerk/themes
@clerk/types
build/tooling/chore