From 98ef30f1158aca20a9e2ee124472f831146aa720 Mon Sep 17 00:00:00 2001 From: Andrew Hayward Date: Tue, 20 Feb 2024 02:53:35 +0000 Subject: [PATCH 1/2] Adding Storybook validator to static checks workflow --- .github/workflows/static-checks.yml | 3 +++ package.json | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index 789e64a25fa20..d5079b3bacb32 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -48,6 +48,9 @@ jobs: - name: Type checking run: npm run build:package-types + - name: Validate Storybook + run: npm run storybook:validate + - name: Check local changes run: npm run other:check-local-changes diff --git a/package.json b/package.json index b54be23041128..b949ecdd5dd86 100644 --- a/package.json +++ b/package.json @@ -312,6 +312,8 @@ "start": "npm run dev", "prestorybook:build": "npm run build:packages", "storybook:build": "storybook build -c ./storybook -o ./storybook/build", + "prestorybook:validate": "npm run build:packages", + "storybook:validate": "storybook dev -c ./storybook --ci --smoke-test", "prestorybook:dev": "npm run build:packages", "storybook:dev": "concurrently \"npm run dev:packages\" \"storybook dev -c ./storybook -p 50240\"", "storybook:e2e:dev": "concurrently \"npm run dev:packages\" \"storybook dev -c test/storybook-playwright/storybook -p 50241\"", From 8b00c6b55119f3514e3d3c4544cb0d9b65ff1877 Mon Sep 17 00:00:00 2001 From: Andrew Hayward Date: Wed, 21 Feb 2024 10:22:04 +0000 Subject: [PATCH 2/2] Fixing failing Storybook warnings --- .../src/components/global-styles/screen-revisions/style.scss | 2 +- storybook/stories/playground/box/index.js | 2 +- storybook/stories/playground/with-undo-redo/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/screen-revisions/style.scss b/packages/edit-site/src/components/global-styles/screen-revisions/style.scss index dfe30c9bee33d..e10c20f2378bb 100644 --- a/packages/edit-site/src/components/global-styles/screen-revisions/style.scss +++ b/packages/edit-site/src/components/global-styles/screen-revisions/style.scss @@ -127,7 +127,7 @@ .edit-site-global-styles-screen-revisions__meta { display: flex; - justify-content: start; + justify-content: flex-start; width: 100%; align-items: flex-start; text-align: left; diff --git a/storybook/stories/playground/box/index.js b/storybook/stories/playground/box/index.js index 3fb3c3b5862c4..37297f5394f76 100644 --- a/storybook/stories/playground/box/index.js +++ b/storybook/stories/playground/box/index.js @@ -12,7 +12,7 @@ import { /** * Internal dependencies */ -import editorStyles from '../editor-styles'; +import { editorStyles } from '../editor-styles'; import './style.css'; export default function EditorBox() { diff --git a/storybook/stories/playground/with-undo-redo/index.js b/storybook/stories/playground/with-undo-redo/index.js index 8bef2d184f8c5..e95c24216e3c9 100644 --- a/storybook/stories/playground/with-undo-redo/index.js +++ b/storybook/stories/playground/with-undo-redo/index.js @@ -15,7 +15,7 @@ import { undo as undoIcon, redo as redoIcon } from '@wordpress/icons'; /** * Internal dependencies */ -import editorStyles from '../editor-styles'; +import { editorStyles } from '../editor-styles'; import './style.css'; export default function EditorWithUndoRedo() {