Skip to content

Chore: Integrate dropdown in teams sidebar#147

Merged
yesyash merged 4 commits intodevelopfrom
chore/integrated-team-dropdown
Jul 19, 2025
Merged

Chore: Integrate dropdown in teams sidebar#147
yesyash merged 4 commits intodevelopfrom
chore/integrated-team-dropdown

Conversation

@RishiChaubey31
Copy link
Contributor

@RishiChaubey31 RishiChaubey31 commented Jul 19, 2025

Date: 19-07-2025

Developer Name: Rishi Chaubey


Issue Ticket Number

Description

  • Integrated a dropdown in sidebar, clicking on which the team list appears
  • Added a seperator
  • added cursor pointer

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1 image image

Test Coverage

Screenshot 1

Additional Notes

Description by Korbit AI

What change is being made?

Integrate a dropdown menu in the teams sidebar to organize team-related actions, introduce collapsible functionality for team lists, and adjust button styling for "Add members".

Why are these changes being made?

These changes aim to enhance the user interface by improving the sidebar's usability and accessibility, making it more intuitive for users to navigate team options with collapsible sections. The addition of pointer cursor styling ensures buttons appear more interactive, providing consistent visual feedback.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@coderabbitai
Copy link

coderabbitai bot commented Jul 19, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Summary by CodeRabbit

  • New Features
    • Introduced an expandable and collapsible "Teams" section in the sidebar for improved navigation.
  • Style
    • Updated the appearance of "Create a team" and "Join a team" links with new hover and focus effects for better visual distinction.

Walkthrough

The AppSidebar component was updated to introduce a collapsible "Teams" group, with team links now rendered inside a collapsible section. "Create a team" and "Join a team" links are moved outside this group as separate entries, and new visual styles and icon toggling were added for improved UI interaction.

Changes

Files Change Summary
components/app-sidebar.tsx Refactored sidebar to use a collapsible "Teams" group, moved "Create a team" and "Join a team" links outside, updated imports, added local state for collapse, and enhanced UI with icons and styles.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AppSidebar
    participant Collapsible
    participant Router

    User->>AppSidebar: Open sidebar
    AppSidebar->>Collapsible: Render "Teams" group (collapsed/expanded)
    User->>Collapsible: Click "Teams" group
    Collapsible->>AppSidebar: Toggle open state
    AppSidebar->>Router: Highlight active team link
    AppSidebar->>User: Show "Create a team" and "Join a team" links separately
Loading

Possibly related PRs

  • Real-Dev-Squad/todo-frontend#102: Also modifies AppSidebar to update team links and sidebar structure, indicating overlapping changes in sidebar team group handling.

Suggested reviewers

  • iamitprakash

Poem

In the sidebar’s cozy nook,
Teams now hide with just a look.
Click to open, click to close,
Chevrons point where sidebar flows.
"Create" and "Join" now stand apart,
A rabbit’s hop, a UI art!
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Functionality Non-persistent Teams List Expansion State ▹ view
Files scanned
File Path Reviewed
components/app-sidebar.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Comment on lines +92 to +109
if (link.items && link.id === 'teams_list') {
return (
<SidebarMenuItem className="px-2">
<Collapsible open={isTeamsOpen} onOpenChange={setIsTeamsOpen}>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-persistent Teams List Expansion State category Functionality

Tell me more
What is the issue?

The teams list collapsible state is not persisted, causing it to reset to closed state on page refresh or navigation.

Why this matters

Users will lose their preferred sidebar navigation state every time they refresh the page or navigate, leading to a poor user experience, especially for users who frequently access team-related features.

Suggested change ∙ Feature Preview

Store the collapsible state in localStorage to persist it across page refreshes. Modify the code as follows:

const [isTeamsOpen, setIsTeamsOpen] = useState(() => {
  if (typeof window !== 'undefined') {
    const stored = localStorage.getItem('teamsListOpen');
    return stored ? stored === 'true' : false;
  }
  return false;
});

const handleTeamsOpenChange = (open: boolean) => {
  setIsTeamsOpen(open);
  localStorage.setItem('teamsListOpen', String(open));
};

// In JSX:
<Collapsible open={isTeamsOpen} onOpenChange={handleTeamsOpenChange}>
Provide feedback to improve future suggestions

Nice Catch Incorrect Not in Scope Not in coding standard Other

💬 Looking for more details? Reply to this comment to chat with Korbit.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
components/app-sidebar.tsx (1)

145-147: Consider extracting the repeated opacity styling logic.

The opacity styling for CTAs is a nice touch for visual hierarchy. However, the same condition and classes are duplicated.

Extract the repeated logic to improve maintainability:

const SidebarLink = ({ link }: SidebarLinkProps) => {
  const pathname = usePathname()
  const [isTeamsOpen, setIsTeamsOpen] = useState(false)
+  const isCtaLink = link.id === 'create_team_cta' || link.id === 'join_team_cta'
+  const ctaClassName = isCtaLink ? 'opacity-75 hover:opacity-100 focus:opacity-100 active:opacity-100' : ''

Then use it in both places:

-                    className={cn(
-                      (item.id === 'create_team_cta' || item.id === 'join_team_cta') &&
-                        'opacity-75 hover:opacity-100 focus:opacity-100 active:opacity-100',
-                    )}
+                    className={cn(ctaClassName)}

Also applies to: 171-173

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d79d60 and 48361f2.

📒 Files selected for processing (1)
  • components/app-sidebar.tsx (5 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
components/app-sidebar.tsx (3)
components/ui/sidebar.tsx (3)
  • SidebarMenuItem (684-684)
  • SidebarMenuButton (683-683)
  • SidebarMenu (680-680)
components/ui/collapsible.tsx (3)
  • Collapsible (21-21)
  • CollapsibleTrigger (21-21)
  • CollapsibleContent (21-21)
lib/utils.ts (1)
  • cn (4-6)
🔇 Additional comments (1)
components/app-sidebar.tsx (1)

52-66: Good restructuring of team-related links!

Moving "Create a team" and "Join a team" outside the collapsible Teams group improves their discoverability and aligns well with the PR objectives.

@yesyash yesyash force-pushed the chore/integrated-team-dropdown branch from 7aa3c41 to d0cffa3 Compare July 19, 2025 02:26
@yesyash yesyash merged commit bec2724 into develop Jul 19, 2025
3 checks passed
@yesyash yesyash deleted the chore/integrated-team-dropdown branch July 19, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants