Skip to content

feat: add collapsible sidebar #55

Merged
Baba-2001 merged 4 commits intomainfrom
feat/add-collapsible-sidebar
Mar 20, 2026
Merged

feat: add collapsible sidebar #55
Baba-2001 merged 4 commits intomainfrom
feat/add-collapsible-sidebar

Conversation

@Rishavraaj
Copy link
Contributor

@Rishavraaj Rishavraaj commented Mar 20, 2026

Summary

This PR introduces a native collapsible sidebar to the @zuko/ui-kit library and refactors the ApplicationLayout to use a data-driven approach. It significantly reduces code duplication in the layout component (~150 lines removed) and improves the user experience by allowing a more compact sidebar view with automated tooltips for navigation and action icons.


Changes

@zuko/ui-kit:

  • sidebar.tsx:
    • Implemented a collapsed prop and added smooth expansion/collapse transitions.
    • Added SidebarNavItem and WithSidebarTooltip components for consistent handling of labels and tooltips.
    • Switched from clsx to the cn utility to ensure reliable Tailwind class merging and style overrides in the collapsed state.
  • sidebar-layout.tsx: Optimized the main responsive layout to handle dynamic sidebar widths.
  • index.ts: Exported new sidebar layout and navigation components.

apps/web:

  • application-layout.tsx:
    • Migrated hardcoded navigation items to a centralized navigation array.
    • Implemented persistence for the sidebar state using localStorage.
    • Simplified the organization switcher and user profile footer using new reusable components.
  • layout.tsx: Added TooltipProvider to enable sidebar tooltips.

Test Plan

  • Toggle Functionality: Verified the expand/collapse trigger correctly updates the UI and persists the state across page refreshes.
  • Tooltip Display: Confirmed tooltips appear on hover for all sidebar items only when the sidebar is collapsed.
  • Icon Visibility: Verified that icons and avatars correctly scale up and center in the 80px collapsed sidebar.
  • Navigation Logic: Confirmed the "active" indicator correctly highlights items based on both exact and partial path matches.
  • Responsiveness: Verified that mobile navigation remains unaffected and fully functional.

Screen shot

image

Introduces a collapsible sidebar to the UI kit and refactors the web application's layout to use data-driven reusable navigation components.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Rishavraaj Rishavraaj changed the title feat: implementation of collapsible sidebar feat: addcollapsible sidebar Mar 20, 2026
@Rishavraaj Rishavraaj changed the title feat: addcollapsible sidebar feat: add collapsible sidebar Mar 20, 2026
Rishavraaj and others added 3 commits March 20, 2026 14:23
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
…d avatar sizing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…he application layout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Rishavraaj Rishavraaj self-assigned this Mar 20, 2026
@Baba-2001 Baba-2001 merged commit d6b5de4 into main Mar 20, 2026
1 check passed
@Baba-2001 Baba-2001 deleted the feat/add-collapsible-sidebar branch March 20, 2026 12:37
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.

3 participants