diff --git a/apps/app/.storybook/preview.ts b/apps/app/.storybook/preview.ts index a263f5cd..7c7cff19 100644 --- a/apps/app/.storybook/preview.ts +++ b/apps/app/.storybook/preview.ts @@ -15,6 +15,9 @@ const routeNames = [ 'organisation-companies', 'organisation-form-failures', 'organisation-settings', 'platform', 'platform-organisations', 'platform-users', 'platform-form-failures', 'platform-activity-log', + // v2 shell nav targets (APP_NAVIGATION uses v2-prefixed route names) — + // without these, AppSidebar/SidebarNav RouterLinks throw "No match for". + 'v2-dashboard', ] export const storyRouter = createRouter({ diff --git a/apps/app/src/components-v2/layout/AppSidebar.vue b/apps/app/src/components-v2/layout/AppSidebar.vue index 36cdddcc..b31288c7 100644 --- a/apps/app/src/components-v2/layout/AppSidebar.vue +++ b/apps/app/src/components-v2/layout/AppSidebar.vue @@ -165,7 +165,10 @@ const mobileVisible = computed({ }" > - + diff --git a/apps/app/src/components-v2/layout/SidebarNav.vue b/apps/app/src/components-v2/layout/SidebarNav.vue index 8fb82563..05639afd 100644 --- a/apps/app/src/components-v2/layout/SidebarNav.vue +++ b/apps/app/src/components-v2/layout/SidebarNav.vue @@ -22,9 +22,21 @@ import type { RouteLocationRaw } from 'unplugin-vue-router' import Icon from '@/components/Icon.vue' import { APP_NAVIGATION, type NavItem } from '@/config/navigation' -defineProps<{ +withDefaults(defineProps<{ collapsed: boolean -}>() + /** + * When true (default), the nav fills available vertical space (`flex-1`) + * so a bottom-anchored sibling (WorkspaceSwitcher) pins to the bottom — the + * desktop sidebar behaviour. Set false in the mobile drawer (`flex-initial`) + * so the nav takes its natural height — logo + menu + switcher group together + * at the top instead of leaving a void above a bottom-pinned switcher + * (MOBILE-SHELL-PARITY follow-up). `flex-initial` (not `flex-none`) keeps + * `flex-shrink: 1`, so if the menu ever grows past the panel height the nav + * shrinks and scrolls internally (`min-h-0 overflow-y-auto`) rather than + * pushing the switcher out of the `overflow-hidden` drawer content. + */ + grow?: boolean +}>(), { grow: true }) const route = useRoute() @@ -52,7 +64,10 @@ function itemTo(item: NavItem): RouteLocationRaw {