-
Notifications
You must be signed in to change notification settings - Fork 285
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: Added support to sidebar #2119
base: main
Are you sure you want to change the base?
Conversation
|
@harshsbhat is attempting to deploy a commit to the Unkey Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughWalkthroughThe changes introduce a new Changes
Assessment against linked issues
Possibly related PRs
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 (
|
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 (3)
apps/dashboard/components/dashboard/feedback-component.tsx (3)
1-22
: Looks good! Consider grouping the imports for better readability.The imports are correctly used and cover all the necessary dependencies. However, consider grouping them based on their origin (e.g., separate groups for
@/components
,@/lib
, external libraries) to improve readability.
23-53
: The component logic is well-structured. Consider adding error handling for thetrpc
mutation.The component manages the dialog state and form handling correctly. The usage of
react-hook-form
andzod
for form validation is a good practice.However, consider adding error handling for the
trpc
mutation to handle potential network or server errors gracefully. You can use theonError
callback of theuseMutation
hook to display an error message to the user.
55-157
: The JSX is properly structured. Consider extracting the form fields into separate components.The JSX correctly renders the feedback dialog and form. The usage of custom UI components enhances the consistency and reusability of the code.
However, the form fields (
issueType
,severity
,message
) are quite verbose and contain similar logic. Consider extracting them into separate components (e.g.,IssueTypeField
,SeverityField
,MessageField
) to improve maintainability and reduce duplication.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- apps/dashboard/app/(app)/desktop-sidebar.tsx (5 hunks)
- apps/dashboard/components/dashboard/feedback-component.tsx (1 hunks)
Additional comments not posted (5)
apps/dashboard/app/(app)/desktop-sidebar.tsx (5)
2-2
: LGTM!The import statement for the
Feedback
component is correctly added.
41-41
: LGTM!The modification to the
icon
property in theNavItem
type is a good change. It allows using custom React components as icons, providing more flexibility in the sidebar navigation.
50-65
: LGTM!The
DiscordIcon
component is correctly implemented as a functional component. The SVG code for the Discord logo is properly included, and the component can be used in other parts of the codebase.
148-153
: LGTM!The "Discord" navigation item is correctly added to the
resourcesNavigation
array. It uses theDiscordIcon
component as the icon and links to the external Discord URL. Theexternal
property is properly set totrue
to open the link in a new tab.
202-204
: LGTM!The
Feedback
component is correctly included as a list item within the "Resources" section of the sidebar. This provides users with convenient access to the feedback functionality.
I have created a new component for the sidebar because it was not allowing me to use |
What does this PR do?
Fixes #2095
Adds the support options to side bar
Type of change
Checklist
Required
pnpm build
pnpm fmt
console.logs
git pull origin main
Appreciated
Summary by CodeRabbit