-
Notifications
You must be signed in to change notification settings - Fork 505
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: show disabled in the keys list if key is disabled #2645
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes in the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@harshsbhat is attempting to deploy a commit to the Unkey Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for following the naming conventions for pull request titles! 🙏 |
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/keys.tsx (1)
125-126
: Consider improving the visual hierarchy of the disabled statusWhile the implementation works correctly, consider these improvements for better UX:
- Use a more distinct badge variant (e.g., "destructive" or "outline") to make the disabled status more prominent
- Move the disabled status badge before the permissions/roles badges since it's a more critical piece of information
<Badge variant="secondary"> {Intl.NumberFormat(undefined, { notation: "compact" }).format(k.permissions)}{" "} Permission {k.permissions !== 1 ? "s" : ""} </Badge> + {!k.enabled && <Badge variant="destructive">Disabled</Badge>} + <Badge variant="secondary"> {Intl.NumberFormat(undefined, { notation: "compact" }).format(k.roles)} Role {k.roles !== 1 ? "s" : ""} </Badge> - - {!k.enabled && <Badge variant="secondary">Disabled</Badge>}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/keys.tsx
(3 hunks)
🔇 Additional comments (2)
apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/keys.tsx (2)
37-37
: LGTM: Type definition properly extended
The addition of the enabled
boolean property to KeysByOwnerId
type is correct and necessary for tracking key status.
52-52
: LGTM: Proper data mapping
The enabled
status is correctly mapped from the source data to the transformed object.
I was thinking about keeping the |
What does this PR do?
Displays
disabled
in the keys list after disabling them.Fixes #2632
Type of change
How should this be tested?
keys
tab. ( Make sure you have at least one key disabled. )Checklist
Required
pnpm build
pnpm fmt
console.logs
git pull origin main
Appreciated
Summary by CodeRabbit