Skip to content

Commit 1cdc62b

Browse files
authored
chore: reorganize storybook (#10144)
1 parent 54648b9 commit 1cdc62b

File tree

72 files changed

+121
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+121
-83
lines changed

site/src/components/Alert/ErrorAlert.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const mockError = mockApiError({
99
});
1010

1111
const meta: Meta<typeof ErrorAlert> = {
12-
title: "components/ErrorAlert",
12+
title: "components/Alert/ErrorAlert",
1313
component: ErrorAlert,
1414
args: {
1515
error: mockError,

site/src/components/Dashboard/Navbar/UserDropdown/UserDropdown.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ const meta: Meta<typeof UserDropdown> = {
1313
export default meta;
1414
type Story = StoryObj<typeof UserDropdown>;
1515

16-
export const Example: Story = {};
16+
const Example: Story = {};
17+
18+
export { Example as UserDropdown };

site/src/components/Dialogs/DeleteDialog/DeleteDialog.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ const meta: Meta<typeof DeleteDialog> = {
1818
export default meta;
1919
type Story = StoryObj<typeof DeleteDialog>;
2020

21-
export const Example: Story = {};
21+
const Example: Story = {};
22+
23+
export { Example as DeleteDialog };

site/src/components/EmptyState/EmptyState.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ const meta: Meta<typeof EmptyState> = {
1313
export default meta;
1414
type Story = StoryObj<typeof EmptyState>;
1515

16-
export const Example: Story = {
16+
const Example: Story = {
1717
args: {
1818
description: "It is easy, just click the button below",
1919
cta: <Button>Create workspace</Button>,
2020
},
2121
};
22+
23+
export { Example as EmptyState };

site/src/components/FullPageForm/FullPageForm.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ const meta: Meta<typeof FullPageForm> = {
2929
export default meta;
3030
type Story = StoryObj<typeof FullPageForm>;
3131

32-
export const Example: Story = {
32+
const Example: Story = {
3333
args: {
3434
title: "My Form",
3535
detail: "Lorem ipsum dolor",
3636
},
3737
};
38+
39+
export { Example as FullPageForm };

site/src/components/GroupAvatar/GroupAvatar.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ const meta: Meta<typeof GroupAvatar> = {
99
export default meta;
1010
type Story = StoryObj<typeof GroupAvatar>;
1111

12-
export const Example: Story = {
12+
const Example: Story = {
1313
args: {
1414
name: "My Group",
1515
avatarURL: "",
1616
},
1717
};
18+
19+
export { Example as GroupAvatar };

site/src/components/HelpTooltip/HelpTooltip.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ const meta: Meta<typeof HelpTooltip> = {
3333
export default meta;
3434
type Story = StoryObj<typeof HelpTooltip>;
3535

36-
export const Example: Story = {};
36+
const Example: Story = {};
37+
38+
export { Example as HelpTooltip };

site/src/components/Margins/Margins.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const meta: Meta<typeof Margins> = {
99
export default meta;
1010
type Story = StoryObj<typeof Margins>;
1111

12-
export const Example: Story = {
12+
const Example: Story = {
1313
args: {
1414
children: (
1515
<div style={{ width: "100%", background: "black" }}>
@@ -18,3 +18,5 @@ export const Example: Story = {
1818
),
1919
},
2020
};
21+
22+
export { Example as Margins };

site/src/components/OverflowY/OverflowY.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ const meta: Meta<typeof OverflowY> = {
3131
export default meta;
3232

3333
type Story = StoryObj<typeof OverflowY>;
34-
export const Example: Story = {};
34+
const Example: Story = {};
35+
36+
export { Example as OverflowY };

site/src/components/PopoverContainer/PopoverContainer.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ const meta: Meta<typeof PopoverContainer> = {
2020
export default meta;
2121

2222
type Story = StoryObj<typeof PopoverContainer>;
23-
export const Example: Story = {};
23+
const Example: Story = {};
24+
25+
export { Example as PopoverContainer };

site/src/components/Resources/AgentMetadata.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const descriptionDefaults: WorkspaceAgentMetadataDescription = {
2828
script: "some command",
2929
};
3030

31-
export const Example: Story = {
31+
const Example: Story = {
3232
args: {
3333
metadata: [
3434
{
@@ -105,3 +105,5 @@ export const Example: Story = {
105105
],
106106
},
107107
};
108+
109+
export { Example as AgentMetadata };

site/src/components/Resources/TerminalLink/TerminalLink.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ const meta: Meta<typeof TerminalLink> = {
1010
export default meta;
1111
type Story = StoryObj<typeof TerminalLink>;
1212

13-
export const Example: Story = {
13+
const Example: Story = {
1414
args: {
1515
workspaceName: MockWorkspace.name,
1616
},
1717
};
18+
19+
export { Example as TerminalLink };

site/src/components/TableRowMenu/TableRowMenu.stories.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const meta: Meta<typeof TableRowMenu> = {
99
export default meta;
1010
type Story = StoryObj<typeof TableRowMenu<{ id: string }>>;
1111

12-
export const Example: Story = {
12+
const Example: Story = {
1313
args: {
1414
data: { id: "123" },
1515
menuItems: [
@@ -20,3 +20,5 @@ export const Example: Story = {
2020
],
2121
},
2222
};
23+
24+
export { Example as TableRowMenu };

site/src/pages/AuditPage/AuditLogRow/AuditLogDescription/AuditLogDescription.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from "testHelpers/entities";
1010

1111
const meta: Meta<typeof AuditLogDescription> = {
12-
title: "components/AuditLogDescription",
12+
title: "pages/AuditPage/AuditLogDescription",
1313
component: AuditLogDescription,
1414
};
1515

site/src/pages/AuditPage/AuditLogRow/AuditLogRow.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { AuditLogRow } from "./AuditLogRow";
1515
import type { Meta, StoryObj } from "@storybook/react";
1616

1717
const meta: Meta<typeof AuditLogRow> = {
18-
title: "components/AuditLogRow",
18+
title: "pages/AuditPage/AuditLogRow",
1919
component: AuditLogRow,
2020
decorators: [
2121
(Story) => (

site/src/pages/AuditPage/AuditPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const defaultFilterProps = getDefaultFilterProps<FilterProps>({
2424
});
2525

2626
const meta: Meta<typeof AuditPageView> = {
27-
title: "pages/AuditPageView",
27+
title: "pages/AuditPage",
2828
component: AuditPageView,
2929
args: {
3030
auditLogs: [MockAuditLog, MockAuditLog2],

site/src/pages/CliAuthPage/CliAuthPageView.stories.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CliAuthPageView } from "./CliAuthPageView";
22
import type { Meta, StoryObj } from "@storybook/react";
33

44
const meta: Meta<typeof CliAuthPageView> = {
5-
title: "pages/CliAuthPageView",
5+
title: "pages/CliAuthPage",
66
component: CliAuthPageView,
77
args: {
88
sessionToken: "some-session-token",
@@ -12,4 +12,6 @@ const meta: Meta<typeof CliAuthPageView> = {
1212
export default meta;
1313
type Story = StoryObj<typeof CliAuthPageView>;
1414

15-
export const Example: Story = {};
15+
const Example: Story = {};
16+
17+
export { Example as CliAuthPage };

site/src/pages/CreateTemplatePage/CreateTemplateForm.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { CreateTemplateForm } from "./CreateTemplateForm";
1111
import type { Meta, StoryObj } from "@storybook/react";
1212

1313
const meta: Meta<typeof CreateTemplateForm> = {
14-
title: "components/CreateTemplateForm",
14+
title: "pages/CreateTemplatePage",
1515
component: CreateTemplateForm,
1616
args: {
1717
isSubmitting: false,

site/src/pages/CreateUserPage/CreateUserForm.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CreateUserForm } from "./CreateUserForm";
44
import { mockApiError } from "testHelpers/entities";
55

66
const meta: Meta<typeof CreateUserForm> = {
7-
title: "components/CreateUserForm",
7+
title: "pages/CreateUserPage",
88
component: CreateUserForm,
99
args: {
1010
onCancel: action("cancel"),

site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import { CreateWorkspacePageView } from "./CreateWorkspacePageView";
1111

1212
const meta: Meta<typeof CreateWorkspacePageView> = {
13-
title: "pages/CreateWorkspacePageView",
13+
title: "pages/CreateWorkspacePage",
1414
component: CreateWorkspacePageView,
1515
args: {
1616
defaultName: "",

site/src/pages/CreateWorkspacePage/ExternalAuth.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ExternalAuth } from "./ExternalAuth";
22
import type { Meta, StoryObj } from "@storybook/react";
33

44
const meta: Meta<typeof ExternalAuth> = {
5-
title: "components/ExternalAuth",
5+
title: "pages/CreateWorkspacePage/ExternalAuth",
66
component: ExternalAuth,
77
};
88

site/src/pages/CreateWorkspacePage/SelectedTemplate.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { SelectedTemplate } from "./SelectedTemplate";
33
import type { Meta, StoryObj } from "@storybook/react";
44

55
const meta: Meta<typeof SelectedTemplate> = {
6-
title: "components/SelectedTemplate",
6+
title: "pages/CreateWorkspacePage/SelectedTemplate",
77
component: SelectedTemplate,
88
};
99

site/src/pages/DeploySettingsPage/AppearanceSettingsPage/AppearanceSettingsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { AppearanceSettingsPageView } from "./AppearanceSettingsPageView";
22
import type { Meta, StoryObj } from "@storybook/react";
33

44
const meta: Meta<typeof AppearanceSettingsPageView> = {
5-
title: "pages/AppearanceSettingsPageView",
5+
title: "pages/DeploySettingsPage/AppearanceSettingsPageView",
66
component: AppearanceSettingsPageView,
77
args: {
88
appearance: {

site/src/pages/DeploySettingsPage/ExternalAuthSettingsPage/ExternalAuthSettingsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ExternalAuthSettingsPageView } from "./ExternalAuthSettingsPageView";
22
import type { Meta, StoryObj } from "@storybook/react";
33

44
const meta: Meta<typeof ExternalAuthSettingsPageView> = {
5-
title: "pages/ExternalAuthSettingsPageView",
5+
title: "pages/DeploySettingsPage/ExternalAuthSettingsPageView",
66
component: ExternalAuthSettingsPageView,
77
args: {
88
config: {

site/src/pages/DeploySettingsPage/GeneralSettingsPage/GeneralSettingsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { GeneralSettingsPageView } from "./GeneralSettingsPageView";
88

99
const meta: Meta<typeof GeneralSettingsPageView> = {
10-
title: "pages/GeneralSettingsPageView",
10+
title: "pages/DeploySettingsPage/GeneralSettingsPageView",
1111
component: GeneralSettingsPageView,
1212
args: {
1313
deploymentOptions: [

site/src/pages/DeploySettingsPage/LicensesSettingsPage/AddNewLicensePageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AddNewLicensePageView } from "./AddNewLicensePageView";
22

33
export default {
4-
title: "pages/AddNewLicensePageView",
4+
title: "pages/DeploySettingsPage/AddNewLicensePageView",
55
component: AddNewLicensePageView,
66
};
77

site/src/pages/DeploySettingsPage/LicensesSettingsPage/LicensesSettingsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import LicensesSettingsPageView from "./LicensesSettingsPageView";
22
import { MockLicenseResponse } from "testHelpers/entities";
33

44
export default {
5-
title: "pages/LicensesSettingsPageView",
5+
title: "pages/DeploySettingsPage/LicensesSettingsPageView",
66
component: LicensesSettingsPageView,
77
};
88

site/src/pages/DeploySettingsPage/NetworkSettingsPage/NetworkSettingsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const group: ClibaseGroup = {
88
};
99

1010
const meta: Meta<typeof NetworkSettingsPageView> = {
11-
title: "pages/NetworkSettingsPageView",
11+
title: "pages/DeploySettingsPage/NetworkSettingsPageView",
1212
component: NetworkSettingsPageView,
1313
args: {
1414
options: [

site/src/pages/DeploySettingsPage/SecuritySettingsPage/SecuritySettingsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const group: ClibaseGroup = {
88
};
99

1010
const meta: Meta<typeof SecuritySettingsPageView> = {
11-
title: "pages/SecuritySettingsPageView",
11+
title: "pages/DeploySettingsPage/SecuritySettingsPageView",
1212
component: SecuritySettingsPageView,
1313
args: {
1414
options: [

site/src/pages/DeploySettingsPage/UserAuthSettingsPage/UserAuthSettingsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const ghGroup: ClibaseGroup = {
1313
};
1414

1515
const meta: Meta<typeof UserAuthSettingsPageView> = {
16-
title: "pages/UserAuthSettingsPageView",
16+
title: "pages/DeploySettingsPage/UserAuthSettingsPageView",
1717
component: UserAuthSettingsPageView,
1818
args: {
1919
options: [

site/src/pages/ExternalAuthPage/ExternalAuthPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ExternalAuthPageView, {
44
} from "./ExternalAuthPageView";
55

66
export default {
7-
title: "pages/ExternalAuthPageView",
7+
title: "pages/ExternalAuthPage",
88
component: ExternalAuthPageView,
99
} as Meta<typeof ExternalAuthPageView>;
1010

site/src/pages/GroupsPage/CreateGroupPageView.stories.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import { CreateGroupPageView } from "./CreateGroupPageView";
22
import type { Meta, StoryObj } from "@storybook/react";
33

44
const meta: Meta<typeof CreateGroupPageView> = {
5-
title: "pages/CreateGroupPageView",
5+
title: "pages/GroupsPage/CreateGroupPageView",
66
component: CreateGroupPageView,
77
};
88

99
export default meta;
1010
type Story = StoryObj<typeof CreateGroupPageView>;
1111

12-
export const Example: Story = {};
12+
const Example: Story = {};
13+
14+
export { Example as CreateGroupPageView };

site/src/pages/GroupsPage/GroupsPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { GroupsPageView } from "./GroupsPageView";
33
import type { Meta, StoryObj } from "@storybook/react";
44

55
const meta: Meta<typeof GroupsPageView> = {
6-
title: "pages/GroupsPageView",
6+
title: "pages/GroupsPage",
77
component: GroupsPageView,
88
};
99

site/src/pages/GroupsPage/SettingsGroupPageView.stories.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ import { SettingsGroupPageView } from "./SettingsGroupPageView";
33
import type { Meta, StoryObj } from "@storybook/react";
44

55
const meta: Meta<typeof SettingsGroupPageView> = {
6-
title: "pages/SettingsGroupPageView",
6+
title: "pages/GroupsPage/SettingsGroupPageView",
77
component: SettingsGroupPageView,
88
};
99

1010
export default meta;
1111
type Story = StoryObj<typeof SettingsGroupPageView>;
1212

13-
export const Example: Story = {
13+
const Example: Story = {
1414
args: {
1515
group: MockGroup,
1616
isLoading: false,
1717
},
1818
};
19+
20+
export { Example as SettingsGroupPageView };

site/src/pages/HealthPage/HealthPage.stories.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { HealthPageView } from "./HealthPage";
33
import { MockHealth } from "testHelpers/entities";
44

55
const meta: Meta<typeof HealthPageView> = {
6-
title: "pages/HealthPageView",
6+
title: "pages/HealthPage",
77
component: HealthPageView,
88
args: {
99
tab: {
@@ -17,9 +17,9 @@ const meta: Meta<typeof HealthPageView> = {
1717
export default meta;
1818
type Story = StoryObj<typeof HealthPageView>;
1919

20-
export const HealthPage: Story = {};
20+
export const Example: Story = {};
2121

22-
export const UnhealthPage: Story = {
22+
export const UnhealthyDERP: Story = {
2323
args: {
2424
healthStatus: {
2525
...MockHealth,

site/src/pages/LoginPage/LoginPageView.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { LoginPageView } from "./LoginPageView";
44
import type { Meta, StoryObj } from "@storybook/react";
55

66
const meta: Meta<typeof LoginPageView> = {
7-
title: "pages/LoginPageView",
7+
title: "pages/LoginPage",
88
component: LoginPageView,
99
};
1010

site/src/pages/LoginPage/SignInForm.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { SignInForm } from "./SignInForm";
33
import type { Meta, StoryObj } from "@storybook/react";
44

55
const meta: Meta<typeof SignInForm> = {
6-
title: "components/SignInForm",
6+
title: "pages/LoginPage/SignInForm",
77
component: SignInForm,
88
args: {
99
isSigningIn: false,

0 commit comments

Comments
 (0)