Skip to content

Commit d5aabf8

Browse files
authored
chore: Cleanup storybook structure (#5457)
## Description 1. What is this PR about (link the issue and add a short description) ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
1 parent 02ca084 commit d5aabf8

File tree

115 files changed

+134
-96
lines changed

Some content is hidden

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

115 files changed

+134
-96
lines changed

.storybook/main.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ const visualTestingStories: StorybookConfig["stories"] = [
2020
{
2121
directory: "../apps/builder",
2222
titlePrefix: "Builder",
23+
files: "**/*.stories.tsx",
2324
},
2425
{
25-
directory: "../packages/design-system",
26+
directory: "../packages/design-system/src/components",
2627
titlePrefix: "Design System",
28+
files: "**/*.stories.tsx",
2729
},
2830
];
2931

@@ -33,28 +35,34 @@ export default {
3335
: [
3436
...visualTestingStories,
3537
{
36-
directory: "../packages/css-engine",
38+
directory: "../packages/css-engine/src",
3739
titlePrefix: "CSS Engine",
40+
files: "**/*.stories.tsx",
3841
},
3942
{
40-
directory: "../packages/image",
43+
directory: "../packages/image/src",
4144
titlePrefix: "Image",
45+
files: "**/*.stories.tsx",
4246
},
4347
{
4448
directory: "../packages/icons",
4549
titlePrefix: "Icons",
50+
files: "**/*.stories.tsx",
4651
},
4752
{
4853
directory: "../packages/sdk-components-react",
4954
titlePrefix: "SDK Components React",
55+
files: "**/*.stories.tsx",
5056
},
5157
{
5258
directory: "../packages/sdk-components-react-radix",
5359
titlePrefix: "SDK Components React Radix",
60+
files: "**/*.stories.tsx",
5461
},
5562
{
5663
directory: "../packages/sdk-components-animation",
5764
titlePrefix: "SDK Components Animation",
65+
files: "**/*.stories.tsx",
5866
},
5967
],
6068
framework: {

apps/builder/app/auth/login.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom";
44
import { Login } from "./login";
55

66
export default {
7+
title: "Auth/Login",
78
component: Login,
89
};
910

apps/builder/app/builder/features/address-bar.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const HistoryInspect = () => {
5959
};
6060

6161
export default {
62-
title: "Builder/Address Bar",
62+
title: "Address Bar",
6363
component: AddressBarPopover,
6464
} satisfies Meta;
6565

apps/builder/app/builder/features/blocking-alerts/alert.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Alert } from "./alert";
22

3-
export default { component: Alert };
3+
export default { title: "Blocking Alerts", component: Alert };
44

55
export const Basic = () => (
66
<Alert

apps/builder/app/builder/features/breakpoints/breakpoints-selector.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,6 @@ export const Story = () => {
8080
Story.storyName = "breakpoints-selector";
8181

8282
export default {
83+
title: "Breakpoints Selector",
8384
component: Story,
8485
};

apps/builder/app/builder/features/command-panel/command-panel.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
} from "./command-panel";
1717

1818
const meta: Meta = {
19-
title: "CommandPanel",
19+
title: "Command Panel",
2020
};
2121
export default meta;
2222

apps/builder/app/builder/features/pages/custom-metadata.stories.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import { Box } from "@webstudio-is/design-system";
22
import { CustomMetadata } from "./custom-metadata";
33
import { useState } from "react";
44

5-
export default { component: CustomMetadata, title: "Pages/CustomMetadata" };
5+
export default {
6+
component: CustomMetadata,
7+
title: "Pages/Custom Metadata",
8+
};
69

710
export const Basic = () => {
811
const [customMetas, setCustomMetas] = useState([

apps/builder/app/builder/features/pages/page-settings.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { createDefaultPages } from "@webstudio-is/project-build";
66
import { isRootFolder } from "@webstudio-is/sdk";
77

88
export default {
9+
title: "Pages/Page Settings",
910
component: PageSettings,
1011
parameters: {
1112
lostpixel: {

apps/builder/app/builder/features/pages/search-preview.stories.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Box } from "@webstudio-is/design-system";
22
import { SearchPreview } from "./search-preview";
33

4-
export default { component: SearchPreview };
4+
export default {
5+
title: "Pages/Search Preview",
6+
component: SearchPreview,
7+
};
58

69
export const Basic = () => (
710
<Box css={{ width: 600, margin: 20 }}>

apps/builder/app/builder/features/project-settings/project-settings.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { $pages, $project } from "~/shared/nano-states";
55
import type { Project } from "@webstudio-is/project";
66

77
export default {
8+
title: "Project Settings",
89
component: ProjectSettingsView,
910
};
1011

0 commit comments

Comments
 (0)