import type { Meta, StoryObj } from '@storybook/react';
import { DashboardLayout } from './DashboardLayout';
import DashboardPage from '@/features/dashboard/pages/DashboardPage';
import { PlaylistListPage } from '@/features/playlists/pages/PlaylistListPage';
import { LibraryPage } from '@/features/library/pages/LibraryPage';
import { SettingsPage } from '@/features/settings/pages/SettingsPage';
import { UserProfilePage } from '@/features/profile/pages/UserProfilePage';
const placeholderContent = (
Dashboard Content
This is the main content area rendered within the layout.
{Array.from({ length: 20 }).map((_, i) => (
Item {i + 1}
))}
);
const meta = {
title: 'App/Layouts/DashboardLayout',
component: DashboardLayout,
tags: ['autodocs'],
parameters: {
layout: 'fullscreen',
viewport: { defaultViewport: 'desktop' },
},
} satisfies Meta;
export default meta;
type Story = StoryObj;
/** Shell with placeholder content. Use to validate scroll and proportions. */
export const Default: Story = {
name: 'App shell (placeholder)',
args: {
children: placeholderContent,
},
};
/** Full app view: shell + real Dashboard page (MSW mocks user + library). */
export const DashboardFullLayout: Story = {
name: 'Dashboard – full layout',
args: { children: null },
render: () => (
),
parameters: {
layout: 'fullscreen',
router: { initialEntries: ['/dashboard'] },
},
};
/** Full app view: shell + Playlist list page (MSW mocks playlists). */
export const PlaylistsFullLayout: Story = {
name: 'Playlists – full layout',
args: { children: null },
render: () => (
),
parameters: {
layout: 'fullscreen',
router: { initialEntries: ['/playlists'] },
},
};
/** Full app view: shell + Library page (MSW mocks tracks). */
export const LibraryFullLayout: Story = {
name: 'Library – full layout',
args: { children: null },
render: () => (
),
parameters: {
layout: 'fullscreen',
router: { initialEntries: ['/library'] },
},
};
/** Full app view: shell + Settings page (MSW mocks user + users/settings). */
export const SettingsFullLayout: Story = {
name: 'Settings – full layout',
args: { children: null },
render: () => (
),
parameters: {
layout: 'fullscreen',
router: { initialEntries: ['/settings'] },
},
};
/** Full app view: shell + Profile page (MSW mocks user profile). */
export const ProfileFullLayout: Story = {
name: 'Profile – full layout',
args: { children: null },
render: () => (
),
parameters: {
layout: 'fullscreen',
router: { initialEntries: ['/profile'] },
},
};