-
Notifications
You must be signed in to change notification settings - Fork 402
chore(clerk-js): Remove secret key column in API keys component #7107
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
Merged
+867
−431
Merged
Changes from 30 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
5a9b906
chore(clerk-js): Remove key column in API keys component
wobsoriano 19a8085
chore: update callout text
wobsoriano 6587f25
Merge branch 'main' into rob/user-3698-remove-key-column
wobsoriano de27fdb
chore: Improve Alert component
wobsoriano 48d7896
remove console log
wobsoriano 817b8b5
chore: remove unused methods
wobsoriano 35016e7
chore: add locales
wobsoriano b4a8f1c
chore: use existing created api key data for alert
wobsoriano 0407380
test: remove obsolete tests and test alert with copy secret
wobsoriano c68a03b
chore: add changeset for clerk-js
wobsoriano 996c579
chore: add changeset for localizations
wobsoriano 51e5a68
chore: add changeset for backend
wobsoriano 4fb8000
test: fix secret
wobsoriano def5944
Merge branch 'main' into rob/user-3698-remove-key-column
wobsoriano 5ec60e9
chore: dedupe
wobsoriano 03a3651
chore(clerk-js): Switch to modal approach in API keys copying (#7134)
wobsoriano 17bbb98
chore: update changesets
wobsoriano d6fa9bc
chore: dedupe
wobsoriano ca40895
Merge branch 'main' into rob/user-3698-remove-key-column
wobsoriano 9209f76
chore: create reusable modal
wobsoriano a0838b1
chore: add jsdoc to secret property
wobsoriano be632c4
Merge branch 'main' into rob/user-3698-remove-key-column
wobsoriano b5254e8
chore: hide create form after modal closes
wobsoriano 4aeab7b
chore: add small delay before hiding create form
wobsoriano b0d3251
chore: update element IDs
wobsoriano 702f5a9
Merge branch 'main' into rob/user-3698-remove-key-column
wobsoriano c43295b
chore: revert backend change
wobsoriano 6fceef4
chore: fix tests
wobsoriano 9b30479
chore(clerk-js): Add missing locales for copy secret modal (#7160)
wobsoriano f352921
Update packages/localizations/src/nl-NL.ts
wobsoriano f223828
chore: Add missing formFieldLabel__apiKey translations
wobsoriano f7f4549
chore: apply mutation suggestions
wobsoriano e8992ae
Apply suggestion from @coderabbitai[bot]
wobsoriano 6537f6e
Apply suggestion from @coderabbitai[bot]
wobsoriano 020398f
Apply suggestion from @coderabbitai[bot]
wobsoriano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@clerk/localizations": minor | ||
| --- | ||
|
|
||
| Added localization entry for the API key copy modal component. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@clerk/clerk-js": minor | ||
| --- | ||
|
|
||
| Replaced the persistent key column in the API keys table with a one-time modal that displays the secret immediately after creation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/clerk-js/src/ui/components/ApiKeys/ApiKeyModal.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import React from 'react'; | ||
|
|
||
| import { Modal } from '@/ui/elements/Modal'; | ||
| import type { ThemableCssProp } from '@/ui/styledSystem'; | ||
|
|
||
| type ApiKeyModalProps = React.ComponentProps<typeof Modal> & { | ||
| modalRoot?: React.MutableRefObject<HTMLElement | null>; | ||
| }; | ||
|
|
||
| /** | ||
| * Container styles for modals rendered within a custom portal root (e.g., UserProfile or OrganizationProfile). | ||
| * When a modalRoot is provided, the modal is scoped to that container rather than the document root, | ||
| * requiring different positioning (absolute instead of fixed) and backdrop styling. | ||
| */ | ||
| const getScopedPortalContainerStyles = (modalRoot?: React.MutableRefObject<HTMLElement | null>): ThemableCssProp => { | ||
| return [ | ||
| { alignItems: 'center' }, | ||
| modalRoot | ||
| ? t => ({ | ||
| position: 'absolute', | ||
| right: 0, | ||
| bottom: 0, | ||
| backgroundColor: 'inherit', | ||
| backdropFilter: `blur(${t.sizes.$2})`, | ||
| display: 'flex', | ||
| justifyContent: 'center', | ||
| minHeight: '100%', | ||
| height: '100%', | ||
| width: '100%', | ||
| borderRadius: t.radii.$lg, | ||
| }) | ||
| : {}, | ||
| ]; | ||
| }; | ||
|
|
||
| export const ApiKeyModal = ({ modalRoot, containerSx, ...modalProps }: ApiKeyModalProps) => { | ||
| return ( | ||
| <Modal | ||
| {...modalProps} | ||
| portalRoot={modalRoot} | ||
| containerSx={[getScopedPortalContainerStyles(modalRoot), containerSx]} | ||
| /> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.