Skip to content

Commit f3c6149

Browse files
committed
fix: applies fix for storybook fix
1 parent 13b5733 commit f3c6149

20 files changed

Lines changed: 1060 additions & 924 deletions

.storybook/main.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
import { dirname, join } from "path";
2-
import { StorybookConfig } from '@storybook/nextjs';
1+
import { dirname, join } from 'path'
2+
import { StorybookConfig } from '@storybook/nextjs'
33
const path = require('path')
44

55
const config: StorybookConfig = {
6-
stories: [
7-
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
8-
'../src/**/*.docs.mdx'
9-
],
6+
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)', '../src/**/*.docs.mdx'],
107
addons: [
11-
getAbsolutePath("@storybook/addon-onboarding"),
12-
getAbsolutePath("@storybook/addon-links"),
13-
getAbsolutePath("@storybook/addon-essentials"),
8+
getAbsolutePath('@storybook/addon-onboarding'),
9+
getAbsolutePath('@storybook/addon-links'),
10+
getAbsolutePath('@storybook/addon-essentials'),
1411
// getAbsolutePath("@storybook/addon-docs"),
15-
getAbsolutePath("@storybook/addon-interactions"),
16-
getAbsolutePath("@storybook/addon-themes"),
12+
getAbsolutePath('@storybook/addon-interactions'),
13+
getAbsolutePath('@storybook/addon-themes'),
1714
{
1815
name: '@storybook/addon-styling-webpack',
1916

@@ -43,10 +40,13 @@ const config: StorybookConfig = {
4340
},
4441
],
4542
framework: {
46-
name: getAbsolutePath("@storybook/nextjs"),
43+
name: getAbsolutePath('@storybook/nextjs'),
4744
options: {},
4845
},
4946
staticDirs: ['./public', './msw', '../src/images'],
47+
core: {
48+
disableTelemetry: true,
49+
},
5050
// webpackFinal: async (config) => {
5151
// config.resolve.alias.push({
5252
// '@/components': path.resolve(__dirname, '../src/components'),
@@ -78,5 +78,5 @@ const config: StorybookConfig = {
7878
export default config
7979

8080
function getAbsolutePath(value: string): any {
81-
return dirname(require.resolve(join(value, "package.json")));
81+
return dirname(require.resolve(join(value, 'package.json')))
8282
}
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
2-
import type { Meta, StoryObj } from '@storybook/react';
3-
import { action } from '@storybook/addon-actions';
4-
import { DashboardHeader } from './DashboardHeader';
1+
import type { Meta, StoryObj } from '@storybook/react'
2+
import { action } from '@storybook/addon-actions'
3+
import { DashboardHeader } from './DashboardHeader'
54

65
const meta: Meta<typeof DashboardHeader> = {
7-
title: 'Digital Colleagues/DashboardHeader',
6+
title: 'Foundary/DashboardHeader',
87
component: DashboardHeader,
98
parameters: {
109
layout: 'fullscreen',
@@ -19,21 +18,21 @@ const meta: Meta<typeof DashboardHeader> = {
1918
description: 'Function called when sidebar toggle is clicked',
2019
},
2120
},
22-
};
21+
}
2322

24-
export default meta;
25-
type Story = StoryObj<typeof DashboardHeader>;
23+
export default meta
24+
type Story = StoryObj<typeof DashboardHeader>
2625

2726
export const Default: Story = {
2827
args: {
2928
isRightSidebarOpen: false,
3029
onToggleRightSidebar: action('onToggleRightSidebar'),
3130
},
32-
};
31+
}
3332

3433
export const SidebarOpen: Story = {
3534
args: {
3635
isRightSidebarOpen: true,
3736
onToggleRightSidebar: action('onToggleRightSidebar'),
3837
},
39-
};
38+
}

src/components/Foundary/DigitalColleageusLayout.stories.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import type { Meta, StoryObj } from "@storybook/react"
2-
import { DigitalColleageusLayout } from "./DigitalColleageusLayout"
3-
import { mockSidebarItems, mockNotifications } from "./test-data"
4-
import { businessUnits } from "./test-data"
5-
import { action } from "@storybook/addon-actions"
1+
import type { Meta, StoryObj } from '@storybook/react'
2+
import { DigitalColleageusLayout } from './DigitalColleageusLayout'
3+
import { mockSidebarItems, mockNotifications } from './test-data'
4+
import { businessUnits } from './test-data'
5+
import { action } from '@storybook/addon-actions'
66

77
const meta: Meta<typeof DigitalColleageusLayout> = {
8-
title: "Digital Colleagues/DigitalColleageusLayout",
8+
title: 'Foundary/DigitalColleageusLayout',
99
component: DigitalColleageusLayout,
1010
parameters: {
11-
layout: "fullscreen",
11+
layout: 'fullscreen',
1212
},
1313
argTypes: {
1414
notifications: {
15-
control: { type: "number", min: 0, max: 99 },
15+
control: { type: 'number', min: 0, max: 99 },
1616
},
1717
},
1818
}
@@ -23,7 +23,7 @@ type Story = StoryObj<typeof DigitalColleageusLayout>
2323
export const Default: Story = {
2424
args: {
2525
sidebarItems: mockSidebarItems,
26-
title: "Digital Colleagues",
26+
title: 'Digital Colleagues',
2727
notifications: mockNotifications,
2828
onTabChange: action('onTabChange'),
2929
activeTab: 'Home',
@@ -39,7 +39,9 @@ export const Default: Story = {
3939
{[1, 2, 3, 4, 5, 6].map((i) => (
4040
<div key={i} className="rounded-2xl border p-6">
4141
<h3 className="font-semibold mb-2">Sample Card {i}</h3>
42-
<p className="text-muted-foreground">This is sample content for demonstration purposes.</p>
42+
<p className="text-muted-foreground">
43+
This is sample content for demonstration purposes.
44+
</p>
4345
</div>
4446
))}
4547
</div>
@@ -51,7 +53,7 @@ export const Default: Story = {
5153
export const NoNotifications: Story = {
5254
args: {
5355
sidebarItems: mockSidebarItems,
54-
title: "Digital Colleagues",
56+
title: 'Digital Colleagues',
5557
notifications: mockNotifications,
5658
businessUnits,
5759
children: (

src/components/Foundary/MainPage.stories.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { fn } from '@storybook/test'
3232
import { PhoneIcon, PlayCircleIcon, RectangleGroupIcon } from '@heroicons/react/20/solid'
3333
import { ChartPieIcon, CursorArrowRaysIcon, FingerPrintIcon } from '@heroicons/react/24/outline'
3434
import { DynamicIcon } from '@/components/Images'
35-
import { StoryObj } from '@storybook/react';
35+
import { StoryObj } from '@storybook/react'
3636

3737
const GithubIcon = () => (
3838
// <FontAwesomeIcon icon={faGithub} size="10x" />
@@ -52,7 +52,7 @@ const ServiceIcon = () => <DynamicIcon iconName="cloud-network-sharing" size="4x
5252
const ProductIcon = () => <DynamicIcon iconName="development" size="4x" type="kit" />
5353

5454
export default {
55-
title: 'Digital Colleagues/Main Page',
55+
title: 'Foundary/Main Page',
5656
component: MainPage,
5757
decorators: [
5858
(Story: React.FC) => (
@@ -141,8 +141,6 @@ export const Default: StoryObj = {
141141
},
142142
],
143143
},
144-
145-
146144
],
147145
mainNav: [
148146
{
@@ -162,7 +160,7 @@ export const Default: StoryObj = {
162160
url: '#',
163161
icon: Squad,
164162
isActive: true,
165-
},
163+
},
166164
],
167165
secondaryNav: [
168166
{

src/components/Foundary/ManagementSidebar.stories.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { Meta, StoryObj } from '@storybook/react';
2-
import { action } from '@storybook/addon-actions';
3-
import { ManagementSidebar } from './ManagementSidebar';
1+
import type { Meta, StoryObj } from '@storybook/react'
2+
import { action } from '@storybook/addon-actions'
3+
import { ManagementSidebar } from './ManagementSidebar'
44

55
const meta: Meta<typeof ManagementSidebar> = {
6-
title: 'Digital Colleagues/ManagementSidebar',
6+
title: 'Foundary/ManagementSidebar',
77
component: ManagementSidebar,
88
parameters: {
99
layout: 'fullscreen',
@@ -14,10 +14,10 @@ const meta: Meta<typeof ManagementSidebar> = {
1414
options: ['kanban', 'planning', 'tasks', 'files', 'epics'],
1515
},
1616
},
17-
};
17+
}
1818

19-
export default meta;
20-
type Story = StoryObj<typeof ManagementSidebar>;
19+
export default meta
20+
type Story = StoryObj<typeof ManagementSidebar>
2121

2222
export const KanbanView: Story = {
2323
args: {
@@ -32,7 +32,7 @@ export const KanbanView: Story = {
3232
</div>
3333
),
3434
},
35-
};
35+
}
3636

3737
export const PlanningView: Story = {
3838
args: {
@@ -47,7 +47,7 @@ export const PlanningView: Story = {
4747
</div>
4848
),
4949
},
50-
};
50+
}
5151

5252
export const TasksView: Story = {
5353
args: {
@@ -62,7 +62,7 @@ export const TasksView: Story = {
6262
</div>
6363
),
6464
},
65-
};
65+
}
6666

6767
export const FilesView: Story = {
6868
args: {
@@ -77,7 +77,7 @@ export const FilesView: Story = {
7777
</div>
7878
),
7979
},
80-
};
80+
}
8181

8282
export const EpicsView: Story = {
8383
args: {
@@ -92,7 +92,7 @@ export const EpicsView: Story = {
9292
</div>
9393
),
9494
},
95-
};
95+
}
9696

9797
export const InteractiveDemo: Story = {
9898
args: {
@@ -104,24 +104,24 @@ export const InteractiveDemo: Story = {
104104
<h1 className="text-3xl font-bold mb-2">Project Management Dashboard</h1>
105105
<p className="text-gray-600">Switch between different views using the sidebar</p>
106106
</div>
107-
107+
108108
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
109109
<div className="bg-white p-6 rounded-lg shadow-sm border">
110110
<h3 className="font-semibold mb-2">Active Tasks</h3>
111111
<div className="text-2xl font-bold text-blue-600">23</div>
112112
</div>
113-
113+
114114
<div className="bg-white p-6 rounded-lg shadow-sm border">
115115
<h3 className="font-semibold mb-2">Completed</h3>
116116
<div className="text-2xl font-bold text-green-600">142</div>
117117
</div>
118-
118+
119119
<div className="bg-white p-6 rounded-lg shadow-sm border">
120120
<h3 className="font-semibold mb-2">In Progress</h3>
121121
<div className="text-2xl font-bold text-orange-600">8</div>
122122
</div>
123123
</div>
124-
124+
125125
<div className="mt-8 bg-white p-6 rounded-lg shadow-sm border">
126126
<h3 className="font-semibold mb-4">Recent Activity</h3>
127127
<div className="space-y-3">
@@ -142,4 +142,4 @@ export const InteractiveDemo: Story = {
142142
</div>
143143
),
144144
},
145-
};
145+
}
Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import React from "react";
2-
import Home from "./dashboardpage";
3-
import {
4-
businessUnits,
5-
mockProjectSummary,
6-
mockSidebarItems,
1+
import React from 'react'
2+
import Home from './dashboardpage'
3+
import {
4+
businessUnits,
5+
mockProjectSummary,
6+
mockSidebarItems,
77
mockColleagues,
8-
mockDigitalColleagues
9-
} from "../test-data";
10-
import type { Meta, StoryObj } from "@storybook/react";
8+
mockDigitalColleagues,
9+
} from '../test-data'
10+
import type { Meta, StoryObj } from '@storybook/react'
1111

1212
const meta: Meta<typeof Home> = {
13-
title: "Digital Colleagues/Pages/DashboardPage",
13+
title: 'Foundary/Pages/DashboardPage',
1414
component: Home,
1515
parameters: {
16-
layout: "fullscreen",
16+
layout: 'fullscreen',
1717
},
1818
argTypes: {
1919
onCreateProject: { action: 'create project clicked' },
@@ -22,10 +22,10 @@ const meta: Meta<typeof Home> = {
2222
onColleagueEdit: { action: 'colleague edited' },
2323
onColleagueDelete: { action: 'colleague deleted' },
2424
},
25-
};
26-
export default meta;
25+
}
26+
export default meta
2727

28-
type Story = StoryObj<typeof Home>;
28+
type Story = StoryObj<typeof Home>
2929

3030
// Default props for all stories
3131
const defaultProps = {
@@ -35,22 +35,24 @@ const defaultProps = {
3535
teamMemberCount: 8,
3636
sidebarItems: mockSidebarItems,
3737
initialColleagues: mockColleagues,
38-
users: mockColleagues.filter(c => c.type === 'human'),
38+
users: mockColleagues.filter((c) => c.type === 'human'),
3939
onCreateProject: () => console.log('Create project clicked'),
4040
onOpenProject: () => console.log('Open project clicked'),
4141
onColleagueAdd: () => console.log('Colleague added'),
4242
onColleagueEdit: () => console.log('Colleague edited'),
4343
onColleagueDelete: () => console.log('Colleague deleted'),
44-
};
44+
}
4545

4646
export const Default: Story = {
4747
render: () => <Home title="Nuvia" {...defaultProps} />,
48-
};
48+
}
4949

5050
export const CustomTitle: Story = {
5151
render: () => <Home title="Creative Workspace" {...defaultProps} />,
52-
};
52+
}
5353

5454
export const MinimalBusinessUnits: Story = {
55-
render: () => <Home title="Design Hub" {...defaultProps} businessUnits={businessUnits.slice(0, 2)} />,
56-
};
55+
render: () => (
56+
<Home title="Design Hub" {...defaultProps} businessUnits={businessUnits.slice(0, 2)} />
57+
),
58+
}

0 commit comments

Comments
 (0)