Skip to content

Commit

Permalink
Update storybook version (#685)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:

* Change hierarchy separators (`|` -> `/`) 
  * https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-hierarchy-separators
* Remove unnecessary config for support TypeScript

**Which issue(s) this PR fixes**:

Fixes #

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
-->
```release-note
NONE
```

This PR was merged by Kapetanios.
  • Loading branch information
cakecatz authored Aug 24, 2020
1 parent 13645a3 commit 75d01e1
Show file tree
Hide file tree
Showing 33 changed files with 1,955 additions and 1,901 deletions.
26 changes: 6 additions & 20 deletions pkg/app/web/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
const path = require("path");

module.exports = ({ config }) => {
config.module.rules.push(
{
test: /\.(ts|tsx)$/,
use: [
{
loader: "ts-loader",
options: {
transpileOnly: true
}
},
require.resolve("react-docgen-typescript-loader")
]
},
{
type: "javascript/auto",
test: /\.mjs$/,
use: []
}
);
config.module.rules.push({
type: "javascript/auto",
test: /\.mjs$/,
use: [],
});
config.resolve.extensions.push(".mjs", ".ts", ".tsx", ".js");
config.resolve.modules.push(
path.resolve(__dirname, "../node_modules"),
"node_modules"
);
config.resolve.alias = {
pipe: path.resolve(__dirname, "../../../../bazel-bin/")
pipe: path.resolve(__dirname, "../../../../bazel-bin/"),
};

return config;
Expand Down
8 changes: 4 additions & 4 deletions pkg/app/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"devDependencies": {
"@bazel/labs": "^1.6.1",
"@bazel/typescript": "^1.6.1",
"@storybook/addon-actions": "^5.3.18",
"@storybook/addon-docs": "^5.3.18",
"@storybook/addons": "^5.3.18",
"@storybook/react": "^5.3.18",
"@storybook/addon-actions": "^6.0.16",
"@storybook/addon-docs": "^6.0.16",
"@storybook/addons": "^6.0.16",
"@storybook/react": "^6.0.16",
"@testing-library/react": "^10.4.3",
"@types/google-protobuf": "^3.7.2",
"@types/jest": "^25.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { action } from "@storybook/addon-actions";
import { createDecoratorRedux } from "../../.storybook/redux-decorator";

export default {
title: "APPLICATION|AddApplicationForm",
title: "APPLICATION/AddApplicationForm",
component: AddApplicationForm,
decorators: [createDecoratorRedux({})],
};
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/add-env-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AddEnvForm } from "./add-env-form";
import { action } from "@storybook/addon-actions";

export default {
title: "SETTINGS|AddEnvForm",
title: "SETTINGS/AddEnvForm",
component: AddEnvForm,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/add-piped-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AddPipedForm } from "./add-piped-form";
import { action } from "@storybook/addon-actions";

export default {
title: "SETTINGS|AddPipedForm",
title: "SETTINGS/AddPipedForm",
component: AddPipedForm,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/application-detail.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const dummyStore: Partial<AppState> = {
};

export default {
title: "APPLICATION|ApplicationDetail",
title: "APPLICATION/ApplicationDetail",
component: ApplicationDetail,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/application-filter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { action } from "@storybook/addon-actions";
import { createDecoratorRedux } from "../../.storybook/redux-decorator";

export default {
title: "ApplicationFilter",
title: "APPLICATION/ApplicationFilter",
component: ApplicationFilter,
decorators: [
createDecoratorRedux({
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/application-list.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createDecoratorRedux } from "../../.storybook/redux-decorator";
import { dummyApplication } from "../__fixtures__/dummy-application";

export default {
title: "APPLICATION|ApplicationList",
title: "APPLICATION/ApplicationList",
component: ApplicationList,
decorators: [
createDecoratorRedux({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createDecoratorRedux } from "../../.storybook/redux-decorator";
import { dummyApplicationLiveState } from "../__fixtures__/dummy-application-live-state";

export default {
title: "APPLICATION|ApplicationStateView",
title: "APPLICATION/ApplicationStateView",
component: ApplicationStateView,
decorators: [
createDecoratorRedux({
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/approval-stage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import { ApprovalStage } from "./approval-stage";

export default {
title: "DEPLOYMENT|Pipeline/ApprovalStage",
title: "DEPLOYMENT/Pipeline/ApprovalStage",
component: ApprovalStage,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createDecoratorRedux } from "../../.storybook/redux-decorator";
import { action } from "@storybook/addon-actions";

export default {
title: "DeploymentConfigForm",
title: "DEPLOYMENT/DeploymentConfigForm",
component: DeploymentConfigForm,
decorators: [createDecoratorRedux({})],
};
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/deployment-detail.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { dummyPiped } from "../__fixtures__/dummy-piped";
import { DeploymentStatus } from "../modules/deployments";

export default {
title: "DEPLOYMENT|DeploymentDetail",
title: "DEPLOYMENT/DeploymentDetail",
component: DeploymentDetail,
decorators: [
createDecoratorRedux({
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/deployment-filter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { dummyApplication } from "../__fixtures__/dummy-application";
import { action } from "@storybook/addon-actions";

export default {
title: "DeploymentFilter",
title: "DEPLOYMENT/DeploymentFilter",
component: DeploymentFilter,
decorators: [
createDecoratorRedux({
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/deployment-item.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { dummyApplication } from "../__fixtures__/dummy-application";
import { dummyEnv } from "../__fixtures__/dummy-environment";

export default {
title: "DEPLOYMENT|DeploymentItem",
title: "DEPLOYMENT/DeploymentItem",
component: DeploymentItem,
decorators: [
createDecoratorRedux({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StatusIcon as DeploymentStatusIcon } from "./deployment-status-icon";
import { DeploymentStatus } from "pipe/pkg/app/web/model/deployment_pb";

export default {
title: "DEPLOYMENT|StatusIcon",
title: "DEPLOYMENT/StatusIcon",
component: DeploymentStatusIcon,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/github-sso-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GithubSSOForm } from "./github-sso-form";
import { action } from "@storybook/addon-actions";

export default {
title: "GithubSSOForm",
title: "SETTINGS/GithubSSOForm",
component: GithubSSOForm,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Provider } from "react-redux";
import { Role } from "../../../../../bazel-bin/pkg/app/web/model/role_pb";

export default {
title: "COMMON|Header",
title: "COMMON/Header",
component: Header,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/health-status-icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { KubernetesResourceHealthStatusIcon } from "./health-status-icon";
import { HealthStatus } from "../modules/applications-live-state";

export default {
title: "APPLICATION|HealthStatusIcon",
title: "APPLICATION/HealthStatusIcon",
component: KubernetesResourceHealthStatusIcon,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/kubernetes-resource.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HealthStatus } from "../modules/applications-live-state";
import { action } from "@storybook/addon-actions";

export default {
title: "APPLICATION|KubernetesResource",
title: "APPLICATION/KubernetesResource",
component: KubernetesResource,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { KubernetesStateView } from "./kubernetes-state-view";

export default {
title: "APPLICATION|KubernetesStateView",
title: "APPLICATION/KubernetesStateView",
component: KubernetesStateView,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/labeled-text.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { LabeledText } from "./labeled-text";

export default {
title: "COMMON|LabeledText",
title: "COMMON/LabeledText",
component: LabeledText,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/log-viewer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createDecoratorRedux } from "../../.storybook/redux-decorator";
import { LogSeverity } from "../modules/stage-logs";

export default {
title: "DEPLOYMENT|LogViewer",
title: "DEPLOYMENT/LogViewer",
component: LogViewer,
decorators: [
createDecoratorRedux({
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/log.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Log } from "./log";
import { LogSeverity } from "../modules/stage-logs";

export default {
title: "DEPLOYMENT|Log",
title: "DEPLOYMENT/Log",
component: Log,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/login-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LoginForm } from "./login-form";
import { createDecoratorRedux } from "../../.storybook/redux-decorator";

export default {
title: "LoginForm",
title: "LOGIN/LoginForm",
component: LoginForm,
decorators: [createDecoratorRedux({})],
};
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/pipeline-stage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StageStatus } from "pipe/pkg/app/web/model/deployment_pb";
import { action } from "@storybook/addon-actions";

export default {
title: "DEPLOYMENT|Pipeline/PipelineStage",
title: "DEPLOYMENT/Pipeline/PipelineStage",
component: PipelineStage,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/pipeline.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const fakeDeployment: Deployment = {
};

export default {
title: "DEPLOYMENT|Pipeline/Pipeline",
title: "DEPLOYMENT/Pipeline/Pipeline",
component: Pipeline,
decorators: [
createDecoratorRedux({
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/split-button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CancelIcon from "@material-ui/icons/Cancel";
import { action } from "@storybook/addon-actions";

export default {
title: "COMMON|SplitButton",
title: "COMMON/SplitButton",
component: SplitButton,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/stage-status-icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StatusIcon as DeploymentStatusIcon } from "./deployment-status-icon";
import { DeploymentStatus } from "pipe/pkg/app/web/model/deployment_pb";

export default {
title: "DEPLOYMENT|StatusIcon",
title: "DEPLOYMENT/StatusIcon",
component: DeploymentStatusIcon,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/static-admin-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StaticAdminForm } from "./static-admin-form";
import { action } from "@storybook/addon-actions";

export default {
title: "StaticAdminForm",
title: "SETTINGS/StaticAdminForm",
component: StaticAdminForm,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/sync-state-reason.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { SyncStateReason } from "./sync-state-reason";

export default {
title: "APPLICATION|SyncStateReason",
title: "APPLICATION/SyncStateReason",
component: SyncStateReason,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/sync-status-icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SyncStatusIcon } from "./sync-status-icon";
import { ApplicationSyncStatus } from "pipe/pkg/app/web/model/application_pb";

export default {
title: "APPLICATION|SyncStatusIcon",
title: "APPLICATION/SyncStatusIcon",
component: SyncStatusIcon,
};

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/web/src/components/toasts.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Toasts } from "./toasts";
import { createDecoratorRedux } from "../../.storybook/redux-decorator";

export default {
title: "COMMON|Toasts",
title: "COMMON/Toasts",
component: Toasts,
decorators: [
createDecoratorRedux({
Expand Down
Loading

0 comments on commit 75d01e1

Please sign in to comment.