Skip to content

Fix sidebar collapsed icon mode for header and footer#116

Merged
smcnab1 merged 2 commits into
developfrom
v0/sidebar-fix-f8dcc9a6
May 8, 2026
Merged

Fix sidebar collapsed icon mode for header and footer#116
smcnab1 merged 2 commits into
developfrom
v0/sidebar-fix-f8dcc9a6

Conversation

@smcnab1

@smcnab1 smcnab1 commented May 8, 2026

Copy link
Copy Markdown
Contributor

Problem

When the sidebar was collapsed to icon mode, the TeamSwitcher (header) and NavUser (footer) components were rendering incorrectly — they use size="lg" buttons but the collapsed styles were incomplete, causing text content to overflow and the layout to look broken.

Changes

src/components/ui/sidebar.tsx

  • Fixed the lg size variant in sidebarMenuButtonVariants to include group-data-[collapsible=icon]:size-10! and group-data-[collapsible=icon]:justify-center alongside the existing p-0!, matching the same collapsed behaviour as the default size.

src/components/team-switcher.tsx

  • Added group-data-[collapsible=icon]:hidden to the text grid and ChevronsUpDown chevron so only the WandSparkles icon shows when collapsed.
  • Added shrink-0 to the icon wrapper to prevent it from being squeezed.
  • Wrapped the DropdownMenuTrigger in a Tooltip that shows the org name when the sidebar is collapsed.

src/components/nav-user.tsx

  • Added group-data-[collapsible=icon]:hidden to the text grid and ChevronsUpDown so only the avatar shows when collapsed.
  • Added tooltip={userName} to SidebarMenuButton (uses the built-in tooltip support).
  • Added shrink-0 to the Avatar to prevent it being squeezed.
  • Applied the same fixes to the loading skeleton.

Update 'lg' size variant to proper icon-mode styles and fix 'TeamSwitcher' and 'NavUser' for icon-only display on collapse.

Co-authored-by: Sam <108990188+smcnab1@users.noreply.github.com>
@smcnab1 smcnab1 added the v0 label May 8, 2026 — with Vercel
@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workload-wizard Ready Ready Preview, Comment May 8, 2026 11:54am

Set default fallback URL for development to support v0 sandbox.

Co-authored-by: Sam <108990188+smcnab1@users.noreply.github.com>
@smcnab1
smcnab1 merged commit 923a6bb into develop May 8, 2026
10 of 11 checks passed
@smcnab1
smcnab1 deleted the v0/sidebar-fix-f8dcc9a6 branch May 8, 2026 11:55
smcnab1 added a commit that referenced this pull request May 19, 2026
* fix: update vercel commands to use corepack for build and dev

* fix: update Sentry configuration to disable logs and adjust traces sampling

* fix: add missing newline at end of Sentry configuration files

* feat: redesign account page with modern SaaS dashboard (#86)

Create hero profile header, settings grid, and activity sidebar.

Co-authored-by: v0 <v0[bot]@users.noreply.github.com>

* chore: update ESLint and TypeScript settings to block production builds on errors

* chore: remove husky commit-msg hook

* fix: clean up unused imports and fix JSX escaping (#88)

Remove unused imports and fix JSX escaping issue.

Co-authored-by: v0 <v0[bot]@users.noreply.github.com>

* chore: update Node.js version and remove unused dependencies from package.json

* chore: update Node.js version in .nvmrc and modify pre-commit hook to ensure correct Node version is used

* refactor: clean up code formatting and improve readability in various components

- Adjusted formatting in `pnpm-lock.yaml` for consistency.
- Refactored `page.tsx`, `PermissionButton.tsx`, `PermissionField.tsx`, `QuickLinksSection.tsx`, `WorkloadStatusPanel.tsx`, and `WorkloadSummaryCards.tsx` to enhance code readability by aligning props and conditions.
- Removed unnecessary line breaks and improved indentation for better clarity.

* chore: remove vercel.json configuration file

* fix: add pnpm lockfile

* chore: format pnpm-lock.yaml for consistency and readability

- Updated resolution entries to a more structured format.
- Ensured consistent indentation and spacing throughout the file.

* fix: pin node 20.11.x for pnpm stability

* fix: relax node engine constraint

* fix: downgrade pnpm for vercel stability

* chore: update package.json and tsconfig.json for improved configuration

- Removed test command from the check script in package.json for streamlined checks.
- Changed JSX setting to 'react-jsx' in tsconfig.json for better compatibility with React 17+.

* chore: update configuration files for improved package management and TypeScript settings

- Replaced pnpm with npm in package.json scripts for better compatibility.
- Updated .npmrc to use hoisted node linker and set registry.
- Removed pnpm-lock.yaml as part of the transition to npm.
- Adjusted tsconfig.json for clearer structure and updated JSX setting to 'preserve'.

* refactor: simplify middleware and remove non-MVP tooling (#90)

* security: lock down dev and admin routes (#91)

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* chore: remove non-MVP dependencies (#92)

* refactor: simplify next.config for MVP (#93)

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* refactor: clean environment variables for MVP (#94)

* chore: transition from pnpm to npm for package management

- Updated CONTRIBUTING.md to reflect npm commands for linting and testing.
- Replaced pnpm-lock.yaml with package-lock.json in CODEOWNERS and various GitHub configuration files for consistency.

* Codex/workos auth helper unification (#96)

* refactor auth user helpers for WorkOS migration

* standardise auth helper roles

* Codex/auth permission helpers (#97)

* add server auth permission helpers

* use database auth context for server permissions

* enforce database memberships in auth context

* Centralize Convex auth context

* Remove Clerk JWT provider from Convex

* Add WorkOS auth base

* Use WorkOS session for auth user

* Migrate backend auth off Clerk

* Migrate frontend auth hooks

* Remove Clerk packages and webhook

* Clean up WorkOS auth migration

* Normalize integration lockfile

* Switch integration branch to npm

* Remove remaining pnpm references

* Use npm tooling for auth phase

* Fix npm lockfile package scopes

* Fix npm CI workflows

* Fix npm CI workflows

* Respect high audit threshold in CI

* Respect high audit threshold in CI

* Auth phase 1: Convex auth context refactor (#98)

* Centralize Convex auth context

* Use npm tooling for auth phase

* Fix npm CI workflows

* Respect high audit threshold in CI

* Auth phase 2: Remove Convex Clerk JWT provider (#99)

* Remove Clerk JWT provider from Convex

* Use npm tooling for auth phase

* Fix npm CI workflows

* Respect high audit threshold in CI

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Auth phase 3: Add WorkOS base helper (#100)

* Add WorkOS auth base

* Use npm tooling for auth phase

* Fix npm CI workflows

* Respect high audit threshold in CI

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Auth phase 4: Use WorkOS identity for auth user (#101)

* Use WorkOS session for auth user

* Use npm tooling for auth phase

* Fix npm CI workflows

* Respect high audit threshold in CI

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Auth phase 5: Migrate backend auth usage (#102)

* Migrate backend auth off Clerk

* Use npm tooling for auth phase

* Fix npm CI workflows

* Respect high audit threshold in CI

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Auth phase 6: Migrate frontend auth hooks (#103)

* Migrate frontend auth hooks

* Use npm tooling for auth phase

* Fix npm CI workflows

* Respect high audit threshold in CI

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Auth phase 7: Remove Clerk package and webhook (#104)

* Remove Clerk packages and webhook

* Use npm tooling for auth phase

* Fix npm CI workflows

* Respect high audit threshold in CI

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Remove deprecated Husky hook bootstrap

* Auth/workos finalise (#107)

* Finalize WorkOS auth migration

* Keep health check independent of auth secrets

* Refactor organisation context retrieval across multiple modules (#108)

- Introduced `getActorOrganisationId` function to centralize the logic for fetching the primary organisation ID for a user.
- Updated various queries and mutations to utilize the new function, ensuring consistent organisation context handling.
- Adjusted argument structures in several functions to include `userId` for better context management.
- Enhanced error handling for cases where organisation context is required but not available.

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Fix dev-auth build blockers

* Auth/login process (#110)

* fixed login process and dashboard protection

* updated all clerk components to workos

* fix: full auth provider & process, reduced dupe calls to /api

* feat: onboarding confirmed working, progress saved also (#109)

* Db/new user (#111)

* fix: updated profile picture and user detail changes

* fix page actions

* feat: complete Account Hub setup and TypeScript verification (#112)

Fix redirect logic and update "Profile Settings" link; verify TypeScript correctness

Co-authored-by: v0 <v0[bot]@users.noreply.github.com>

* fix: husky

* fix: assigned value but not used

* Sidebar rewrite: TeamSwitcher, NavMain, NavUser, AppSidebar + account ?tab= deep linking (#113)

* feat: redesign sidebar and dashboard layout based on shadcn example

Co-authored-by: Sam <108990188+smcnab1@users.noreply.github.com>

* fix: correct type import in PlaceholderPage

Fix type import error and update interface usage.

Co-authored-by: Sam <108990188+smcnab1@users.noreply.github.com>

* feat: fix double sidebar nesting and update layout components

Remove redundant layout nesting and update sidebar components for consistency.

Co-authored-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Potential fix for pull request finding 'CodeQL / Unused variable, import, function or class'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

* Potential fix for pull request finding 'CodeQL / Unused variable, import, function or class'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>
Co-authored-by: v0 <v0[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix: email newsletter sign-up and waitlist (#114)

* fix: style updates to color (#115)

* Fix sidebar collapsed icon mode for header and footer (#116)

* feat: fix collapsed icon display for sidebar components

Update 'lg' size variant to proper icon-mode styles and fix 'TeamSwitcher' and 'NavUser' for icon-only display on collapse.

Co-authored-by: Sam <108990188+smcnab1@users.noreply.github.com>

* feat: make NEXT_PUBLIC_APP_URL optional with fallback

Set default fallback URL for development to support v0 sandbox.

Co-authored-by: Sam <108990188+smcnab1@users.noreply.github.com>

---------

Co-authored-by: v0 <v0[bot]@users.noreply.github.com>

* fix: sidebar display issues in collapsed state (#117)

Increase sidebar width and hide text spans in collapsed state.

Co-authored-by: v0 <v0[bot]@users.noreply.github.com>

* fix: dashboard fix

* fix: staff workloading view page

* feat: sidebar customisable by role (#118)

* feat: quick-links updated (#119)

* Fix/perm allocation (#120)

* fix: simplified permissions and settings config

* fix: file fix for perm level

* Feature/account page (#121)

* feat: account display updated

* feat: password reset management

* feat: added submenu on click when collapsed sidebar (#122)

* Feature/manager setup (#123)

* feat: enhance permissions and roles management

- Introduced new role management functions, including `setUserRolesForOrganisation` to replace active roles for users.
- Added canonical role name normalization for consistency across the application.
- Updated permissions to reflect new role structures, ensuring proper access control for various actions.
- Enhanced queries to retrieve user roles and permissions more efficiently.
- Added new constants for default roles and permissions to streamline role assignment processes.

* chore: remove sentry integration

---------

Signed-off-by: Sam <108990188+smcnab1@users.noreply.github.com>
Co-authored-by: v0 <v0[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant