From 3d9bd9d35395bbac076e7f5670957fdc23ea4791 Mon Sep 17 00:00:00 2001 From: mahmed2000 Date: Fri, 27 Sep 2024 21:25:38 +0000 Subject: [PATCH] Storybook 8 fixes (#3937) * Add globs for auto-generated CSF screenshot stories to main.js * Remove unneeded mdx files for screenshots * Glob for stories.js instead of just js files in the doc pages directory * Might as well update it to 8.3 while we're at it * Update knip config file to make it happy * Fix linter warning --------- Co-authored-by: Gabe Kangas --- web/.storybook/main.js | 6 ++---- .../Screenshots-android-stock-browser-landscape.mdx | 8 -------- .../Screenshots-android-stock-browser-portrait.mdx | 8 -------- .../ipad/Screenshots-iPad-landscape-safari.mdx | 8 -------- .../screenshots/ipad/Screenshots-iPad-portrait-safari.mdx | 8 -------- .../iphone/Screenshots-iPhone-safari-landscape.mdx | 8 -------- .../iphone/Screenshots-iPhone-safari-portrait.mdx | 8 -------- .../screenshots/macos/Screenshots-macOS-chrome.mdx | 8 -------- .../screenshots/macos/Screenshots-macOS-firefox.mdx | 8 -------- .../screenshots/macos/Screenshots-macOS-safari.mdx | 8 -------- .../screenshots/windows/Screenshots-windows-chrome.mdx | 8 -------- .../screenshots/windows/Screenshots-windows-firefox.mdx | 8 -------- 12 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-landscape.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-portrait.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-landscape-safari.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-portrait-safari.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-landscape.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-portrait.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-chrome.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-firefox.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-safari.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-chrome.mdx delete mode 100644 web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-firefox.mdx diff --git a/web/.storybook/main.js b/web/.storybook/main.js index b6d752a8d..1b4f51aa1 100644 --- a/web/.storybook/main.js +++ b/web/.storybook/main.js @@ -3,7 +3,7 @@ module.exports = { previewMdx2: true, }, - stories: ['../.storybook/stories-category-doc-pages/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)', '../components/**/*.stories.@(js|jsx|ts|tsx)', '../pages/**/*.stories.@(js|jsx|ts|tsx)'], + stories: ['../.storybook/stories-category-doc-pages/**/*.@(mdx|stories.js)', '../stories/**/*.stories.@(js|jsx|ts|tsx)', '../components/**/*.stories.@(js|jsx|ts|tsx)', '../pages/**/*.stories.@(js|jsx|ts|tsx)'], addons: [ '@storybook/addon-links', @@ -117,7 +117,5 @@ module.exports = { staticDirs: ['../public', '../../static', './story-assets'], - docs: { - autodocs: false, - }, + docs: {}, }; diff --git a/web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-landscape.mdx b/web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-landscape.mdx deleted file mode 100644 index cac5309c6..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-landscape.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsAndroidStockBrowserLandscapeStories from './Screenshots-android-stock-browser-landscape.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-portrait.mdx b/web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-portrait.mdx deleted file mode 100644 index d2628c3e7..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/android/Screenshots-android-stock-browser-portrait.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsAndroidStockBrowserPortraitStories from './Screenshots-android-stock-browser-portrait.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-landscape-safari.mdx b/web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-landscape-safari.mdx deleted file mode 100644 index dc739bb12..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-landscape-safari.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsIPadLandscapeSafariStories from './Screenshots-iPad-landscape-safari.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-portrait-safari.mdx b/web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-portrait-safari.mdx deleted file mode 100644 index 8295a212c..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/ipad/Screenshots-iPad-portrait-safari.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsIPadPortraitSafariStories from './Screenshots-iPad-portrait-safari.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-landscape.mdx b/web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-landscape.mdx deleted file mode 100644 index 2e1c9e69f..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-landscape.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsIPhoneSafariLandscapeStories from './Screenshots-iPhone-safari-landscape.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-portrait.mdx b/web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-portrait.mdx deleted file mode 100644 index 159ef1f6c..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/iphone/Screenshots-iPhone-safari-portrait.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsIPhoneSafariPortraitStories from './Screenshots-iPhone-safari-portrait.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-chrome.mdx b/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-chrome.mdx deleted file mode 100644 index 10611daa2..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-chrome.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsMacOsChromeStories from './Screenshots-macOS-chrome.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-firefox.mdx b/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-firefox.mdx deleted file mode 100644 index 8531ba6fe..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-firefox.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsMacOsFirefoxStories from './Screenshots-macOS-firefox.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-safari.mdx b/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-safari.mdx deleted file mode 100644 index 687b12ffc..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/macos/Screenshots-macOS-safari.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsMacOsSafariStories from './Screenshots-macOS-safari.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-chrome.mdx b/web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-chrome.mdx deleted file mode 100644 index 62d7ad36d..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-chrome.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsWindowsChromeStories from './Screenshots-windows-chrome.stories'; - - - - - - diff --git a/web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-firefox.mdx b/web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-firefox.mdx deleted file mode 100644 index c6989dbeb..000000000 --- a/web/.storybook/stories-category-doc-pages/screenshots/windows/Screenshots-windows-firefox.mdx +++ /dev/null @@ -1,8 +0,0 @@ -import { Canvas, Meta, Story } from '@storybook/blocks'; -import * as ScreenshotsWindowsFirefoxStories from './Screenshots-windows-firefox.stories'; - - - - - -