-
Notifications
You must be signed in to change notification settings - Fork 537
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
fix: use workspace name in team switcher #2719
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
📝 WalkthroughWalkthroughThe changes in this pull request involve modifications to the Changes
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 (
|
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)/desktop-sidebar.tsx (1)
Line range hint
69-71
: Fix typo in tooltip textThere's a spelling error in the tooltip text.
- Your plan is schedueld to be downgraded to the {workspace.planDowngradeRequest} tier + Your plan is scheduled to be downgraded to the {workspace.planDowngradeRequest} tier
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
apps/dashboard/app/(app)/desktop-sidebar.tsx
(1 hunks)apps/dashboard/app/(app)/mobile-sidebar.tsx
(1 hunks)apps/dashboard/app/(app)/team-switcher.tsx
(3 hunks)
🔇 Additional comments (4)
apps/dashboard/app/(app)/team-switcher.tsx (2)
25-29
: LGTM: Clean Props type definition
The Props type is well-defined and properly scoped to only include the required workspace name field.
71-71
: Verify workspace name usage consistency
The workspace name is now consistently used across all display locations. However, let's verify there are no other instances of workspace name usage that might have been missed.
Also applies to: 79-79, 88-88, 92-92
✅ Verification successful
Workspace name usage is consistent across the codebase
The verification shows that workspace name is consistently used as props.workspace.name
in team-switcher.tsx and workspace.name
in the update form component. The only instance of currentOrg.name
is in a different context (Vercel callback) where it's used appropriately as a fallback for the profile picture alt text. No inconsistencies were found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any remaining instances of currentOrg.name or similar patterns
rg -A 2 "currentOrg\.(name|imageUrl)" apps/dashboard/
Length of output: 679
Script:
#!/bin/bash
# Let's check for all workspace name usages to ensure consistency
rg -A 2 "workspace\.name" apps/dashboard/
Length of output: 1682
apps/dashboard/app/(app)/desktop-sidebar.tsx (1)
57-57
: LGTM: Proper workspace prop passing
The workspace prop is correctly passed to the WorkspaceSwitcher component.
apps/dashboard/app/(app)/mobile-sidebar.tsx (1)
38-38
: LGTM: Proper workspace prop passing
The workspace prop is correctly passed to the WorkspaceSwitcher component, maintaining consistency with the DesktopSidebar implementation.
name: string; | ||
}; | ||
}; | ||
export const WorkspaceSwitcher: React.FC<Props> = (props): JSX.Element => { |
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.
export const WorkspaceSwitcher: React.FC<Props> = (props): JSX.Element =>
It's a nitpick but maybe just this 👇🏻 ?
export const WorkspaceSwitcher = (props: Props) =>
Summary by CodeRabbit
New Features
WorkspaceSwitcher
component in bothDesktopSidebar
andMobileSideBar
to receive workspace context for improved functionality.WorkspaceSwitcher
to consistently display the correct workspace name.Bug Fixes
These changes improve user experience by providing relevant workspace information and ensuring accurate messaging throughout the application.