From 141e17c8112017ed0f7729b509d799b89a364cdf Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 11 Oct 2022 23:20:46 +0200 Subject: [PATCH 01/20] initial working sb-for-sb-ui --- ...tories.js => NotificationItem.stories.jsx} | 0 code/package.json | 1 + code/sb-for-sb-ui/main.ts | 22 ++ code/sb-for-sb-ui/preview-head.html | 3 + code/sb-for-sb-ui/preview.jsx | 248 ++++++++++++++++++ code/vite.config.ts | 8 + 6 files changed, 282 insertions(+) rename code/lib/ui/src/components/notifications/{NotificationItem.stories.js => NotificationItem.stories.jsx} (100%) create mode 100644 code/sb-for-sb-ui/main.ts create mode 100644 code/sb-for-sb-ui/preview-head.html create mode 100644 code/sb-for-sb-ui/preview.jsx create mode 100644 code/vite.config.ts diff --git a/code/lib/ui/src/components/notifications/NotificationItem.stories.js b/code/lib/ui/src/components/notifications/NotificationItem.stories.jsx similarity index 100% rename from code/lib/ui/src/components/notifications/NotificationItem.stories.js rename to code/lib/ui/src/components/notifications/NotificationItem.stories.jsx diff --git a/code/package.json b/code/package.json index 3f6195844d0..09080174974 100644 --- a/code/package.json +++ b/code/package.json @@ -80,6 +80,7 @@ "sandbox": "ts-node ../scripts/sandbox.ts", "serve-storybooks": "http-server ./built-storybooks -p 8001", "smoketest-storybooks": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true node -r esm ../scripts/smoketest-storybooks.js", + "storybook:ui": "./lib/cli/bin/index.js dev -p 6006 --config-dir sb-for-sb-ui", "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js", "test:cli": "npm --prefix lib/cli run test", "test:e2e-examples-playwright": "playwright test", diff --git a/code/sb-for-sb-ui/main.ts b/code/sb-for-sb-ui/main.ts new file mode 100644 index 00000000000..419afdb8b6b --- /dev/null +++ b/code/sb-for-sb-ui/main.ts @@ -0,0 +1,22 @@ +import type { StorybookConfig } from '../frameworks/react-vite/dist'; + +const config: StorybookConfig = { + stories: [ + '../lib/ui/src/components/notifications/NotificationItem.stories.jsx', + // '../lib/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', + // '../lib/components/src/**/*.stories.@(js|jsx|ts|tsx|mdx)', + // './../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', + ], + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-interactions', + ], + framework: { + name: '@storybook/react-vite', + options: {}, + }, + logLevel: 'debug', +}; + +export default config; diff --git a/code/sb-for-sb-ui/preview-head.html b/code/sb-for-sb-ui/preview-head.html new file mode 100644 index 00000000000..05da1e9dfbf --- /dev/null +++ b/code/sb-for-sb-ui/preview-head.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/code/sb-for-sb-ui/preview.jsx b/code/sb-for-sb-ui/preview.jsx new file mode 100644 index 00000000000..1b3ce4cdc6d --- /dev/null +++ b/code/sb-for-sb-ui/preview.jsx @@ -0,0 +1,248 @@ +import global from 'global'; +import React, { Fragment, useEffect } from 'react'; +import isChromatic from 'chromatic/isChromatic'; +import { + Global, + ThemeProvider, + themes, + createReset, + convert, + styled, + useTheme, +} from '@storybook/theming'; +import { Symbols } from '@storybook/components'; + +const { document } = global; + +const ThemeBlock = styled.div( + { + position: 'absolute', + top: 0, + left: 0, + right: '50vw', + width: '50vw', + height: '100vh', + bottom: 0, + overflow: 'auto', + padding: 10, + }, + ({ theme }) => ({ + background: theme.background.content, + color: theme.color.defaultText, + }), + ({ side }) => + side === 'left' + ? { + left: 0, + right: '50vw', + } + : { + right: 0, + left: '50vw', + } +); + +const ThemeStack = styled.div( + { + position: 'relative', + minHeight: 'calc(50vh - 15px)', + }, + ({ theme }) => ({ + background: theme.background.content, + color: theme.color.defaultText, + }) +); + +const PlayFnNotice = styled.div( + { + position: 'absolute', + bottom: '1rem', + right: '1rem', + border: '1px solid #ccc', + borderRadius: '5px', + padding: '1rem', + fontSize: '12px', + '> *': { + display: 'block', + }, + }, + ({ theme }) => ({ + background: theme.background.content, + color: theme.color.defaultText, + }) +); + +const ThemedSetRoot = () => { + const theme = useTheme(); + + useEffect(() => { + document.body.style.background = theme.background.content; + document.body.style.color = theme.color.defaultText; + return () => { + // + }; + }); + + return null; +}; + +export const decorators = [ + (StoryFn, { globals, parameters, playFunction }) => { + const defaultTheme = isChromatic() && !playFunction ? 'stacked' : 'light'; + const theme = globals.theme || parameters.theme || defaultTheme; + + switch (theme) { + case 'side-by-side': { + return ( + + + + + + + + + + + + + + + + + ); + } + case 'stacked': { + return ( + + + + + + + + + + + + + + + + + ); + } + default: { + return ( + + + + + {!parameters.theme && isChromatic() && playFunction && ( + + Detected play function. + Rendering in a single theme + + )} + + + ); + } + } + }, +]; + +export const parameters = { + exportedParameter: 'exportedParameter', + actions: { argTypesRegex: '^on.*' }, + options: { + storySort: (a, b) => + a.title === b.title ? 0 : a.id.localeCompare(b.id, undefined, { numeric: true }), + }, + docs: { + theme: themes.light, + }, + controls: { + presetColors: [ + { color: '#ff4785', title: 'Coral' }, + { color: '#1EA7FD', title: 'Ocean' }, + { color: 'rgb(252, 82, 31)', title: 'Orange' }, + { color: 'RGBA(255, 174, 0, 0.5)', title: 'Gold' }, + { color: 'hsl(101, 52%, 49%)', title: 'Green' }, + { color: 'HSLA(179,65%,53%,0.5)', title: 'Seafoam' }, + { color: '#6F2CAC', title: 'Purple' }, + { color: '#2A0481', title: 'Ultraviolet' }, + { color: 'black' }, + { color: '#333', title: 'Darkest' }, + { color: '#444', title: 'Darker' }, + { color: '#666', title: 'Dark' }, + { color: '#999', title: 'Mediumdark' }, + { color: '#ddd', title: 'Medium' }, + { color: '#EEE', title: 'Mediumlight' }, + { color: '#F3F3F3', title: 'Light' }, + { color: '#F8F8F8', title: 'Lighter' }, + { color: '#FFFFFF', title: 'Lightest' }, + '#fe4a49', + '#FED766', + 'rgba(0, 159, 183, 1)', + 'HSLA(240,11%,91%,0.5)', + 'slategray', + ], + }, +}; + +export const globals = { + foo: 'fooValue', +}; + +export const globalTypes = { + foo: { defaultValue: 'fooDefaultValue' }, + bar: { defaultValue: 'barDefaultValue' }, + theme: { + name: 'Theme', + description: 'Global theme for components', + toolbar: { + icon: 'circlehollow', + title: 'Theme', + items: [ + { value: 'light', icon: 'circlehollow', title: 'light' }, + { value: 'dark', icon: 'circle', title: 'dark' }, + { value: 'side-by-side', icon: 'sidebar', title: 'side by side' }, + { value: 'stacked', icon: 'bottombar', title: 'stacked' }, + ], + }, + }, + locale: { + name: 'Locale', + description: 'Internationalization locale', + toolbar: { + icon: 'globe', + shortcuts: { + next: { + label: 'Go to next language', + keys: ['L'], + }, + previous: { + label: 'Go to previous language', + keys: ['K'], + }, + reset: { + label: 'Reset language', + keys: ['meta', 'shift', 'L'], + }, + }, + items: [ + { title: 'Reset locale', type: 'reset' }, + { value: 'en', right: '🇺🇸', title: 'English' }, + { value: 'es', right: '🇪🇸', title: 'Español' }, + { value: 'zh', right: '🇨🇳', title: '中文' }, + { value: 'kr', right: '🇰🇷', title: '한국어' }, + ], + }, + }, +}; + +export const loaders = [async () => ({ globalValue: 1 })]; + +export const argTypes = { color: { control: 'color' } }; +export const args = { color: 'red' }; diff --git a/code/vite.config.ts b/code/vite.config.ts new file mode 100644 index 00000000000..662550be670 --- /dev/null +++ b/code/vite.config.ts @@ -0,0 +1,8 @@ +// TODO: install these deps even though they are already installed by other packages, or just silent the eslint error +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +}); From fb2abe9c0bf65f8e42e4d8d35fcc385c9cfecd2f Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 11 Oct 2022 23:49:24 +0200 Subject: [PATCH 02/20] make ui stories work --- ...otificationList.stories.js => NotificationList.stories.jsx} | 0 .../ui/src/settings/{about.stories.js => about.stories.jsx} | 0 code/package.json | 2 +- code/sb-for-sb-ui/main.ts | 3 +-- code/vite.config.ts | 3 ++- 5 files changed, 4 insertions(+), 4 deletions(-) rename code/lib/ui/src/components/notifications/{NotificationList.stories.js => NotificationList.stories.jsx} (100%) rename code/lib/ui/src/settings/{about.stories.js => about.stories.jsx} (100%) diff --git a/code/lib/ui/src/components/notifications/NotificationList.stories.js b/code/lib/ui/src/components/notifications/NotificationList.stories.jsx similarity index 100% rename from code/lib/ui/src/components/notifications/NotificationList.stories.js rename to code/lib/ui/src/components/notifications/NotificationList.stories.jsx diff --git a/code/lib/ui/src/settings/about.stories.js b/code/lib/ui/src/settings/about.stories.jsx similarity index 100% rename from code/lib/ui/src/settings/about.stories.js rename to code/lib/ui/src/settings/about.stories.jsx diff --git a/code/package.json b/code/package.json index 09080174974..b6d648a007a 100644 --- a/code/package.json +++ b/code/package.json @@ -80,7 +80,7 @@ "sandbox": "ts-node ../scripts/sandbox.ts", "serve-storybooks": "http-server ./built-storybooks -p 8001", "smoketest-storybooks": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true node -r esm ../scripts/smoketest-storybooks.js", - "storybook:ui": "./lib/cli/bin/index.js dev -p 6006 --config-dir sb-for-sb-ui", + "storybook:ui": "./lib/cli/bin/index.js dev --config-dir sb-for-sb-ui --port 6006 --no-manager-cache", "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js", "test:cli": "npm --prefix lib/cli run test", "test:e2e-examples-playwright": "playwright test", diff --git a/code/sb-for-sb-ui/main.ts b/code/sb-for-sb-ui/main.ts index 419afdb8b6b..dab64348942 100644 --- a/code/sb-for-sb-ui/main.ts +++ b/code/sb-for-sb-ui/main.ts @@ -2,8 +2,7 @@ import type { StorybookConfig } from '../frameworks/react-vite/dist'; const config: StorybookConfig = { stories: [ - '../lib/ui/src/components/notifications/NotificationItem.stories.jsx', - // '../lib/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', + '../lib/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', // '../lib/components/src/**/*.stories.@(js|jsx|ts|tsx|mdx)', // './../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', ], diff --git a/code/vite.config.ts b/code/vite.config.ts index 662550be670..64dc4cb3864 100644 --- a/code/vite.config.ts +++ b/code/vite.config.ts @@ -4,5 +4,6 @@ import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + // TODO: remove classic jsxRuntime once we upgrade to React 18 + plugins: [react({ jsxRuntime: 'classic' })], }); From 81e49b32f710cdb8d332055e2f7f0563a0c973bb Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 12 Oct 2022 23:13:59 +0200 Subject: [PATCH 03/20] create code/manager --- code/manager/.storybook/main.ts | 23 +++++++++++++++++++ .../.storybook}/preview-head.html | 0 .../.storybook}/preview.jsx | 0 code/manager/package.json | 11 +++++++++ code/{ => manager}/vite.config.ts | 1 - code/package.json | 14 ++++++----- code/sb-for-sb-ui/main.ts | 21 ----------------- code/yarn.lock | 14 +++++++++-- 8 files changed, 54 insertions(+), 30 deletions(-) create mode 100644 code/manager/.storybook/main.ts rename code/{sb-for-sb-ui => manager/.storybook}/preview-head.html (100%) rename code/{sb-for-sb-ui => manager/.storybook}/preview.jsx (100%) create mode 100644 code/manager/package.json rename code/{ => manager}/vite.config.ts (68%) delete mode 100644 code/sb-for-sb-ui/main.ts diff --git a/code/manager/.storybook/main.ts b/code/manager/.storybook/main.ts new file mode 100644 index 00000000000..2b3762378c0 --- /dev/null +++ b/code/manager/.storybook/main.ts @@ -0,0 +1,23 @@ +import type { StorybookConfig } from '../../frameworks/react-vite/dist'; +import vitePluginReact from '@vitejs/plugin-react'; +import { mergeConfig } from 'vite'; + +const config: StorybookConfig = { + stories: [ + '../../lib/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', + // '../../lib/components/src/**/*.stories.@(js|jsx|ts|tsx|mdx)', + // '../../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', + ], + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-interactions', + ], + framework: { + name: '@storybook/react-vite', + options: {}, + }, + logLevel: 'debug', +}; + +export default config; diff --git a/code/sb-for-sb-ui/preview-head.html b/code/manager/.storybook/preview-head.html similarity index 100% rename from code/sb-for-sb-ui/preview-head.html rename to code/manager/.storybook/preview-head.html diff --git a/code/sb-for-sb-ui/preview.jsx b/code/manager/.storybook/preview.jsx similarity index 100% rename from code/sb-for-sb-ui/preview.jsx rename to code/manager/.storybook/preview.jsx diff --git a/code/manager/package.json b/code/manager/package.json new file mode 100644 index 00000000000..4a9d3bbf58d --- /dev/null +++ b/code/manager/package.json @@ -0,0 +1,11 @@ +{ + "name": "@storybook/manager", + "private": true, + "type": "module", + "packageManager": "yarn@3.2.3", + "dependencies": { + "@vitejs/plugin-react": "^2.1.0", + "typescript": "^4.8.4", + "vite": "^3.1.7" + } +} diff --git a/code/vite.config.ts b/code/manager/vite.config.ts similarity index 68% rename from code/vite.config.ts rename to code/manager/vite.config.ts index 64dc4cb3864..e952df93d69 100644 --- a/code/vite.config.ts +++ b/code/manager/vite.config.ts @@ -1,4 +1,3 @@ -// TODO: install these deps even though they are already installed by other packages, or just silent the eslint error import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/code/package.json b/code/package.json index b6d648a007a..ae39f649009 100644 --- a/code/package.json +++ b/code/package.json @@ -41,13 +41,15 @@ "packages": [ "addons/*", "addons/storyshots/*", - "frameworks/*", - "renderers/*", - "presets/*", - "examples-native/*", "examples/*", + "examples-native/*", + "frameworks/*", "lib/*", - "lib/cli/test/run/*" + "lib/cli/test/run/*", + "manager", + "manager/*", + "presets/*", + "renderers/*" ] }, "scripts": { @@ -80,7 +82,7 @@ "sandbox": "ts-node ../scripts/sandbox.ts", "serve-storybooks": "http-server ./built-storybooks -p 8001", "smoketest-storybooks": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true node -r esm ../scripts/smoketest-storybooks.js", - "storybook:ui": "./lib/cli/bin/index.js dev --config-dir sb-for-sb-ui --port 6006 --no-manager-cache", + "storybook:ui": "cd manager && ../lib/cli/bin/index.js dev --port 6006 --no-manager-cache", "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js", "test:cli": "npm --prefix lib/cli run test", "test:e2e-examples-playwright": "playwright test", diff --git a/code/sb-for-sb-ui/main.ts b/code/sb-for-sb-ui/main.ts deleted file mode 100644 index dab64348942..00000000000 --- a/code/sb-for-sb-ui/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { StorybookConfig } from '../frameworks/react-vite/dist'; - -const config: StorybookConfig = { - stories: [ - '../lib/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', - // '../lib/components/src/**/*.stories.@(js|jsx|ts|tsx|mdx)', - // './../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', - ], - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/addon-interactions', - ], - framework: { - name: '@storybook/react-vite', - options: {}, - }, - logLevel: 'debug', -}; - -export default config; diff --git a/code/yarn.lock b/code/yarn.lock index 4ef0c2b737d..a946f440c75 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7908,6 +7908,16 @@ __metadata: languageName: node linkType: hard +"@storybook/manager@workspace:manager": + version: 0.0.0-use.local + resolution: "@storybook/manager@workspace:manager" + dependencies: + "@vitejs/plugin-react": ^2.1.0 + typescript: ^4.8.4 + vite: ^3.1.7 + languageName: unknown + linkType: soft + "@storybook/mdx1-csf@npm:0.0.5-canary.13.9ce928a.0": version: 0.0.5-canary.13.9ce928a.0 resolution: "@storybook/mdx1-csf@npm:0.0.5-canary.13.9ce928a.0" @@ -10742,7 +10752,7 @@ __metadata: languageName: node linkType: hard -"@vitejs/plugin-react@npm:^2.0.0": +"@vitejs/plugin-react@npm:^2.0.0, @vitejs/plugin-react@npm:^2.1.0": version: 2.1.0 resolution: "@vitejs/plugin-react@npm:2.1.0" dependencies: @@ -40966,7 +40976,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:^3.1.0, vite@npm:^3.1.3": +"vite@npm:^3.1.0, vite@npm:^3.1.3, vite@npm:^3.1.7": version: 3.1.7 resolution: "vite@npm:3.1.7" dependencies: From 6cc2409998b5e3e4a70aaa84c4005bdb8b779685 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 13 Oct 2022 01:38:11 +0200 Subject: [PATCH 04/20] move lib/ui to manager/ui --- .github/autolabeler.yml | 2 +- code/.eslintrc.js | 8 ++++- .../core-server/src/__for-testing__/main.ts | 2 +- code/manager/.storybook/main.ts | 34 ++++++++++++++++--- code/manager/.storybook/preview-head.html | 3 +- code/manager/package.json | 11 ------ code/{lib => manager}/ui/README.md | 0 code/{lib => manager}/ui/package.json | 4 +-- code/{lib => manager}/ui/paths.js | 0 .../ui/scripts/generate-exports-file.ts | 0 code/{lib => manager}/ui/src/FakeProvider.tsx | 0 .../ui/src/__tests__/index.test.ts | 0 code/{lib => manager}/ui/src/app.stories.tsx | 0 code/{lib => manager}/ui/src/app.tsx | 0 .../ui/src/components/layout/Root.tsx | 0 .../ui/src/components/layout/app.mockdata.tsx | 0 .../ui/src/components/layout/container.tsx | 0 .../src/components/layout/desktop.stories.tsx | 0 .../ui/src/components/layout/desktop.tsx | 0 .../ui/src/components/layout/draggers.tsx | 0 .../src/components/layout/mobile.stories.tsx | 0 .../ui/src/components/layout/mobile.tsx | 0 .../ui/src/components/layout/persist.ts | 0 .../NotificationItem.stories.jsx | 0 .../notifications/NotificationItem.tsx | 4 +-- .../NotificationList.stories.jsx | 2 +- .../notifications/NotificationList.tsx | 0 .../ui/src/components/panel/panel.stories.tsx | 0 .../ui/src/components/panel/panel.tsx | 0 .../src/components/preview/FramesRenderer.tsx | 0 .../src/components/preview/iframe.stories.tsx | 0 .../ui/src/components/preview/iframe.tsx | 0 .../components/preview/preview.mockdata.tsx | 0 .../components/preview/preview.stories.tsx | 0 .../ui/src/components/preview/preview.tsx | 0 .../ui/src/components/preview/toolbar.tsx | 0 .../src/components/preview/tools/addons.tsx | 0 .../ui/src/components/preview/tools/copy.tsx | 0 .../ui/src/components/preview/tools/eject.tsx | 0 .../ui/src/components/preview/tools/menu.tsx | 0 .../src/components/preview/tools/remount.tsx | 0 .../ui/src/components/preview/tools/zoom.tsx | 0 .../components/preview/utils/components.ts | 0 .../preview/utils/stringifyQueryParams.tsx | 0 .../ui/src/components/preview/utils/types.tsx | 0 .../ui/src/components/preview/wrappers.tsx | 0 .../ui/src/components/sidebar/Brand.tsx | 0 .../components/sidebar/Explorer.stories.tsx | 0 .../ui/src/components/sidebar/Explorer.tsx | 0 .../components/sidebar/Heading.stories.tsx | 0 .../ui/src/components/sidebar/Heading.tsx | 0 .../components/sidebar/HighlightStyles.tsx | 0 .../ui/src/components/sidebar/Loader.tsx | 0 .../src/components/sidebar/Menu.stories.tsx | 0 .../ui/src/components/sidebar/Menu.tsx | 0 .../ui/src/components/sidebar/RefBlocks.tsx | 0 .../src/components/sidebar/RefIndicator.tsx | 0 .../src/components/sidebar/Refs.stories.tsx | 0 .../ui/src/components/sidebar/Refs.tsx | 0 .../src/components/sidebar/Search.stories.tsx | 0 .../ui/src/components/sidebar/Search.tsx | 0 .../sidebar/SearchResults.stories.tsx | 0 .../src/components/sidebar/SearchResults.tsx | 0 .../components/sidebar/Sidebar.stories.tsx | 0 .../ui/src/components/sidebar/Sidebar.tsx | 0 .../src/components/sidebar/Tree.stories.tsx | 0 .../ui/src/components/sidebar/Tree.tsx | 0 .../components/sidebar/TreeNode.stories.tsx | 0 .../ui/src/components/sidebar/TreeNode.tsx | 0 .../sidebar/__tests__/Sidebar.test.tsx | 0 .../src/components/sidebar/mockdata.large.ts | 0 .../ui/src/components/sidebar/mockdata.ts | 0 .../ui/src/components/sidebar/types.ts | 0 .../ui/src/components/sidebar/useExpanded.ts | 0 .../src/components/sidebar/useHighlighted.ts | 0 .../src/components/sidebar/useLastViewed.ts | 0 .../ui/src/components/sidebar/utils.test.js | 0 .../ui/src/components/sidebar/utils.ts | 0 .../ui/src/containers/menu.tsx | 0 .../ui/src/containers/notifications.tsx | 0 .../ui/src/containers/panel.stories.tsx | 0 .../ui/src/containers/panel.tsx | 0 .../ui/src/containers/preview.tsx | 0 .../ui/src/containers/sidebar.tsx | 0 code/{lib => manager}/ui/src/globals.ts | 0 .../ui/src/globals/definitions.ts | 0 .../ui/src/globals/exports.ts | 0 .../ui/src/globals/runtime.ts | 0 code/{lib => manager}/ui/src/globals/types.ts | 0 code/{lib => manager}/ui/src/index.tsx | 0 code/{lib => manager}/ui/src/keybinding.ts | 0 code/{lib => manager}/ui/src/provider.ts | 0 code/{lib => manager}/ui/src/runtime.ts | 0 .../src/settings/SettingsFooter.stories.tsx | 0 .../ui/src/settings/SettingsFooter.tsx | 0 .../ui/src/settings/about.stories.jsx | 0 .../ui/src/settings/about.tsx | 0 .../ui/src/settings/about_page.tsx | 0 .../ui/src/settings/index.tsx | 0 .../ui/src/settings/release_notes.stories.tsx | 0 .../ui/src/settings/release_notes.tsx | 0 .../ui/src/settings/release_notes_page.tsx | 0 .../ui/src/settings/shortcuts.stories.tsx | 0 .../ui/src/settings/shortcuts.test.js | 0 .../ui/src/settings/shortcuts.tsx | 0 .../ui/src/settings/shortcuts_page.tsx | 0 .../ui/src/settings/typings.d.ts | 0 code/{lib => manager}/ui/src/typings.d.ts | 0 code/{lib => manager}/ui/tsconfig.json | 0 code/manager/vite.config.ts | 8 ----- code/package.json | 5 ++- code/workspace.json | 2 +- code/yarn.lock | 18 ++++------ 113 files changed, 57 insertions(+), 46 deletions(-) delete mode 100644 code/manager/package.json rename code/{lib => manager}/ui/README.md (100%) rename code/{lib => manager}/ui/package.json (98%) rename code/{lib => manager}/ui/paths.js (100%) rename code/{lib => manager}/ui/scripts/generate-exports-file.ts (100%) rename code/{lib => manager}/ui/src/FakeProvider.tsx (100%) rename code/{lib => manager}/ui/src/__tests__/index.test.ts (100%) rename code/{lib => manager}/ui/src/app.stories.tsx (100%) rename code/{lib => manager}/ui/src/app.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/Root.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/app.mockdata.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/container.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/desktop.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/desktop.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/draggers.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/mobile.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/mobile.tsx (100%) rename code/{lib => manager}/ui/src/components/layout/persist.ts (100%) rename code/{lib => manager}/ui/src/components/notifications/NotificationItem.stories.jsx (100%) rename code/{lib => manager}/ui/src/components/notifications/NotificationItem.tsx (97%) rename code/{lib => manager}/ui/src/components/notifications/NotificationList.stories.jsx (99%) rename code/{lib => manager}/ui/src/components/notifications/NotificationList.tsx (100%) rename code/{lib => manager}/ui/src/components/panel/panel.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/panel/panel.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/FramesRenderer.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/iframe.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/iframe.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/preview.mockdata.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/preview.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/preview.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/toolbar.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/tools/addons.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/tools/copy.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/tools/eject.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/tools/menu.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/tools/remount.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/tools/zoom.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/utils/components.ts (100%) rename code/{lib => manager}/ui/src/components/preview/utils/stringifyQueryParams.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/utils/types.tsx (100%) rename code/{lib => manager}/ui/src/components/preview/wrappers.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Brand.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Explorer.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Explorer.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Heading.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Heading.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/HighlightStyles.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Loader.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Menu.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Menu.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/RefBlocks.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/RefIndicator.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Refs.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Refs.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Search.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Search.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/SearchResults.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/SearchResults.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Sidebar.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Sidebar.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Tree.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/Tree.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/TreeNode.stories.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/TreeNode.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/__tests__/Sidebar.test.tsx (100%) rename code/{lib => manager}/ui/src/components/sidebar/mockdata.large.ts (100%) rename code/{lib => manager}/ui/src/components/sidebar/mockdata.ts (100%) rename code/{lib => manager}/ui/src/components/sidebar/types.ts (100%) rename code/{lib => manager}/ui/src/components/sidebar/useExpanded.ts (100%) rename code/{lib => manager}/ui/src/components/sidebar/useHighlighted.ts (100%) rename code/{lib => manager}/ui/src/components/sidebar/useLastViewed.ts (100%) rename code/{lib => manager}/ui/src/components/sidebar/utils.test.js (100%) rename code/{lib => manager}/ui/src/components/sidebar/utils.ts (100%) rename code/{lib => manager}/ui/src/containers/menu.tsx (100%) rename code/{lib => manager}/ui/src/containers/notifications.tsx (100%) rename code/{lib => manager}/ui/src/containers/panel.stories.tsx (100%) rename code/{lib => manager}/ui/src/containers/panel.tsx (100%) rename code/{lib => manager}/ui/src/containers/preview.tsx (100%) rename code/{lib => manager}/ui/src/containers/sidebar.tsx (100%) rename code/{lib => manager}/ui/src/globals.ts (100%) rename code/{lib => manager}/ui/src/globals/definitions.ts (100%) rename code/{lib => manager}/ui/src/globals/exports.ts (100%) rename code/{lib => manager}/ui/src/globals/runtime.ts (100%) rename code/{lib => manager}/ui/src/globals/types.ts (100%) rename code/{lib => manager}/ui/src/index.tsx (100%) rename code/{lib => manager}/ui/src/keybinding.ts (100%) rename code/{lib => manager}/ui/src/provider.ts (100%) rename code/{lib => manager}/ui/src/runtime.ts (100%) rename code/{lib => manager}/ui/src/settings/SettingsFooter.stories.tsx (100%) rename code/{lib => manager}/ui/src/settings/SettingsFooter.tsx (100%) rename code/{lib => manager}/ui/src/settings/about.stories.jsx (100%) rename code/{lib => manager}/ui/src/settings/about.tsx (100%) rename code/{lib => manager}/ui/src/settings/about_page.tsx (100%) rename code/{lib => manager}/ui/src/settings/index.tsx (100%) rename code/{lib => manager}/ui/src/settings/release_notes.stories.tsx (100%) rename code/{lib => manager}/ui/src/settings/release_notes.tsx (100%) rename code/{lib => manager}/ui/src/settings/release_notes_page.tsx (100%) rename code/{lib => manager}/ui/src/settings/shortcuts.stories.tsx (100%) rename code/{lib => manager}/ui/src/settings/shortcuts.test.js (100%) rename code/{lib => manager}/ui/src/settings/shortcuts.tsx (100%) rename code/{lib => manager}/ui/src/settings/shortcuts_page.tsx (100%) rename code/{lib => manager}/ui/src/settings/typings.d.ts (100%) rename code/{lib => manager}/ui/src/typings.d.ts (100%) rename code/{lib => manager}/ui/tsconfig.json (100%) delete mode 100644 code/manager/vite.config.ts diff --git a/.github/autolabeler.yml b/.github/autolabeler.yml index 8adb8d84007..ea78617289c 100644 --- a/.github/autolabeler.yml +++ b/.github/autolabeler.yml @@ -22,4 +22,4 @@ 'cli': ['lib/cli/**'] 'compatibility with other tools': [] 'documentation': ['docs', '*.md'] -'ui': ['lib/ui'] +'ui': ['manager/ui'] diff --git a/code/.eslintrc.js b/code/.eslintrc.js index 8fb5803f5c0..87d2e5f9466 100644 --- a/code/.eslintrc.js +++ b/code/.eslintrc.js @@ -26,13 +26,19 @@ module.exports = { files: [ '**/lib/theming/**/*', '**/lib/router/**/*', - '**/lib/ui/**/*', + '**/manager/ui/**/*', '**/lib/components/**/*', ], rules: { 'import/no-extraneous-dependencies': ['error', { bundledDependencies: false }], }, }, + { + files: ['**/manager/*', '**/manager/.storybook/*'], + rules: { + 'import/no-extraneous-dependencies': ['error', { packageDir: __dirname }], + }, + }, { files: [ '**/__tests__/**', diff --git a/code/lib/core-server/src/__for-testing__/main.ts b/code/lib/core-server/src/__for-testing__/main.ts index 0be49d5c46b..31e7e4f8499 100644 --- a/code/lib/core-server/src/__for-testing__/main.ts +++ b/code/lib/core-server/src/__for-testing__/main.ts @@ -5,7 +5,7 @@ import type { StorybookConfig } from '@storybook/react-webpack5'; const config: StorybookConfig = { stories: [ - '../../lib/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', + '../../manager/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', '../../lib/components/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', './../../addons/docs/**/*.stories.@(ts|tsx|js|jsx|mdx)', './../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', diff --git a/code/manager/.storybook/main.ts b/code/manager/.storybook/main.ts index 2b3762378c0..0ae04d9157b 100644 --- a/code/manager/.storybook/main.ts +++ b/code/manager/.storybook/main.ts @@ -1,10 +1,10 @@ -import type { StorybookConfig } from '../../frameworks/react-vite/dist'; import vitePluginReact from '@vitejs/plugin-react'; -import { mergeConfig } from 'vite'; +import { PluginOption } from 'vite'; +import type { StorybookConfig } from '../../frameworks/react-vite/dist'; const config: StorybookConfig = { stories: [ - '../../lib/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', + '../ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', // '../../lib/components/src/**/*.stories.@(js|jsx|ts|tsx|mdx)', // '../../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', ], @@ -17,7 +17,33 @@ const config: StorybookConfig = { name: '@storybook/react-vite', options: {}, }, - logLevel: 'debug', + /* + This might look complex but all we're doing is removing the default set of React Vite plugins + and adding them back in, but with the `jsxRuntime: 'classic'` option. + TODO: When we've upgraded to React 18 all of this shouldn't be necessary anymore + */ + viteFinal: (config) => { + return { + ...config, + plugins: [...withoutReactPlugins(config.plugins), vitePluginReact({ jsxRuntime: 'classic' })], + }; + }, }; +// recursively remove all plugins from the React Vite plugin +const withoutReactPlugins = (plugins: PluginOption[] = []) => + plugins.map((plugin) => { + if (Array.isArray(plugin)) { + return withoutReactPlugins(plugin); + } + if ( + plugin && + 'name' in plugin && + ['vite:react-jsx', 'vite:react-babel', 'vite:react-refresh'].includes(plugin.name) + ) { + return false; + } + return plugin; + }); + export default config; diff --git a/code/manager/.storybook/preview-head.html b/code/manager/.storybook/preview-head.html index 05da1e9dfbf..8eb8709c1b7 100644 --- a/code/manager/.storybook/preview-head.html +++ b/code/manager/.storybook/preview-head.html @@ -1,3 +1,4 @@ \ No newline at end of file + diff --git a/code/manager/package.json b/code/manager/package.json deleted file mode 100644 index 4a9d3bbf58d..00000000000 --- a/code/manager/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@storybook/manager", - "private": true, - "type": "module", - "packageManager": "yarn@3.2.3", - "dependencies": { - "@vitejs/plugin-react": "^2.1.0", - "typescript": "^4.8.4", - "vite": "^3.1.7" - } -} diff --git a/code/lib/ui/README.md b/code/manager/ui/README.md similarity index 100% rename from code/lib/ui/README.md rename to code/manager/ui/README.md diff --git a/code/lib/ui/package.json b/code/manager/ui/package.json similarity index 98% rename from code/lib/ui/package.json rename to code/manager/ui/package.json index 10ae31181d4..32b5c040fdd 100644 --- a/code/lib/ui/package.json +++ b/code/manager/ui/package.json @@ -5,14 +5,14 @@ "keywords": [ "storybook" ], - "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/ui", + "homepage": "https://github.com/storybookjs/storybook/tree/main/code/manager/ui", "bugs": { "url": "https://github.com/storybookjs/storybook/issues" }, "repository": { "type": "git", "url": "https://github.com/storybookjs/storybook.git", - "directory": "lib/ui" + "directory": "code/manager/ui" }, "funding": { "type": "opencollective", diff --git a/code/lib/ui/paths.js b/code/manager/ui/paths.js similarity index 100% rename from code/lib/ui/paths.js rename to code/manager/ui/paths.js diff --git a/code/lib/ui/scripts/generate-exports-file.ts b/code/manager/ui/scripts/generate-exports-file.ts similarity index 100% rename from code/lib/ui/scripts/generate-exports-file.ts rename to code/manager/ui/scripts/generate-exports-file.ts diff --git a/code/lib/ui/src/FakeProvider.tsx b/code/manager/ui/src/FakeProvider.tsx similarity index 100% rename from code/lib/ui/src/FakeProvider.tsx rename to code/manager/ui/src/FakeProvider.tsx diff --git a/code/lib/ui/src/__tests__/index.test.ts b/code/manager/ui/src/__tests__/index.test.ts similarity index 100% rename from code/lib/ui/src/__tests__/index.test.ts rename to code/manager/ui/src/__tests__/index.test.ts diff --git a/code/lib/ui/src/app.stories.tsx b/code/manager/ui/src/app.stories.tsx similarity index 100% rename from code/lib/ui/src/app.stories.tsx rename to code/manager/ui/src/app.stories.tsx diff --git a/code/lib/ui/src/app.tsx b/code/manager/ui/src/app.tsx similarity index 100% rename from code/lib/ui/src/app.tsx rename to code/manager/ui/src/app.tsx diff --git a/code/lib/ui/src/components/layout/Root.tsx b/code/manager/ui/src/components/layout/Root.tsx similarity index 100% rename from code/lib/ui/src/components/layout/Root.tsx rename to code/manager/ui/src/components/layout/Root.tsx diff --git a/code/lib/ui/src/components/layout/app.mockdata.tsx b/code/manager/ui/src/components/layout/app.mockdata.tsx similarity index 100% rename from code/lib/ui/src/components/layout/app.mockdata.tsx rename to code/manager/ui/src/components/layout/app.mockdata.tsx diff --git a/code/lib/ui/src/components/layout/container.tsx b/code/manager/ui/src/components/layout/container.tsx similarity index 100% rename from code/lib/ui/src/components/layout/container.tsx rename to code/manager/ui/src/components/layout/container.tsx diff --git a/code/lib/ui/src/components/layout/desktop.stories.tsx b/code/manager/ui/src/components/layout/desktop.stories.tsx similarity index 100% rename from code/lib/ui/src/components/layout/desktop.stories.tsx rename to code/manager/ui/src/components/layout/desktop.stories.tsx diff --git a/code/lib/ui/src/components/layout/desktop.tsx b/code/manager/ui/src/components/layout/desktop.tsx similarity index 100% rename from code/lib/ui/src/components/layout/desktop.tsx rename to code/manager/ui/src/components/layout/desktop.tsx diff --git a/code/lib/ui/src/components/layout/draggers.tsx b/code/manager/ui/src/components/layout/draggers.tsx similarity index 100% rename from code/lib/ui/src/components/layout/draggers.tsx rename to code/manager/ui/src/components/layout/draggers.tsx diff --git a/code/lib/ui/src/components/layout/mobile.stories.tsx b/code/manager/ui/src/components/layout/mobile.stories.tsx similarity index 100% rename from code/lib/ui/src/components/layout/mobile.stories.tsx rename to code/manager/ui/src/components/layout/mobile.stories.tsx diff --git a/code/lib/ui/src/components/layout/mobile.tsx b/code/manager/ui/src/components/layout/mobile.tsx similarity index 100% rename from code/lib/ui/src/components/layout/mobile.tsx rename to code/manager/ui/src/components/layout/mobile.tsx diff --git a/code/lib/ui/src/components/layout/persist.ts b/code/manager/ui/src/components/layout/persist.ts similarity index 100% rename from code/lib/ui/src/components/layout/persist.ts rename to code/manager/ui/src/components/layout/persist.ts diff --git a/code/lib/ui/src/components/notifications/NotificationItem.stories.jsx b/code/manager/ui/src/components/notifications/NotificationItem.stories.jsx similarity index 100% rename from code/lib/ui/src/components/notifications/NotificationItem.stories.jsx rename to code/manager/ui/src/components/notifications/NotificationItem.stories.jsx diff --git a/code/lib/ui/src/components/notifications/NotificationItem.tsx b/code/manager/ui/src/components/notifications/NotificationItem.tsx similarity index 97% rename from code/lib/ui/src/components/notifications/NotificationItem.tsx rename to code/manager/ui/src/components/notifications/NotificationItem.tsx index 695c3638e50..9f4b54292b9 100644 --- a/code/lib/ui/src/components/notifications/NotificationItem.tsx +++ b/code/manager/ui/src/components/notifications/NotificationItem.tsx @@ -1,8 +1,8 @@ import React, { FC, SyntheticEvent } from 'react'; -import { State } from '@storybook/api'; +import { type State } from '@storybook/api'; import { Link } from '@storybook/router'; import { styled } from '@storybook/theming'; -import { Icons, IconButton, IconsProps } from '@storybook/components'; +import { Icons, IconButton, type IconsProps } from '@storybook/components'; import { transparentize } from 'polished'; const DEFAULT_ICON_COLOUR = '#66BF3C' as const; diff --git a/code/lib/ui/src/components/notifications/NotificationList.stories.jsx b/code/manager/ui/src/components/notifications/NotificationList.stories.jsx similarity index 99% rename from code/lib/ui/src/components/notifications/NotificationList.stories.jsx rename to code/manager/ui/src/components/notifications/NotificationList.stories.jsx index cb792b88d08..7691f46630c 100644 --- a/code/lib/ui/src/components/notifications/NotificationList.stories.jsx +++ b/code/manager/ui/src/components/notifications/NotificationList.stories.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { LocationProvider } from '@storybook/router'; import NotificationList from './NotificationList'; -import itemMeta, * as itemStories from './NotificationItem.stories'; +import itemMeta, * as itemStories from './NotificationItem.stories.jsx'; export default { component: NotificationList, diff --git a/code/lib/ui/src/components/notifications/NotificationList.tsx b/code/manager/ui/src/components/notifications/NotificationList.tsx similarity index 100% rename from code/lib/ui/src/components/notifications/NotificationList.tsx rename to code/manager/ui/src/components/notifications/NotificationList.tsx diff --git a/code/lib/ui/src/components/panel/panel.stories.tsx b/code/manager/ui/src/components/panel/panel.stories.tsx similarity index 100% rename from code/lib/ui/src/components/panel/panel.stories.tsx rename to code/manager/ui/src/components/panel/panel.stories.tsx diff --git a/code/lib/ui/src/components/panel/panel.tsx b/code/manager/ui/src/components/panel/panel.tsx similarity index 100% rename from code/lib/ui/src/components/panel/panel.tsx rename to code/manager/ui/src/components/panel/panel.tsx diff --git a/code/lib/ui/src/components/preview/FramesRenderer.tsx b/code/manager/ui/src/components/preview/FramesRenderer.tsx similarity index 100% rename from code/lib/ui/src/components/preview/FramesRenderer.tsx rename to code/manager/ui/src/components/preview/FramesRenderer.tsx diff --git a/code/lib/ui/src/components/preview/iframe.stories.tsx b/code/manager/ui/src/components/preview/iframe.stories.tsx similarity index 100% rename from code/lib/ui/src/components/preview/iframe.stories.tsx rename to code/manager/ui/src/components/preview/iframe.stories.tsx diff --git a/code/lib/ui/src/components/preview/iframe.tsx b/code/manager/ui/src/components/preview/iframe.tsx similarity index 100% rename from code/lib/ui/src/components/preview/iframe.tsx rename to code/manager/ui/src/components/preview/iframe.tsx diff --git a/code/lib/ui/src/components/preview/preview.mockdata.tsx b/code/manager/ui/src/components/preview/preview.mockdata.tsx similarity index 100% rename from code/lib/ui/src/components/preview/preview.mockdata.tsx rename to code/manager/ui/src/components/preview/preview.mockdata.tsx diff --git a/code/lib/ui/src/components/preview/preview.stories.tsx b/code/manager/ui/src/components/preview/preview.stories.tsx similarity index 100% rename from code/lib/ui/src/components/preview/preview.stories.tsx rename to code/manager/ui/src/components/preview/preview.stories.tsx diff --git a/code/lib/ui/src/components/preview/preview.tsx b/code/manager/ui/src/components/preview/preview.tsx similarity index 100% rename from code/lib/ui/src/components/preview/preview.tsx rename to code/manager/ui/src/components/preview/preview.tsx diff --git a/code/lib/ui/src/components/preview/toolbar.tsx b/code/manager/ui/src/components/preview/toolbar.tsx similarity index 100% rename from code/lib/ui/src/components/preview/toolbar.tsx rename to code/manager/ui/src/components/preview/toolbar.tsx diff --git a/code/lib/ui/src/components/preview/tools/addons.tsx b/code/manager/ui/src/components/preview/tools/addons.tsx similarity index 100% rename from code/lib/ui/src/components/preview/tools/addons.tsx rename to code/manager/ui/src/components/preview/tools/addons.tsx diff --git a/code/lib/ui/src/components/preview/tools/copy.tsx b/code/manager/ui/src/components/preview/tools/copy.tsx similarity index 100% rename from code/lib/ui/src/components/preview/tools/copy.tsx rename to code/manager/ui/src/components/preview/tools/copy.tsx diff --git a/code/lib/ui/src/components/preview/tools/eject.tsx b/code/manager/ui/src/components/preview/tools/eject.tsx similarity index 100% rename from code/lib/ui/src/components/preview/tools/eject.tsx rename to code/manager/ui/src/components/preview/tools/eject.tsx diff --git a/code/lib/ui/src/components/preview/tools/menu.tsx b/code/manager/ui/src/components/preview/tools/menu.tsx similarity index 100% rename from code/lib/ui/src/components/preview/tools/menu.tsx rename to code/manager/ui/src/components/preview/tools/menu.tsx diff --git a/code/lib/ui/src/components/preview/tools/remount.tsx b/code/manager/ui/src/components/preview/tools/remount.tsx similarity index 100% rename from code/lib/ui/src/components/preview/tools/remount.tsx rename to code/manager/ui/src/components/preview/tools/remount.tsx diff --git a/code/lib/ui/src/components/preview/tools/zoom.tsx b/code/manager/ui/src/components/preview/tools/zoom.tsx similarity index 100% rename from code/lib/ui/src/components/preview/tools/zoom.tsx rename to code/manager/ui/src/components/preview/tools/zoom.tsx diff --git a/code/lib/ui/src/components/preview/utils/components.ts b/code/manager/ui/src/components/preview/utils/components.ts similarity index 100% rename from code/lib/ui/src/components/preview/utils/components.ts rename to code/manager/ui/src/components/preview/utils/components.ts diff --git a/code/lib/ui/src/components/preview/utils/stringifyQueryParams.tsx b/code/manager/ui/src/components/preview/utils/stringifyQueryParams.tsx similarity index 100% rename from code/lib/ui/src/components/preview/utils/stringifyQueryParams.tsx rename to code/manager/ui/src/components/preview/utils/stringifyQueryParams.tsx diff --git a/code/lib/ui/src/components/preview/utils/types.tsx b/code/manager/ui/src/components/preview/utils/types.tsx similarity index 100% rename from code/lib/ui/src/components/preview/utils/types.tsx rename to code/manager/ui/src/components/preview/utils/types.tsx diff --git a/code/lib/ui/src/components/preview/wrappers.tsx b/code/manager/ui/src/components/preview/wrappers.tsx similarity index 100% rename from code/lib/ui/src/components/preview/wrappers.tsx rename to code/manager/ui/src/components/preview/wrappers.tsx diff --git a/code/lib/ui/src/components/sidebar/Brand.tsx b/code/manager/ui/src/components/sidebar/Brand.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Brand.tsx rename to code/manager/ui/src/components/sidebar/Brand.tsx diff --git a/code/lib/ui/src/components/sidebar/Explorer.stories.tsx b/code/manager/ui/src/components/sidebar/Explorer.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Explorer.stories.tsx rename to code/manager/ui/src/components/sidebar/Explorer.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/Explorer.tsx b/code/manager/ui/src/components/sidebar/Explorer.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Explorer.tsx rename to code/manager/ui/src/components/sidebar/Explorer.tsx diff --git a/code/lib/ui/src/components/sidebar/Heading.stories.tsx b/code/manager/ui/src/components/sidebar/Heading.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Heading.stories.tsx rename to code/manager/ui/src/components/sidebar/Heading.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/Heading.tsx b/code/manager/ui/src/components/sidebar/Heading.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Heading.tsx rename to code/manager/ui/src/components/sidebar/Heading.tsx diff --git a/code/lib/ui/src/components/sidebar/HighlightStyles.tsx b/code/manager/ui/src/components/sidebar/HighlightStyles.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/HighlightStyles.tsx rename to code/manager/ui/src/components/sidebar/HighlightStyles.tsx diff --git a/code/lib/ui/src/components/sidebar/Loader.tsx b/code/manager/ui/src/components/sidebar/Loader.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Loader.tsx rename to code/manager/ui/src/components/sidebar/Loader.tsx diff --git a/code/lib/ui/src/components/sidebar/Menu.stories.tsx b/code/manager/ui/src/components/sidebar/Menu.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Menu.stories.tsx rename to code/manager/ui/src/components/sidebar/Menu.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/Menu.tsx b/code/manager/ui/src/components/sidebar/Menu.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Menu.tsx rename to code/manager/ui/src/components/sidebar/Menu.tsx diff --git a/code/lib/ui/src/components/sidebar/RefBlocks.tsx b/code/manager/ui/src/components/sidebar/RefBlocks.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/RefBlocks.tsx rename to code/manager/ui/src/components/sidebar/RefBlocks.tsx diff --git a/code/lib/ui/src/components/sidebar/RefIndicator.tsx b/code/manager/ui/src/components/sidebar/RefIndicator.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/RefIndicator.tsx rename to code/manager/ui/src/components/sidebar/RefIndicator.tsx diff --git a/code/lib/ui/src/components/sidebar/Refs.stories.tsx b/code/manager/ui/src/components/sidebar/Refs.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Refs.stories.tsx rename to code/manager/ui/src/components/sidebar/Refs.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/Refs.tsx b/code/manager/ui/src/components/sidebar/Refs.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Refs.tsx rename to code/manager/ui/src/components/sidebar/Refs.tsx diff --git a/code/lib/ui/src/components/sidebar/Search.stories.tsx b/code/manager/ui/src/components/sidebar/Search.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Search.stories.tsx rename to code/manager/ui/src/components/sidebar/Search.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/Search.tsx b/code/manager/ui/src/components/sidebar/Search.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Search.tsx rename to code/manager/ui/src/components/sidebar/Search.tsx diff --git a/code/lib/ui/src/components/sidebar/SearchResults.stories.tsx b/code/manager/ui/src/components/sidebar/SearchResults.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/SearchResults.stories.tsx rename to code/manager/ui/src/components/sidebar/SearchResults.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/SearchResults.tsx b/code/manager/ui/src/components/sidebar/SearchResults.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/SearchResults.tsx rename to code/manager/ui/src/components/sidebar/SearchResults.tsx diff --git a/code/lib/ui/src/components/sidebar/Sidebar.stories.tsx b/code/manager/ui/src/components/sidebar/Sidebar.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Sidebar.stories.tsx rename to code/manager/ui/src/components/sidebar/Sidebar.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/Sidebar.tsx b/code/manager/ui/src/components/sidebar/Sidebar.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Sidebar.tsx rename to code/manager/ui/src/components/sidebar/Sidebar.tsx diff --git a/code/lib/ui/src/components/sidebar/Tree.stories.tsx b/code/manager/ui/src/components/sidebar/Tree.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Tree.stories.tsx rename to code/manager/ui/src/components/sidebar/Tree.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/Tree.tsx b/code/manager/ui/src/components/sidebar/Tree.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/Tree.tsx rename to code/manager/ui/src/components/sidebar/Tree.tsx diff --git a/code/lib/ui/src/components/sidebar/TreeNode.stories.tsx b/code/manager/ui/src/components/sidebar/TreeNode.stories.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/TreeNode.stories.tsx rename to code/manager/ui/src/components/sidebar/TreeNode.stories.tsx diff --git a/code/lib/ui/src/components/sidebar/TreeNode.tsx b/code/manager/ui/src/components/sidebar/TreeNode.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/TreeNode.tsx rename to code/manager/ui/src/components/sidebar/TreeNode.tsx diff --git a/code/lib/ui/src/components/sidebar/__tests__/Sidebar.test.tsx b/code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx similarity index 100% rename from code/lib/ui/src/components/sidebar/__tests__/Sidebar.test.tsx rename to code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx diff --git a/code/lib/ui/src/components/sidebar/mockdata.large.ts b/code/manager/ui/src/components/sidebar/mockdata.large.ts similarity index 100% rename from code/lib/ui/src/components/sidebar/mockdata.large.ts rename to code/manager/ui/src/components/sidebar/mockdata.large.ts diff --git a/code/lib/ui/src/components/sidebar/mockdata.ts b/code/manager/ui/src/components/sidebar/mockdata.ts similarity index 100% rename from code/lib/ui/src/components/sidebar/mockdata.ts rename to code/manager/ui/src/components/sidebar/mockdata.ts diff --git a/code/lib/ui/src/components/sidebar/types.ts b/code/manager/ui/src/components/sidebar/types.ts similarity index 100% rename from code/lib/ui/src/components/sidebar/types.ts rename to code/manager/ui/src/components/sidebar/types.ts diff --git a/code/lib/ui/src/components/sidebar/useExpanded.ts b/code/manager/ui/src/components/sidebar/useExpanded.ts similarity index 100% rename from code/lib/ui/src/components/sidebar/useExpanded.ts rename to code/manager/ui/src/components/sidebar/useExpanded.ts diff --git a/code/lib/ui/src/components/sidebar/useHighlighted.ts b/code/manager/ui/src/components/sidebar/useHighlighted.ts similarity index 100% rename from code/lib/ui/src/components/sidebar/useHighlighted.ts rename to code/manager/ui/src/components/sidebar/useHighlighted.ts diff --git a/code/lib/ui/src/components/sidebar/useLastViewed.ts b/code/manager/ui/src/components/sidebar/useLastViewed.ts similarity index 100% rename from code/lib/ui/src/components/sidebar/useLastViewed.ts rename to code/manager/ui/src/components/sidebar/useLastViewed.ts diff --git a/code/lib/ui/src/components/sidebar/utils.test.js b/code/manager/ui/src/components/sidebar/utils.test.js similarity index 100% rename from code/lib/ui/src/components/sidebar/utils.test.js rename to code/manager/ui/src/components/sidebar/utils.test.js diff --git a/code/lib/ui/src/components/sidebar/utils.ts b/code/manager/ui/src/components/sidebar/utils.ts similarity index 100% rename from code/lib/ui/src/components/sidebar/utils.ts rename to code/manager/ui/src/components/sidebar/utils.ts diff --git a/code/lib/ui/src/containers/menu.tsx b/code/manager/ui/src/containers/menu.tsx similarity index 100% rename from code/lib/ui/src/containers/menu.tsx rename to code/manager/ui/src/containers/menu.tsx diff --git a/code/lib/ui/src/containers/notifications.tsx b/code/manager/ui/src/containers/notifications.tsx similarity index 100% rename from code/lib/ui/src/containers/notifications.tsx rename to code/manager/ui/src/containers/notifications.tsx diff --git a/code/lib/ui/src/containers/panel.stories.tsx b/code/manager/ui/src/containers/panel.stories.tsx similarity index 100% rename from code/lib/ui/src/containers/panel.stories.tsx rename to code/manager/ui/src/containers/panel.stories.tsx diff --git a/code/lib/ui/src/containers/panel.tsx b/code/manager/ui/src/containers/panel.tsx similarity index 100% rename from code/lib/ui/src/containers/panel.tsx rename to code/manager/ui/src/containers/panel.tsx diff --git a/code/lib/ui/src/containers/preview.tsx b/code/manager/ui/src/containers/preview.tsx similarity index 100% rename from code/lib/ui/src/containers/preview.tsx rename to code/manager/ui/src/containers/preview.tsx diff --git a/code/lib/ui/src/containers/sidebar.tsx b/code/manager/ui/src/containers/sidebar.tsx similarity index 100% rename from code/lib/ui/src/containers/sidebar.tsx rename to code/manager/ui/src/containers/sidebar.tsx diff --git a/code/lib/ui/src/globals.ts b/code/manager/ui/src/globals.ts similarity index 100% rename from code/lib/ui/src/globals.ts rename to code/manager/ui/src/globals.ts diff --git a/code/lib/ui/src/globals/definitions.ts b/code/manager/ui/src/globals/definitions.ts similarity index 100% rename from code/lib/ui/src/globals/definitions.ts rename to code/manager/ui/src/globals/definitions.ts diff --git a/code/lib/ui/src/globals/exports.ts b/code/manager/ui/src/globals/exports.ts similarity index 100% rename from code/lib/ui/src/globals/exports.ts rename to code/manager/ui/src/globals/exports.ts diff --git a/code/lib/ui/src/globals/runtime.ts b/code/manager/ui/src/globals/runtime.ts similarity index 100% rename from code/lib/ui/src/globals/runtime.ts rename to code/manager/ui/src/globals/runtime.ts diff --git a/code/lib/ui/src/globals/types.ts b/code/manager/ui/src/globals/types.ts similarity index 100% rename from code/lib/ui/src/globals/types.ts rename to code/manager/ui/src/globals/types.ts diff --git a/code/lib/ui/src/index.tsx b/code/manager/ui/src/index.tsx similarity index 100% rename from code/lib/ui/src/index.tsx rename to code/manager/ui/src/index.tsx diff --git a/code/lib/ui/src/keybinding.ts b/code/manager/ui/src/keybinding.ts similarity index 100% rename from code/lib/ui/src/keybinding.ts rename to code/manager/ui/src/keybinding.ts diff --git a/code/lib/ui/src/provider.ts b/code/manager/ui/src/provider.ts similarity index 100% rename from code/lib/ui/src/provider.ts rename to code/manager/ui/src/provider.ts diff --git a/code/lib/ui/src/runtime.ts b/code/manager/ui/src/runtime.ts similarity index 100% rename from code/lib/ui/src/runtime.ts rename to code/manager/ui/src/runtime.ts diff --git a/code/lib/ui/src/settings/SettingsFooter.stories.tsx b/code/manager/ui/src/settings/SettingsFooter.stories.tsx similarity index 100% rename from code/lib/ui/src/settings/SettingsFooter.stories.tsx rename to code/manager/ui/src/settings/SettingsFooter.stories.tsx diff --git a/code/lib/ui/src/settings/SettingsFooter.tsx b/code/manager/ui/src/settings/SettingsFooter.tsx similarity index 100% rename from code/lib/ui/src/settings/SettingsFooter.tsx rename to code/manager/ui/src/settings/SettingsFooter.tsx diff --git a/code/lib/ui/src/settings/about.stories.jsx b/code/manager/ui/src/settings/about.stories.jsx similarity index 100% rename from code/lib/ui/src/settings/about.stories.jsx rename to code/manager/ui/src/settings/about.stories.jsx diff --git a/code/lib/ui/src/settings/about.tsx b/code/manager/ui/src/settings/about.tsx similarity index 100% rename from code/lib/ui/src/settings/about.tsx rename to code/manager/ui/src/settings/about.tsx diff --git a/code/lib/ui/src/settings/about_page.tsx b/code/manager/ui/src/settings/about_page.tsx similarity index 100% rename from code/lib/ui/src/settings/about_page.tsx rename to code/manager/ui/src/settings/about_page.tsx diff --git a/code/lib/ui/src/settings/index.tsx b/code/manager/ui/src/settings/index.tsx similarity index 100% rename from code/lib/ui/src/settings/index.tsx rename to code/manager/ui/src/settings/index.tsx diff --git a/code/lib/ui/src/settings/release_notes.stories.tsx b/code/manager/ui/src/settings/release_notes.stories.tsx similarity index 100% rename from code/lib/ui/src/settings/release_notes.stories.tsx rename to code/manager/ui/src/settings/release_notes.stories.tsx diff --git a/code/lib/ui/src/settings/release_notes.tsx b/code/manager/ui/src/settings/release_notes.tsx similarity index 100% rename from code/lib/ui/src/settings/release_notes.tsx rename to code/manager/ui/src/settings/release_notes.tsx diff --git a/code/lib/ui/src/settings/release_notes_page.tsx b/code/manager/ui/src/settings/release_notes_page.tsx similarity index 100% rename from code/lib/ui/src/settings/release_notes_page.tsx rename to code/manager/ui/src/settings/release_notes_page.tsx diff --git a/code/lib/ui/src/settings/shortcuts.stories.tsx b/code/manager/ui/src/settings/shortcuts.stories.tsx similarity index 100% rename from code/lib/ui/src/settings/shortcuts.stories.tsx rename to code/manager/ui/src/settings/shortcuts.stories.tsx diff --git a/code/lib/ui/src/settings/shortcuts.test.js b/code/manager/ui/src/settings/shortcuts.test.js similarity index 100% rename from code/lib/ui/src/settings/shortcuts.test.js rename to code/manager/ui/src/settings/shortcuts.test.js diff --git a/code/lib/ui/src/settings/shortcuts.tsx b/code/manager/ui/src/settings/shortcuts.tsx similarity index 100% rename from code/lib/ui/src/settings/shortcuts.tsx rename to code/manager/ui/src/settings/shortcuts.tsx diff --git a/code/lib/ui/src/settings/shortcuts_page.tsx b/code/manager/ui/src/settings/shortcuts_page.tsx similarity index 100% rename from code/lib/ui/src/settings/shortcuts_page.tsx rename to code/manager/ui/src/settings/shortcuts_page.tsx diff --git a/code/lib/ui/src/settings/typings.d.ts b/code/manager/ui/src/settings/typings.d.ts similarity index 100% rename from code/lib/ui/src/settings/typings.d.ts rename to code/manager/ui/src/settings/typings.d.ts diff --git a/code/lib/ui/src/typings.d.ts b/code/manager/ui/src/typings.d.ts similarity index 100% rename from code/lib/ui/src/typings.d.ts rename to code/manager/ui/src/typings.d.ts diff --git a/code/lib/ui/tsconfig.json b/code/manager/ui/tsconfig.json similarity index 100% rename from code/lib/ui/tsconfig.json rename to code/manager/ui/tsconfig.json diff --git a/code/manager/vite.config.ts b/code/manager/vite.config.ts deleted file mode 100644 index e952df93d69..00000000000 --- a/code/manager/vite.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; - -// https://vitejs.dev/config/ -export default defineConfig({ - // TODO: remove classic jsxRuntime once we upgrade to React 18 - plugins: [react({ jsxRuntime: 'classic' })], -}); diff --git a/code/package.json b/code/package.json index ae39f649009..65b9fc002aa 100644 --- a/code/package.json +++ b/code/package.json @@ -46,7 +46,6 @@ "frameworks/*", "lib/*", "lib/cli/test/run/*", - "manager", "manager/*", "presets/*", "renderers/*" @@ -256,6 +255,7 @@ "@typescript-eslint/eslint-plugin": "^5.15.0", "@typescript-eslint/experimental-utils": "^5.20.0", "@typescript-eslint/parser": "^5.15.0", + "@vitejs/plugin-react": "^2.1.0", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", @@ -287,6 +287,7 @@ "fs-extra": "^9.0.1", "github-release-from-changelog": "^2.1.1", "glob": "^7.1.6", + "global": "^4.4.0", "http-server": "^0.12.3", "husky": "^4.3.7", "jest": "^26.6.3", @@ -317,6 +318,7 @@ "process": "^0.11.10", "prompts": "^2.4.0", "raf": "^3.4.1", + "react": "^16.8.0", "read-pkg-up": "^7.0.1", "regenerator-runtime": "^0.13.7", "remark": "^13.0.0", @@ -336,6 +338,7 @@ "tsup": "^6.2.2", "typescript": "4.7.4", "util": "^0.12.4", + "vite": "^3.1.7", "wait-on": "^5.2.1", "web-component-analyzer": "^1.1.6", "webpack": "5", diff --git a/code/workspace.json b/code/workspace.json index 23d0bc9244f..cdd2202b0d6 100644 --- a/code/workspace.json +++ b/code/workspace.json @@ -362,7 +362,7 @@ "implicitDependencies": [] }, "@storybook/ui": { - "root": "lib/ui", + "root": "manager/ui", "type": "library", "implicitDependencies": [] }, diff --git a/code/yarn.lock b/code/yarn.lock index a946f440c75..fd750f25228 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7908,16 +7908,6 @@ __metadata: languageName: node linkType: hard -"@storybook/manager@workspace:manager": - version: 0.0.0-use.local - resolution: "@storybook/manager@workspace:manager" - dependencies: - "@vitejs/plugin-react": ^2.1.0 - typescript: ^4.8.4 - vite: ^3.1.7 - languageName: unknown - linkType: soft - "@storybook/mdx1-csf@npm:0.0.5-canary.13.9ce928a.0": version: 0.0.5-canary.13.9ce928a.0 resolution: "@storybook/mdx1-csf@npm:0.0.5-canary.13.9ce928a.0" @@ -8481,6 +8471,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.15.0 "@typescript-eslint/experimental-utils": ^5.20.0 "@typescript-eslint/parser": ^5.15.0 + "@vitejs/plugin-react": ^2.1.0 babel-core: ^7.0.0-bridge.0 babel-eslint: ^10.1.0 babel-jest: ^26.6.3 @@ -8512,6 +8503,7 @@ __metadata: fs-extra: ^9.0.1 github-release-from-changelog: ^2.1.1 glob: ^7.1.6 + global: ^4.4.0 http-server: ^0.12.3 husky: ^4.3.7 jest: ^26.6.3 @@ -8543,6 +8535,7 @@ __metadata: prompts: ^2.4.0 puppeteer: ^2.1.1 raf: ^3.4.1 + react: ^16.8.0 read-pkg-up: ^7.0.1 regenerator-runtime: ^0.13.7 remark: ^13.0.0 @@ -8565,6 +8558,7 @@ __metadata: util: ^0.12.4 verdaccio: ^4.10.0 verdaccio-auth-memory: ^9.7.2 + vite: ^3.1.7 wait-on: ^5.2.1 web-component-analyzer: ^1.1.6 webpack: 5 @@ -8859,9 +8853,9 @@ __metadata: languageName: node linkType: hard -"@storybook/ui@7.0.0-alpha.35, @storybook/ui@workspace:*, @storybook/ui@workspace:lib/ui": +"@storybook/ui@7.0.0-alpha.35, @storybook/ui@workspace:*, @storybook/ui@workspace:manager/ui": version: 0.0.0-use.local - resolution: "@storybook/ui@workspace:lib/ui" + resolution: "@storybook/ui@workspace:manager/ui" dependencies: "@fal-works/esbuild-plugin-global-externals": ^2.1.2 "@storybook/addons": 7.0.0-alpha.35 From 9fc3854c7b8919674090639394868208fbd4ac98 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 13 Oct 2022 10:55:47 +0200 Subject: [PATCH 05/20] fix some type and lint errors --- .vscode/settings.json | 3 +- code/manager/ui/src/app.tsx | 2 +- .../ui/src/components/layout/app.mockdata.tsx | 4 +- .../src/components/layout/desktop.stories.tsx | 10 +--- .../ui/src/components/layout/desktop.tsx | 2 +- .../ui/src/components/layout/mobile.tsx | 2 +- .../manager/ui/src/components/panel/panel.tsx | 2 +- .../components/preview/preview.mockdata.tsx | 4 +- .../ui/src/components/preview/preview.tsx | 4 +- .../ui/src/components/preview/toolbar.tsx | 6 +-- .../src/components/preview/tools/addons.tsx | 4 +- .../ui/src/components/preview/tools/copy.tsx | 4 +- .../ui/src/components/preview/tools/eject.tsx | 4 +- .../ui/src/components/preview/tools/menu.tsx | 4 +- .../src/components/preview/tools/remount.tsx | 4 +- .../ui/src/components/preview/tools/zoom.tsx | 52 ++++++++++--------- .../ui/src/components/preview/utils/types.tsx | 2 +- .../components/sidebar/Explorer.stories.tsx | 2 +- .../components/sidebar/Heading.stories.tsx | 10 +++- .../src/components/sidebar/Menu.stories.tsx | 1 - .../sidebar/__tests__/Sidebar.test.tsx | 3 ++ code/manager/ui/src/containers/menu.tsx | 2 +- code/manager/ui/src/containers/panel.tsx | 2 +- .../src/settings/SettingsFooter.stories.tsx | 2 +- code/manager/ui/src/settings/about.tsx | 2 +- code/manager/ui/src/settings/about_page.tsx | 2 +- code/package.json | 2 +- 27 files changed, 74 insertions(+), 67 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6534f373734..e4831db738b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "deepscan.enable": true + "deepscan.enable": true, + "typescript.tsdk": "./code/node_modules/typescript/lib" } diff --git a/code/manager/ui/src/app.tsx b/code/manager/ui/src/app.tsx index ae046cceba8..06bb2df221c 100644 --- a/code/manager/ui/src/app.tsx +++ b/code/manager/ui/src/app.tsx @@ -1,7 +1,7 @@ import React, { FC, useMemo } from 'react'; import sizeMe from 'react-sizeme'; -import { State } from '@storybook/api'; +import { type State } from '@storybook/api'; import { Symbols } from '@storybook/components'; import { Route } from '@storybook/router'; import { Global, createGlobal, styled } from '@storybook/theming'; diff --git a/code/manager/ui/src/components/layout/app.mockdata.tsx b/code/manager/ui/src/components/layout/app.mockdata.tsx index 4157b64180e..2686d44d305 100644 --- a/code/manager/ui/src/components/layout/app.mockdata.tsx +++ b/code/manager/ui/src/components/layout/app.mockdata.tsx @@ -1,8 +1,8 @@ import global from 'global'; import React, { Component, FC } from 'react'; import { styled } from '@storybook/theming'; -import { Collection } from '@storybook/addons'; -import { State } from '@storybook/api'; +import type { Collection } from '@storybook/addons'; +import type { State } from '@storybook/api'; import { Sidebar, SidebarProps } from '../sidebar/Sidebar'; import Panel from '../panel/panel'; import { Preview } from '../preview/preview'; diff --git a/code/manager/ui/src/components/layout/desktop.stories.tsx b/code/manager/ui/src/components/layout/desktop.stories.tsx index 72e5979292c..7f89c41ed3a 100644 --- a/code/manager/ui/src/components/layout/desktop.stories.tsx +++ b/code/manager/ui/src/components/layout/desktop.stories.tsx @@ -15,18 +15,12 @@ export default { decorators: [ ((StoryFn, c) => { const mocked = true; - const height = 900; - const width = 1200; - if (isChromatic) { + if (isChromatic()) { store.local.set(`storybook-layout`, {}); } - const props = { - height, - width, - ...(mocked ? mockProps : realProps), - }; + const props = mocked ? mockProps : realProps; return (
diff --git a/code/manager/ui/src/components/layout/desktop.tsx b/code/manager/ui/src/components/layout/desktop.tsx index 7dc5efd1261..80f7ace2221 100644 --- a/code/manager/ui/src/components/layout/desktop.tsx +++ b/code/manager/ui/src/components/layout/desktop.tsx @@ -1,6 +1,6 @@ import React, { Fragment, ComponentType, FC } from 'react'; -import { State } from '@storybook/api'; +import type { State } from '@storybook/api'; import * as S from './container'; export interface DesktopProps { diff --git a/code/manager/ui/src/components/layout/mobile.tsx b/code/manager/ui/src/components/layout/mobile.tsx index b5da375ab87..90b9f0df8f4 100644 --- a/code/manager/ui/src/components/layout/mobile.tsx +++ b/code/manager/ui/src/components/layout/mobile.tsx @@ -1,5 +1,5 @@ import React, { Component, Children, ComponentType, FC, ReactNode } from 'react'; -import { State, ActiveTabs } from '@storybook/api'; +import { type State, ActiveTabs } from '@storybook/api'; import { styled } from '@storybook/theming'; import { TabButton } from '@storybook/components'; diff --git a/code/manager/ui/src/components/panel/panel.tsx b/code/manager/ui/src/components/panel/panel.tsx index 2312c927bc0..e1f98f3753f 100644 --- a/code/manager/ui/src/components/panel/panel.tsx +++ b/code/manager/ui/src/components/panel/panel.tsx @@ -2,7 +2,7 @@ import React, { Component, Fragment, ReactElement } from 'react'; import { shortcutToHumanString } from '@storybook/api/shortcut'; import { styled } from '@storybook/theming'; import { Tabs, Icons, IconButton } from '@storybook/components'; -import { State } from '@storybook/api'; +import type { State } from '@storybook/api'; const DesktopOnlyIconButton = styled(IconButton)({ // Hides full screen icon at mobile breakpoint defined in app.js diff --git a/code/manager/ui/src/components/preview/preview.mockdata.tsx b/code/manager/ui/src/components/preview/preview.mockdata.tsx index cfad354e584..81e8bd0af90 100644 --- a/code/manager/ui/src/components/preview/preview.mockdata.tsx +++ b/code/manager/ui/src/components/preview/preview.mockdata.tsx @@ -1,5 +1,5 @@ -import { types, Addon } from '@storybook/addons'; -import { API, State } from '@storybook/api'; +import { types, type Addon } from '@storybook/addons'; +import type { API, State } from '@storybook/api'; import { PreviewProps } from './utils/types'; export const previewProps: PreviewProps = { diff --git a/code/manager/ui/src/components/preview/preview.tsx b/code/manager/ui/src/components/preview/preview.tsx index cf53461d772..cc8ebfd4ee3 100644 --- a/code/manager/ui/src/components/preview/preview.tsx +++ b/code/manager/ui/src/components/preview/preview.tsx @@ -2,9 +2,9 @@ import React, { Fragment, useMemo, useEffect, useRef } from 'react'; import { Helmet } from 'react-helmet-async'; -import { API, Consumer, Combo, merge } from '@storybook/api'; +import { type API, Consumer, type Combo, merge } from '@storybook/api'; import { SET_CURRENT_STORY } from '@storybook/core-events'; -import { addons, types, Addon } from '@storybook/addons'; +import { addons, types, type Addon } from '@storybook/addons'; import { Loader } from '@storybook/components'; import { Location } from '@storybook/router'; diff --git a/code/manager/ui/src/components/preview/toolbar.tsx b/code/manager/ui/src/components/preview/toolbar.tsx index 8c7832ee148..d09fc5d1bf8 100644 --- a/code/manager/ui/src/components/preview/toolbar.tsx +++ b/code/manager/ui/src/components/preview/toolbar.tsx @@ -3,11 +3,11 @@ import React, { Fragment, useMemo, FunctionComponent } from 'react'; import { styled } from '@storybook/theming'; import { FlexBar, IconButton, Icons, Separator, TabButton, TabBar } from '@storybook/components'; -import { Consumer, Combo, API, State, merge, LeafEntry } from '@storybook/api'; +import { Consumer, type Combo, type API, type State, merge, type LeafEntry } from '@storybook/api'; import { shortcutToHumanString } from '@storybook/api/shortcut'; -import { addons, Addon, types } from '@storybook/addons'; +import { addons, type Addon, types } from '@storybook/addons'; -import { Location, RenderData } from '@storybook/router'; +import { Location, type RenderData } from '@storybook/router'; import { zoomTool } from './tools/zoom'; import * as S from './utils/components'; diff --git a/code/manager/ui/src/components/preview/tools/addons.tsx b/code/manager/ui/src/components/preview/tools/addons.tsx index 30f4fad6183..1bd66a22ac8 100644 --- a/code/manager/ui/src/components/preview/tools/addons.tsx +++ b/code/manager/ui/src/components/preview/tools/addons.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { IconButton, Icons } from '@storybook/components'; -import { Consumer, Combo } from '@storybook/api'; -import { Addon } from '@storybook/addons'; +import { Consumer, type Combo } from '@storybook/api'; +import type { Addon } from '@storybook/addons'; const menuMapper = ({ api, state }: Combo) => ({ isVisible: state.layout.showPanel, diff --git a/code/manager/ui/src/components/preview/tools/copy.tsx b/code/manager/ui/src/components/preview/tools/copy.tsx index c5c5e133d30..aa8c48f8d33 100644 --- a/code/manager/ui/src/components/preview/tools/copy.tsx +++ b/code/manager/ui/src/components/preview/tools/copy.tsx @@ -2,8 +2,8 @@ import global from 'global'; import React from 'react'; import copy from 'copy-to-clipboard'; import { getStoryHref, IconButton, Icons } from '@storybook/components'; -import { Consumer, Combo } from '@storybook/api'; -import { Addon } from '@storybook/addons'; +import { Consumer, type Combo } from '@storybook/api'; +import type { Addon } from '@storybook/addons'; const { PREVIEW_URL, document } = global; diff --git a/code/manager/ui/src/components/preview/tools/eject.tsx b/code/manager/ui/src/components/preview/tools/eject.tsx index dde018ef9e2..1a28a84c16b 100644 --- a/code/manager/ui/src/components/preview/tools/eject.tsx +++ b/code/manager/ui/src/components/preview/tools/eject.tsx @@ -1,8 +1,8 @@ import global from 'global'; import React from 'react'; import { getStoryHref, IconButton, Icons } from '@storybook/components'; -import { Consumer, Combo } from '@storybook/api'; -import { Addon } from '@storybook/addons'; +import { Consumer, type Combo } from '@storybook/api'; +import type { Addon } from '@storybook/addons'; const { PREVIEW_URL } = global; diff --git a/code/manager/ui/src/components/preview/tools/menu.tsx b/code/manager/ui/src/components/preview/tools/menu.tsx index 9bb999c2186..d5f4daea381 100644 --- a/code/manager/ui/src/components/preview/tools/menu.tsx +++ b/code/manager/ui/src/components/preview/tools/menu.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { IconButton, Icons, Separator } from '@storybook/components'; -import { Consumer, Combo } from '@storybook/api'; -import { Addon } from '@storybook/addons'; +import { Consumer, type Combo } from '@storybook/api'; +import type { Addon } from '@storybook/addons'; const menuMapper = ({ api, state }: Combo) => ({ isVisible: state.layout.showNav, diff --git a/code/manager/ui/src/components/preview/tools/remount.tsx b/code/manager/ui/src/components/preview/tools/remount.tsx index 1f84ab8a19b..f04625f5ff7 100644 --- a/code/manager/ui/src/components/preview/tools/remount.tsx +++ b/code/manager/ui/src/components/preview/tools/remount.tsx @@ -1,7 +1,7 @@ import React, { ComponentProps, useState } from 'react'; import { IconButton, Icons } from '@storybook/components'; -import { Consumer, Combo } from '@storybook/api'; -import { Addon } from '@storybook/addons'; +import { Consumer, type Combo } from '@storybook/api'; +import type { Addon } from '@storybook/addons'; import { styled } from '@storybook/theming'; import { FORCE_REMOUNT } from '@storybook/core-events'; diff --git a/code/manager/ui/src/components/preview/tools/zoom.tsx b/code/manager/ui/src/components/preview/tools/zoom.tsx index d897f89eb55..8c91e71121a 100644 --- a/code/manager/ui/src/components/preview/tools/zoom.tsx +++ b/code/manager/ui/src/components/preview/tools/zoom.tsx @@ -1,7 +1,7 @@ import React, { Component, SyntheticEvent, useCallback, MouseEventHandler } from 'react'; import { Icons, IconButton, Separator } from '@storybook/components'; -import { Addon } from '@storybook/addons'; +import type { Addon } from '@storybook/addons'; const initialZoom = 1 as const; @@ -48,30 +48,32 @@ const Zoom = React.memo<{ export { Zoom, ZoomConsumer, ZoomProvider }; -const ZoomWrapper = React.memo<{ set: Function; value: number }>(({ set, value }) => { - const zoomIn = useCallback( - (e: SyntheticEvent) => { - e.preventDefault(); - set(0.8 * value); - }, - [set, value] - ); - const zoomOut = useCallback( - (e: SyntheticEvent) => { - e.preventDefault(); - set(1.25 * value); - }, - [set, value] - ); - const reset = useCallback( - (e) => { - e.preventDefault(); - set(initialZoom); - }, - [set, initialZoom] - ); - return ; -}); +const ZoomWrapper = React.memo<{ set: (zoomLevel: number) => void; value: number }>( + ({ set, value }) => { + const zoomIn = useCallback( + (e: SyntheticEvent) => { + e.preventDefault(); + set(0.8 * value); + }, + [set, value] + ); + const zoomOut = useCallback( + (e: SyntheticEvent) => { + e.preventDefault(); + set(1.25 * value); + }, + [set, value] + ); + const reset = useCallback( + (e) => { + e.preventDefault(); + set(initialZoom); + }, + [set, initialZoom] + ); + return ; + } +); export const zoomTool: Addon = { title: 'zoom', diff --git a/code/manager/ui/src/components/preview/utils/types.tsx b/code/manager/ui/src/components/preview/utils/types.tsx index 153e06eef91..fe74d6ef76b 100644 --- a/code/manager/ui/src/components/preview/utils/types.tsx +++ b/code/manager/ui/src/components/preview/utils/types.tsx @@ -1,5 +1,5 @@ import { FunctionComponent, ReactNode } from 'react'; -import { State, API, LeafEntry } from '@storybook/api'; +import type { State, API, LeafEntry } from '@storybook/api'; import { StoryId } from '@storybook/csf'; export type ViewMode = State['viewMode']; diff --git a/code/manager/ui/src/components/sidebar/Explorer.stories.tsx b/code/manager/ui/src/components/sidebar/Explorer.stories.tsx index 2f013c174ef..2fd9632a34e 100644 --- a/code/manager/ui/src/components/sidebar/Explorer.stories.tsx +++ b/code/manager/ui/src/components/sidebar/Explorer.stories.tsx @@ -22,7 +22,7 @@ const selected = { const simple: Record = { storybook_internal: { - title: null, + title: undefined, id: 'storybook_internal', url: 'iframe.html', ready: true, diff --git a/code/manager/ui/src/components/sidebar/Heading.stories.tsx b/code/manager/ui/src/components/sidebar/Heading.stories.tsx index 641631b6d4e..14c415cf503 100644 --- a/code/manager/ui/src/components/sidebar/Heading.stories.tsx +++ b/code/manager/ui/src/components/sidebar/Heading.stories.tsx @@ -79,6 +79,7 @@ export const LinkAndText: Story = () => { title: 'My title', url: 'https://example.com', image: null, + target: undefined, }, }} > @@ -97,6 +98,7 @@ export const OnlyText: Story = () => { title: 'My title', url: null, image: null, + target: undefined, }, }} > @@ -115,6 +117,7 @@ export const LongText: Story = () => { title: 'My title is way to long to actually fit', url: null, image: null, + target: undefined, }, }} > @@ -133,6 +136,7 @@ export const CustomTitle: Story = () => { title: 'My custom title', url: null, image: null, + target: undefined, }, }} > @@ -151,6 +155,7 @@ export const CustomBrandImage: Story = () => { title: 'My Title', url: 'https://example.com', image: 'https://storybook.js.org/images/placeholders/150x22.png', + target: undefined, }, }} > @@ -169,6 +174,7 @@ export const CustomBrandImageTall: Story = () => { title: 'My Title', url: 'https://example.com', image: 'https://storybook.js.org/images/placeholders/100x150.png', + target: undefined, }, }} > @@ -187,6 +193,7 @@ export const CustomBrandImageUnsizedSVG: Story = () => { title: 'My Title', url: 'https://example.com', image: 'https://s.cdpn.io/91525/potofgold.svg', + target: undefined, }, }} > @@ -202,9 +209,10 @@ export const NoBrand: Story = () => { theme={{ ...theme, brand: { - title: null, + title: undefined, url: null, image: null, + target: undefined, }, }} > diff --git a/code/manager/ui/src/components/sidebar/Menu.stories.tsx b/code/manager/ui/src/components/sidebar/Menu.stories.tsx index 1e47d08ba33..42642a39aa3 100644 --- a/code/manager/ui/src/components/sidebar/Menu.stories.tsx +++ b/code/manager/ui/src/components/sidebar/Menu.stories.tsx @@ -73,7 +73,6 @@ Expanded.play = async ({ canvasElement }) => { export const ExpandedWithoutReleaseNotes = () => { const menu = useMenu( { - // @ts-expect-error (Converted from ts-ignore) getShortcutKeys: () => ({}), getAddonsShortcuts: () => ({}), versionUpdateAvailable: () => false, diff --git a/code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx b/code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx index f2199dd3d15..8bfc5508738 100644 --- a/code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx +++ b/code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx @@ -28,6 +28,7 @@ const generateStories = ({ title, refId }: { title: string; refId?: string }): S const docsId = `${rootId}-${hypenatedComponentName}--docs`; const storyBase: HashEntry[] = [ + // @ts-expect-error the missing fields are deprecated and replaced by the type prop { type: 'root', id: rootId, @@ -37,6 +38,7 @@ const generateStories = ({ title, refId }: { title: string; refId?: string }): S children: [componentId], startCollapsed: false, }, + // @ts-expect-error the missing fields are deprecated and replaced by the type prop { type: 'component', id: componentId, @@ -46,6 +48,7 @@ const generateStories = ({ title, refId }: { title: string; refId?: string }): S children: [docsId], parent: rootId, }, + // @ts-expect-error the missing fields are deprecated and replaced by the type prop { type: 'docs', id: docsId, diff --git a/code/manager/ui/src/containers/menu.tsx b/code/manager/ui/src/containers/menu.tsx index f1144f7232e..198dcf95de8 100644 --- a/code/manager/ui/src/containers/menu.tsx +++ b/code/manager/ui/src/containers/menu.tsx @@ -39,7 +39,7 @@ const Shortcut: FC<{ keys: string[] }> = ({ keys }) => ( ); export const useMenu = ( - api: API, + api: Omit & { releaseNotesVersion: () => string | undefined }, showToolbar: boolean, isFullscreen: boolean, showPanel: boolean, diff --git a/code/manager/ui/src/containers/panel.tsx b/code/manager/ui/src/containers/panel.tsx index 18f58f1122b..b2fc5471372 100644 --- a/code/manager/ui/src/containers/panel.tsx +++ b/code/manager/ui/src/containers/panel.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; import memoize from 'memoizerific'; -import { Consumer, Combo } from '@storybook/api'; +import { Consumer, type Combo } from '@storybook/api'; import AddonPanel from '../components/panel/panel'; diff --git a/code/manager/ui/src/settings/SettingsFooter.stories.tsx b/code/manager/ui/src/settings/SettingsFooter.stories.tsx index fb0fb3a2cf5..b8b55d20339 100644 --- a/code/manager/ui/src/settings/SettingsFooter.stories.tsx +++ b/code/manager/ui/src/settings/SettingsFooter.stories.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { DecoratorFn } from '@storybook/react'; +import type { DecoratorFn } from '@storybook/react'; import SettingsFooter from './SettingsFooter'; export default { diff --git a/code/manager/ui/src/settings/about.tsx b/code/manager/ui/src/settings/about.tsx index 9446bf2b6e3..cd831b542ff 100644 --- a/code/manager/ui/src/settings/about.tsx +++ b/code/manager/ui/src/settings/about.tsx @@ -1,7 +1,7 @@ import React, { Fragment, FC } from 'react'; import semver from 'semver'; import { styled } from '@storybook/theming'; -import { State } from '@storybook/api'; +import type { State } from '@storybook/api'; import Markdown from 'markdown-to-jsx'; import { StorybookIcon, SyntaxHighlighter, Link, DocumentWrapper } from '@storybook/components'; diff --git a/code/manager/ui/src/settings/about_page.tsx b/code/manager/ui/src/settings/about_page.tsx index 83459fc8df8..4cdf3162fa9 100644 --- a/code/manager/ui/src/settings/about_page.tsx +++ b/code/manager/ui/src/settings/about_page.tsx @@ -1,6 +1,6 @@ import React, { Component, FC } from 'react'; -import { API, useStorybookApi } from '@storybook/api'; +import { type API, useStorybookApi } from '@storybook/api'; import { AboutScreen } from './about'; diff --git a/code/package.json b/code/package.json index 65b9fc002aa..93b73645d7e 100644 --- a/code/package.json +++ b/code/package.json @@ -81,7 +81,7 @@ "sandbox": "ts-node ../scripts/sandbox.ts", "serve-storybooks": "http-server ./built-storybooks -p 8001", "smoketest-storybooks": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true node -r esm ../scripts/smoketest-storybooks.js", - "storybook:ui": "cd manager && ../lib/cli/bin/index.js dev --port 6006 --no-manager-cache", + "storybook:ui": "./lib/cli/bin/index.js dev --port 6006 --config-dir ./manager/.storybook --no-manager-cache", "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js", "test:cli": "npm --prefix lib/cli run test", "test:e2e-examples-playwright": "playwright test", From edc5e6f84663de22aaad2ebaf26b202a65b46804 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 13 Oct 2022 13:15:46 +0200 Subject: [PATCH 06/20] unfix types --- code/manager/ui/src/containers/menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/manager/ui/src/containers/menu.tsx b/code/manager/ui/src/containers/menu.tsx index 198dcf95de8..f1144f7232e 100644 --- a/code/manager/ui/src/containers/menu.tsx +++ b/code/manager/ui/src/containers/menu.tsx @@ -39,7 +39,7 @@ const Shortcut: FC<{ keys: string[] }> = ({ keys }) => ( ); export const useMenu = ( - api: Omit & { releaseNotesVersion: () => string | undefined }, + api: API, showToolbar: boolean, isFullscreen: boolean, showPanel: boolean, From b3180492e16354ba1063d3906e1e8db10ee7e250 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 13 Oct 2022 13:24:35 +0200 Subject: [PATCH 07/20] rename manager > ui - rename manager/ui > ui/manager --- .github/autolabeler.yml | 2 +- code/.eslintrc.js | 4 ++-- code/lib/builder-manager/src/utils/globals.ts | 2 +- code/lib/core-server/src/__for-testing__/main.ts | 2 +- code/package.json | 4 ++-- code/{manager => ui}/.storybook/main.ts | 0 code/{manager => ui}/.storybook/preview-head.html | 0 code/{manager => ui}/.storybook/preview.jsx | 0 code/{manager/ui => ui/manager}/README.md | 0 code/{manager/ui => ui/manager}/package.json | 4 ++-- code/{manager/ui => ui/manager}/paths.js | 0 .../ui => ui/manager}/scripts/generate-exports-file.ts | 0 code/{manager/ui => ui/manager}/src/FakeProvider.tsx | 0 code/{manager/ui => ui/manager}/src/__tests__/index.test.ts | 0 code/{manager/ui => ui/manager}/src/app.stories.tsx | 0 code/{manager/ui => ui/manager}/src/app.tsx | 0 .../{manager/ui => ui/manager}/src/components/layout/Root.tsx | 0 .../ui => ui/manager}/src/components/layout/app.mockdata.tsx | 0 .../ui => ui/manager}/src/components/layout/container.tsx | 0 .../manager}/src/components/layout/desktop.stories.tsx | 0 .../ui => ui/manager}/src/components/layout/desktop.tsx | 0 .../ui => ui/manager}/src/components/layout/draggers.tsx | 0 .../manager}/src/components/layout/mobile.stories.tsx | 0 .../ui => ui/manager}/src/components/layout/mobile.tsx | 0 .../ui => ui/manager}/src/components/layout/persist.ts | 0 .../src/components/notifications/NotificationItem.stories.jsx | 0 .../src/components/notifications/NotificationItem.tsx | 0 .../src/components/notifications/NotificationList.stories.jsx | 0 .../src/components/notifications/NotificationList.tsx | 0 .../ui => ui/manager}/src/components/panel/panel.stories.tsx | 0 .../{manager/ui => ui/manager}/src/components/panel/panel.tsx | 0 .../manager}/src/components/preview/FramesRenderer.tsx | 0 .../manager}/src/components/preview/iframe.stories.tsx | 0 .../ui => ui/manager}/src/components/preview/iframe.tsx | 0 .../manager}/src/components/preview/preview.mockdata.tsx | 0 .../manager}/src/components/preview/preview.stories.tsx | 0 .../ui => ui/manager}/src/components/preview/preview.tsx | 0 .../ui => ui/manager}/src/components/preview/toolbar.tsx | 0 .../ui => ui/manager}/src/components/preview/tools/addons.tsx | 0 .../ui => ui/manager}/src/components/preview/tools/copy.tsx | 0 .../ui => ui/manager}/src/components/preview/tools/eject.tsx | 0 .../ui => ui/manager}/src/components/preview/tools/menu.tsx | 0 .../manager}/src/components/preview/tools/remount.tsx | 0 .../ui => ui/manager}/src/components/preview/tools/zoom.tsx | 0 .../manager}/src/components/preview/utils/components.ts | 0 .../src/components/preview/utils/stringifyQueryParams.tsx | 0 .../ui => ui/manager}/src/components/preview/utils/types.tsx | 0 .../ui => ui/manager}/src/components/preview/wrappers.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Brand.tsx | 0 .../manager}/src/components/sidebar/Explorer.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Explorer.tsx | 0 .../manager}/src/components/sidebar/Heading.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Heading.tsx | 0 .../manager}/src/components/sidebar/HighlightStyles.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Loader.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Menu.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Menu.tsx | 0 .../ui => ui/manager}/src/components/sidebar/RefBlocks.tsx | 0 .../ui => ui/manager}/src/components/sidebar/RefIndicator.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Refs.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Refs.tsx | 0 .../manager}/src/components/sidebar/Search.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Search.tsx | 0 .../manager}/src/components/sidebar/SearchResults.stories.tsx | 0 .../manager}/src/components/sidebar/SearchResults.tsx | 0 .../manager}/src/components/sidebar/Sidebar.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Sidebar.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Tree.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/Tree.tsx | 0 .../manager}/src/components/sidebar/TreeNode.stories.tsx | 0 .../ui => ui/manager}/src/components/sidebar/TreeNode.tsx | 0 .../src/components/sidebar/__tests__/Sidebar.test.tsx | 0 .../manager}/src/components/sidebar/mockdata.large.ts | 0 .../ui => ui/manager}/src/components/sidebar/mockdata.ts | 0 .../ui => ui/manager}/src/components/sidebar/types.ts | 0 .../ui => ui/manager}/src/components/sidebar/useExpanded.ts | 0 .../manager}/src/components/sidebar/useHighlighted.ts | 0 .../ui => ui/manager}/src/components/sidebar/useLastViewed.ts | 0 .../ui => ui/manager}/src/components/sidebar/utils.test.js | 0 .../ui => ui/manager}/src/components/sidebar/utils.ts | 0 code/{manager/ui => ui/manager}/src/containers/menu.tsx | 0 .../ui => ui/manager}/src/containers/notifications.tsx | 0 .../ui => ui/manager}/src/containers/panel.stories.tsx | 0 code/{manager/ui => ui/manager}/src/containers/panel.tsx | 0 code/{manager/ui => ui/manager}/src/containers/preview.tsx | 0 code/{manager/ui => ui/manager}/src/containers/sidebar.tsx | 0 code/{manager/ui => ui/manager}/src/globals.ts | 0 code/{manager/ui => ui/manager}/src/globals/definitions.ts | 0 code/{manager/ui => ui/manager}/src/globals/exports.ts | 0 code/{manager/ui => ui/manager}/src/globals/runtime.ts | 0 code/{manager/ui => ui/manager}/src/globals/types.ts | 0 code/{manager/ui => ui/manager}/src/index.tsx | 0 code/{manager/ui => ui/manager}/src/keybinding.ts | 0 code/{manager/ui => ui/manager}/src/provider.ts | 0 code/{manager/ui => ui/manager}/src/runtime.ts | 0 .../ui => ui/manager}/src/settings/SettingsFooter.stories.tsx | 0 .../ui => ui/manager}/src/settings/SettingsFooter.tsx | 0 .../{manager/ui => ui/manager}/src/settings/about.stories.jsx | 0 code/{manager/ui => ui/manager}/src/settings/about.tsx | 0 code/{manager/ui => ui/manager}/src/settings/about_page.tsx | 0 code/{manager/ui => ui/manager}/src/settings/index.tsx | 0 .../ui => ui/manager}/src/settings/release_notes.stories.tsx | 0 .../{manager/ui => ui/manager}/src/settings/release_notes.tsx | 0 .../ui => ui/manager}/src/settings/release_notes_page.tsx | 0 .../ui => ui/manager}/src/settings/shortcuts.stories.tsx | 0 .../{manager/ui => ui/manager}/src/settings/shortcuts.test.js | 0 code/{manager/ui => ui/manager}/src/settings/shortcuts.tsx | 0 .../ui => ui/manager}/src/settings/shortcuts_page.tsx | 0 code/{manager/ui => ui/manager}/src/settings/typings.d.ts | 0 code/{manager/ui => ui/manager}/src/typings.d.ts | 0 code/{manager/ui => ui/manager}/tsconfig.json | 0 code/workspace.json | 2 +- code/yarn.lock | 4 ++-- 113 files changed, 12 insertions(+), 12 deletions(-) rename code/{manager => ui}/.storybook/main.ts (100%) rename code/{manager => ui}/.storybook/preview-head.html (100%) rename code/{manager => ui}/.storybook/preview.jsx (100%) rename code/{manager/ui => ui/manager}/README.md (100%) rename code/{manager/ui => ui/manager}/package.json (98%) rename code/{manager/ui => ui/manager}/paths.js (100%) rename code/{manager/ui => ui/manager}/scripts/generate-exports-file.ts (100%) rename code/{manager/ui => ui/manager}/src/FakeProvider.tsx (100%) rename code/{manager/ui => ui/manager}/src/__tests__/index.test.ts (100%) rename code/{manager/ui => ui/manager}/src/app.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/app.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/Root.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/app.mockdata.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/container.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/desktop.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/desktop.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/draggers.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/mobile.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/mobile.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/layout/persist.ts (100%) rename code/{manager/ui => ui/manager}/src/components/notifications/NotificationItem.stories.jsx (100%) rename code/{manager/ui => ui/manager}/src/components/notifications/NotificationItem.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/notifications/NotificationList.stories.jsx (100%) rename code/{manager/ui => ui/manager}/src/components/notifications/NotificationList.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/panel/panel.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/panel/panel.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/FramesRenderer.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/iframe.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/iframe.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/preview.mockdata.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/preview.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/preview.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/toolbar.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/tools/addons.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/tools/copy.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/tools/eject.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/tools/menu.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/tools/remount.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/tools/zoom.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/utils/components.ts (100%) rename code/{manager/ui => ui/manager}/src/components/preview/utils/stringifyQueryParams.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/utils/types.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/preview/wrappers.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Brand.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Explorer.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Explorer.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Heading.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Heading.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/HighlightStyles.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Loader.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Menu.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Menu.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/RefBlocks.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/RefIndicator.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Refs.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Refs.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Search.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Search.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/SearchResults.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/SearchResults.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Sidebar.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Sidebar.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Tree.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/Tree.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/TreeNode.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/TreeNode.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/__tests__/Sidebar.test.tsx (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/mockdata.large.ts (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/mockdata.ts (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/types.ts (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/useExpanded.ts (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/useHighlighted.ts (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/useLastViewed.ts (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/utils.test.js (100%) rename code/{manager/ui => ui/manager}/src/components/sidebar/utils.ts (100%) rename code/{manager/ui => ui/manager}/src/containers/menu.tsx (100%) rename code/{manager/ui => ui/manager}/src/containers/notifications.tsx (100%) rename code/{manager/ui => ui/manager}/src/containers/panel.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/containers/panel.tsx (100%) rename code/{manager/ui => ui/manager}/src/containers/preview.tsx (100%) rename code/{manager/ui => ui/manager}/src/containers/sidebar.tsx (100%) rename code/{manager/ui => ui/manager}/src/globals.ts (100%) rename code/{manager/ui => ui/manager}/src/globals/definitions.ts (100%) rename code/{manager/ui => ui/manager}/src/globals/exports.ts (100%) rename code/{manager/ui => ui/manager}/src/globals/runtime.ts (100%) rename code/{manager/ui => ui/manager}/src/globals/types.ts (100%) rename code/{manager/ui => ui/manager}/src/index.tsx (100%) rename code/{manager/ui => ui/manager}/src/keybinding.ts (100%) rename code/{manager/ui => ui/manager}/src/provider.ts (100%) rename code/{manager/ui => ui/manager}/src/runtime.ts (100%) rename code/{manager/ui => ui/manager}/src/settings/SettingsFooter.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/SettingsFooter.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/about.stories.jsx (100%) rename code/{manager/ui => ui/manager}/src/settings/about.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/about_page.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/index.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/release_notes.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/release_notes.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/release_notes_page.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/shortcuts.stories.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/shortcuts.test.js (100%) rename code/{manager/ui => ui/manager}/src/settings/shortcuts.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/shortcuts_page.tsx (100%) rename code/{manager/ui => ui/manager}/src/settings/typings.d.ts (100%) rename code/{manager/ui => ui/manager}/src/typings.d.ts (100%) rename code/{manager/ui => ui/manager}/tsconfig.json (100%) diff --git a/.github/autolabeler.yml b/.github/autolabeler.yml index ea78617289c..ce64056503f 100644 --- a/.github/autolabeler.yml +++ b/.github/autolabeler.yml @@ -22,4 +22,4 @@ 'cli': ['lib/cli/**'] 'compatibility with other tools': [] 'documentation': ['docs', '*.md'] -'ui': ['manager/ui'] +'ui': ['ui/manager'] diff --git a/code/.eslintrc.js b/code/.eslintrc.js index 87d2e5f9466..a9a44f8459c 100644 --- a/code/.eslintrc.js +++ b/code/.eslintrc.js @@ -26,7 +26,7 @@ module.exports = { files: [ '**/lib/theming/**/*', '**/lib/router/**/*', - '**/manager/ui/**/*', + '**/ui/manager/**/*', '**/lib/components/**/*', ], rules: { @@ -34,7 +34,7 @@ module.exports = { }, }, { - files: ['**/manager/*', '**/manager/.storybook/*'], + files: ['**/ui/*', '**/ui/.storybook/*'], rules: { 'import/no-extraneous-dependencies': ['error', { packageDir: __dirname }], }, diff --git a/code/lib/builder-manager/src/utils/globals.ts b/code/lib/builder-manager/src/utils/globals.ts index e4db18ceca3..e0f0edeebd3 100644 --- a/code/lib/builder-manager/src/utils/globals.ts +++ b/code/lib/builder-manager/src/utils/globals.ts @@ -1 +1 @@ -export { definitions } from '@storybook/ui/dist/globals'; +export { definitions } from '../../../../ui/manager/dist/globals'; diff --git a/code/lib/core-server/src/__for-testing__/main.ts b/code/lib/core-server/src/__for-testing__/main.ts index 31e7e4f8499..7c5a2a9564e 100644 --- a/code/lib/core-server/src/__for-testing__/main.ts +++ b/code/lib/core-server/src/__for-testing__/main.ts @@ -5,7 +5,7 @@ import type { StorybookConfig } from '@storybook/react-webpack5'; const config: StorybookConfig = { stories: [ - '../../manager/ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', + '../../ui/manager/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', '../../lib/components/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', './../../addons/docs/**/*.stories.@(ts|tsx|js|jsx|mdx)', './../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', diff --git a/code/package.json b/code/package.json index 93b73645d7e..0aa3e4c9cd2 100644 --- a/code/package.json +++ b/code/package.json @@ -46,7 +46,7 @@ "frameworks/*", "lib/*", "lib/cli/test/run/*", - "manager/*", + "ui/*", "presets/*", "renderers/*" ] @@ -81,7 +81,7 @@ "sandbox": "ts-node ../scripts/sandbox.ts", "serve-storybooks": "http-server ./built-storybooks -p 8001", "smoketest-storybooks": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true node -r esm ../scripts/smoketest-storybooks.js", - "storybook:ui": "./lib/cli/bin/index.js dev --port 6006 --config-dir ./manager/.storybook --no-manager-cache", + "storybook:ui": "./lib/cli/bin/index.js dev --port 6006 --config-dir ./ui/.storybook --no-manager-cache", "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js", "test:cli": "npm --prefix lib/cli run test", "test:e2e-examples-playwright": "playwright test", diff --git a/code/manager/.storybook/main.ts b/code/ui/.storybook/main.ts similarity index 100% rename from code/manager/.storybook/main.ts rename to code/ui/.storybook/main.ts diff --git a/code/manager/.storybook/preview-head.html b/code/ui/.storybook/preview-head.html similarity index 100% rename from code/manager/.storybook/preview-head.html rename to code/ui/.storybook/preview-head.html diff --git a/code/manager/.storybook/preview.jsx b/code/ui/.storybook/preview.jsx similarity index 100% rename from code/manager/.storybook/preview.jsx rename to code/ui/.storybook/preview.jsx diff --git a/code/manager/ui/README.md b/code/ui/manager/README.md similarity index 100% rename from code/manager/ui/README.md rename to code/ui/manager/README.md diff --git a/code/manager/ui/package.json b/code/ui/manager/package.json similarity index 98% rename from code/manager/ui/package.json rename to code/ui/manager/package.json index 32b5c040fdd..2e51ca58b8b 100644 --- a/code/manager/ui/package.json +++ b/code/ui/manager/package.json @@ -5,14 +5,14 @@ "keywords": [ "storybook" ], - "homepage": "https://github.com/storybookjs/storybook/tree/main/code/manager/ui", + "homepage": "https://github.com/storybookjs/storybook/tree/main/code/ui/manager", "bugs": { "url": "https://github.com/storybookjs/storybook/issues" }, "repository": { "type": "git", "url": "https://github.com/storybookjs/storybook.git", - "directory": "code/manager/ui" + "directory": "code/ui/manager" }, "funding": { "type": "opencollective", diff --git a/code/manager/ui/paths.js b/code/ui/manager/paths.js similarity index 100% rename from code/manager/ui/paths.js rename to code/ui/manager/paths.js diff --git a/code/manager/ui/scripts/generate-exports-file.ts b/code/ui/manager/scripts/generate-exports-file.ts similarity index 100% rename from code/manager/ui/scripts/generate-exports-file.ts rename to code/ui/manager/scripts/generate-exports-file.ts diff --git a/code/manager/ui/src/FakeProvider.tsx b/code/ui/manager/src/FakeProvider.tsx similarity index 100% rename from code/manager/ui/src/FakeProvider.tsx rename to code/ui/manager/src/FakeProvider.tsx diff --git a/code/manager/ui/src/__tests__/index.test.ts b/code/ui/manager/src/__tests__/index.test.ts similarity index 100% rename from code/manager/ui/src/__tests__/index.test.ts rename to code/ui/manager/src/__tests__/index.test.ts diff --git a/code/manager/ui/src/app.stories.tsx b/code/ui/manager/src/app.stories.tsx similarity index 100% rename from code/manager/ui/src/app.stories.tsx rename to code/ui/manager/src/app.stories.tsx diff --git a/code/manager/ui/src/app.tsx b/code/ui/manager/src/app.tsx similarity index 100% rename from code/manager/ui/src/app.tsx rename to code/ui/manager/src/app.tsx diff --git a/code/manager/ui/src/components/layout/Root.tsx b/code/ui/manager/src/components/layout/Root.tsx similarity index 100% rename from code/manager/ui/src/components/layout/Root.tsx rename to code/ui/manager/src/components/layout/Root.tsx diff --git a/code/manager/ui/src/components/layout/app.mockdata.tsx b/code/ui/manager/src/components/layout/app.mockdata.tsx similarity index 100% rename from code/manager/ui/src/components/layout/app.mockdata.tsx rename to code/ui/manager/src/components/layout/app.mockdata.tsx diff --git a/code/manager/ui/src/components/layout/container.tsx b/code/ui/manager/src/components/layout/container.tsx similarity index 100% rename from code/manager/ui/src/components/layout/container.tsx rename to code/ui/manager/src/components/layout/container.tsx diff --git a/code/manager/ui/src/components/layout/desktop.stories.tsx b/code/ui/manager/src/components/layout/desktop.stories.tsx similarity index 100% rename from code/manager/ui/src/components/layout/desktop.stories.tsx rename to code/ui/manager/src/components/layout/desktop.stories.tsx diff --git a/code/manager/ui/src/components/layout/desktop.tsx b/code/ui/manager/src/components/layout/desktop.tsx similarity index 100% rename from code/manager/ui/src/components/layout/desktop.tsx rename to code/ui/manager/src/components/layout/desktop.tsx diff --git a/code/manager/ui/src/components/layout/draggers.tsx b/code/ui/manager/src/components/layout/draggers.tsx similarity index 100% rename from code/manager/ui/src/components/layout/draggers.tsx rename to code/ui/manager/src/components/layout/draggers.tsx diff --git a/code/manager/ui/src/components/layout/mobile.stories.tsx b/code/ui/manager/src/components/layout/mobile.stories.tsx similarity index 100% rename from code/manager/ui/src/components/layout/mobile.stories.tsx rename to code/ui/manager/src/components/layout/mobile.stories.tsx diff --git a/code/manager/ui/src/components/layout/mobile.tsx b/code/ui/manager/src/components/layout/mobile.tsx similarity index 100% rename from code/manager/ui/src/components/layout/mobile.tsx rename to code/ui/manager/src/components/layout/mobile.tsx diff --git a/code/manager/ui/src/components/layout/persist.ts b/code/ui/manager/src/components/layout/persist.ts similarity index 100% rename from code/manager/ui/src/components/layout/persist.ts rename to code/ui/manager/src/components/layout/persist.ts diff --git a/code/manager/ui/src/components/notifications/NotificationItem.stories.jsx b/code/ui/manager/src/components/notifications/NotificationItem.stories.jsx similarity index 100% rename from code/manager/ui/src/components/notifications/NotificationItem.stories.jsx rename to code/ui/manager/src/components/notifications/NotificationItem.stories.jsx diff --git a/code/manager/ui/src/components/notifications/NotificationItem.tsx b/code/ui/manager/src/components/notifications/NotificationItem.tsx similarity index 100% rename from code/manager/ui/src/components/notifications/NotificationItem.tsx rename to code/ui/manager/src/components/notifications/NotificationItem.tsx diff --git a/code/manager/ui/src/components/notifications/NotificationList.stories.jsx b/code/ui/manager/src/components/notifications/NotificationList.stories.jsx similarity index 100% rename from code/manager/ui/src/components/notifications/NotificationList.stories.jsx rename to code/ui/manager/src/components/notifications/NotificationList.stories.jsx diff --git a/code/manager/ui/src/components/notifications/NotificationList.tsx b/code/ui/manager/src/components/notifications/NotificationList.tsx similarity index 100% rename from code/manager/ui/src/components/notifications/NotificationList.tsx rename to code/ui/manager/src/components/notifications/NotificationList.tsx diff --git a/code/manager/ui/src/components/panel/panel.stories.tsx b/code/ui/manager/src/components/panel/panel.stories.tsx similarity index 100% rename from code/manager/ui/src/components/panel/panel.stories.tsx rename to code/ui/manager/src/components/panel/panel.stories.tsx diff --git a/code/manager/ui/src/components/panel/panel.tsx b/code/ui/manager/src/components/panel/panel.tsx similarity index 100% rename from code/manager/ui/src/components/panel/panel.tsx rename to code/ui/manager/src/components/panel/panel.tsx diff --git a/code/manager/ui/src/components/preview/FramesRenderer.tsx b/code/ui/manager/src/components/preview/FramesRenderer.tsx similarity index 100% rename from code/manager/ui/src/components/preview/FramesRenderer.tsx rename to code/ui/manager/src/components/preview/FramesRenderer.tsx diff --git a/code/manager/ui/src/components/preview/iframe.stories.tsx b/code/ui/manager/src/components/preview/iframe.stories.tsx similarity index 100% rename from code/manager/ui/src/components/preview/iframe.stories.tsx rename to code/ui/manager/src/components/preview/iframe.stories.tsx diff --git a/code/manager/ui/src/components/preview/iframe.tsx b/code/ui/manager/src/components/preview/iframe.tsx similarity index 100% rename from code/manager/ui/src/components/preview/iframe.tsx rename to code/ui/manager/src/components/preview/iframe.tsx diff --git a/code/manager/ui/src/components/preview/preview.mockdata.tsx b/code/ui/manager/src/components/preview/preview.mockdata.tsx similarity index 100% rename from code/manager/ui/src/components/preview/preview.mockdata.tsx rename to code/ui/manager/src/components/preview/preview.mockdata.tsx diff --git a/code/manager/ui/src/components/preview/preview.stories.tsx b/code/ui/manager/src/components/preview/preview.stories.tsx similarity index 100% rename from code/manager/ui/src/components/preview/preview.stories.tsx rename to code/ui/manager/src/components/preview/preview.stories.tsx diff --git a/code/manager/ui/src/components/preview/preview.tsx b/code/ui/manager/src/components/preview/preview.tsx similarity index 100% rename from code/manager/ui/src/components/preview/preview.tsx rename to code/ui/manager/src/components/preview/preview.tsx diff --git a/code/manager/ui/src/components/preview/toolbar.tsx b/code/ui/manager/src/components/preview/toolbar.tsx similarity index 100% rename from code/manager/ui/src/components/preview/toolbar.tsx rename to code/ui/manager/src/components/preview/toolbar.tsx diff --git a/code/manager/ui/src/components/preview/tools/addons.tsx b/code/ui/manager/src/components/preview/tools/addons.tsx similarity index 100% rename from code/manager/ui/src/components/preview/tools/addons.tsx rename to code/ui/manager/src/components/preview/tools/addons.tsx diff --git a/code/manager/ui/src/components/preview/tools/copy.tsx b/code/ui/manager/src/components/preview/tools/copy.tsx similarity index 100% rename from code/manager/ui/src/components/preview/tools/copy.tsx rename to code/ui/manager/src/components/preview/tools/copy.tsx diff --git a/code/manager/ui/src/components/preview/tools/eject.tsx b/code/ui/manager/src/components/preview/tools/eject.tsx similarity index 100% rename from code/manager/ui/src/components/preview/tools/eject.tsx rename to code/ui/manager/src/components/preview/tools/eject.tsx diff --git a/code/manager/ui/src/components/preview/tools/menu.tsx b/code/ui/manager/src/components/preview/tools/menu.tsx similarity index 100% rename from code/manager/ui/src/components/preview/tools/menu.tsx rename to code/ui/manager/src/components/preview/tools/menu.tsx diff --git a/code/manager/ui/src/components/preview/tools/remount.tsx b/code/ui/manager/src/components/preview/tools/remount.tsx similarity index 100% rename from code/manager/ui/src/components/preview/tools/remount.tsx rename to code/ui/manager/src/components/preview/tools/remount.tsx diff --git a/code/manager/ui/src/components/preview/tools/zoom.tsx b/code/ui/manager/src/components/preview/tools/zoom.tsx similarity index 100% rename from code/manager/ui/src/components/preview/tools/zoom.tsx rename to code/ui/manager/src/components/preview/tools/zoom.tsx diff --git a/code/manager/ui/src/components/preview/utils/components.ts b/code/ui/manager/src/components/preview/utils/components.ts similarity index 100% rename from code/manager/ui/src/components/preview/utils/components.ts rename to code/ui/manager/src/components/preview/utils/components.ts diff --git a/code/manager/ui/src/components/preview/utils/stringifyQueryParams.tsx b/code/ui/manager/src/components/preview/utils/stringifyQueryParams.tsx similarity index 100% rename from code/manager/ui/src/components/preview/utils/stringifyQueryParams.tsx rename to code/ui/manager/src/components/preview/utils/stringifyQueryParams.tsx diff --git a/code/manager/ui/src/components/preview/utils/types.tsx b/code/ui/manager/src/components/preview/utils/types.tsx similarity index 100% rename from code/manager/ui/src/components/preview/utils/types.tsx rename to code/ui/manager/src/components/preview/utils/types.tsx diff --git a/code/manager/ui/src/components/preview/wrappers.tsx b/code/ui/manager/src/components/preview/wrappers.tsx similarity index 100% rename from code/manager/ui/src/components/preview/wrappers.tsx rename to code/ui/manager/src/components/preview/wrappers.tsx diff --git a/code/manager/ui/src/components/sidebar/Brand.tsx b/code/ui/manager/src/components/sidebar/Brand.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Brand.tsx rename to code/ui/manager/src/components/sidebar/Brand.tsx diff --git a/code/manager/ui/src/components/sidebar/Explorer.stories.tsx b/code/ui/manager/src/components/sidebar/Explorer.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Explorer.stories.tsx rename to code/ui/manager/src/components/sidebar/Explorer.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/Explorer.tsx b/code/ui/manager/src/components/sidebar/Explorer.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Explorer.tsx rename to code/ui/manager/src/components/sidebar/Explorer.tsx diff --git a/code/manager/ui/src/components/sidebar/Heading.stories.tsx b/code/ui/manager/src/components/sidebar/Heading.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Heading.stories.tsx rename to code/ui/manager/src/components/sidebar/Heading.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/Heading.tsx b/code/ui/manager/src/components/sidebar/Heading.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Heading.tsx rename to code/ui/manager/src/components/sidebar/Heading.tsx diff --git a/code/manager/ui/src/components/sidebar/HighlightStyles.tsx b/code/ui/manager/src/components/sidebar/HighlightStyles.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/HighlightStyles.tsx rename to code/ui/manager/src/components/sidebar/HighlightStyles.tsx diff --git a/code/manager/ui/src/components/sidebar/Loader.tsx b/code/ui/manager/src/components/sidebar/Loader.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Loader.tsx rename to code/ui/manager/src/components/sidebar/Loader.tsx diff --git a/code/manager/ui/src/components/sidebar/Menu.stories.tsx b/code/ui/manager/src/components/sidebar/Menu.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Menu.stories.tsx rename to code/ui/manager/src/components/sidebar/Menu.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/Menu.tsx b/code/ui/manager/src/components/sidebar/Menu.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Menu.tsx rename to code/ui/manager/src/components/sidebar/Menu.tsx diff --git a/code/manager/ui/src/components/sidebar/RefBlocks.tsx b/code/ui/manager/src/components/sidebar/RefBlocks.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/RefBlocks.tsx rename to code/ui/manager/src/components/sidebar/RefBlocks.tsx diff --git a/code/manager/ui/src/components/sidebar/RefIndicator.tsx b/code/ui/manager/src/components/sidebar/RefIndicator.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/RefIndicator.tsx rename to code/ui/manager/src/components/sidebar/RefIndicator.tsx diff --git a/code/manager/ui/src/components/sidebar/Refs.stories.tsx b/code/ui/manager/src/components/sidebar/Refs.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Refs.stories.tsx rename to code/ui/manager/src/components/sidebar/Refs.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/Refs.tsx b/code/ui/manager/src/components/sidebar/Refs.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Refs.tsx rename to code/ui/manager/src/components/sidebar/Refs.tsx diff --git a/code/manager/ui/src/components/sidebar/Search.stories.tsx b/code/ui/manager/src/components/sidebar/Search.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Search.stories.tsx rename to code/ui/manager/src/components/sidebar/Search.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/Search.tsx b/code/ui/manager/src/components/sidebar/Search.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Search.tsx rename to code/ui/manager/src/components/sidebar/Search.tsx diff --git a/code/manager/ui/src/components/sidebar/SearchResults.stories.tsx b/code/ui/manager/src/components/sidebar/SearchResults.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/SearchResults.stories.tsx rename to code/ui/manager/src/components/sidebar/SearchResults.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/SearchResults.tsx b/code/ui/manager/src/components/sidebar/SearchResults.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/SearchResults.tsx rename to code/ui/manager/src/components/sidebar/SearchResults.tsx diff --git a/code/manager/ui/src/components/sidebar/Sidebar.stories.tsx b/code/ui/manager/src/components/sidebar/Sidebar.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Sidebar.stories.tsx rename to code/ui/manager/src/components/sidebar/Sidebar.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/Sidebar.tsx b/code/ui/manager/src/components/sidebar/Sidebar.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Sidebar.tsx rename to code/ui/manager/src/components/sidebar/Sidebar.tsx diff --git a/code/manager/ui/src/components/sidebar/Tree.stories.tsx b/code/ui/manager/src/components/sidebar/Tree.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Tree.stories.tsx rename to code/ui/manager/src/components/sidebar/Tree.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/Tree.tsx b/code/ui/manager/src/components/sidebar/Tree.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/Tree.tsx rename to code/ui/manager/src/components/sidebar/Tree.tsx diff --git a/code/manager/ui/src/components/sidebar/TreeNode.stories.tsx b/code/ui/manager/src/components/sidebar/TreeNode.stories.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/TreeNode.stories.tsx rename to code/ui/manager/src/components/sidebar/TreeNode.stories.tsx diff --git a/code/manager/ui/src/components/sidebar/TreeNode.tsx b/code/ui/manager/src/components/sidebar/TreeNode.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/TreeNode.tsx rename to code/ui/manager/src/components/sidebar/TreeNode.tsx diff --git a/code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx b/code/ui/manager/src/components/sidebar/__tests__/Sidebar.test.tsx similarity index 100% rename from code/manager/ui/src/components/sidebar/__tests__/Sidebar.test.tsx rename to code/ui/manager/src/components/sidebar/__tests__/Sidebar.test.tsx diff --git a/code/manager/ui/src/components/sidebar/mockdata.large.ts b/code/ui/manager/src/components/sidebar/mockdata.large.ts similarity index 100% rename from code/manager/ui/src/components/sidebar/mockdata.large.ts rename to code/ui/manager/src/components/sidebar/mockdata.large.ts diff --git a/code/manager/ui/src/components/sidebar/mockdata.ts b/code/ui/manager/src/components/sidebar/mockdata.ts similarity index 100% rename from code/manager/ui/src/components/sidebar/mockdata.ts rename to code/ui/manager/src/components/sidebar/mockdata.ts diff --git a/code/manager/ui/src/components/sidebar/types.ts b/code/ui/manager/src/components/sidebar/types.ts similarity index 100% rename from code/manager/ui/src/components/sidebar/types.ts rename to code/ui/manager/src/components/sidebar/types.ts diff --git a/code/manager/ui/src/components/sidebar/useExpanded.ts b/code/ui/manager/src/components/sidebar/useExpanded.ts similarity index 100% rename from code/manager/ui/src/components/sidebar/useExpanded.ts rename to code/ui/manager/src/components/sidebar/useExpanded.ts diff --git a/code/manager/ui/src/components/sidebar/useHighlighted.ts b/code/ui/manager/src/components/sidebar/useHighlighted.ts similarity index 100% rename from code/manager/ui/src/components/sidebar/useHighlighted.ts rename to code/ui/manager/src/components/sidebar/useHighlighted.ts diff --git a/code/manager/ui/src/components/sidebar/useLastViewed.ts b/code/ui/manager/src/components/sidebar/useLastViewed.ts similarity index 100% rename from code/manager/ui/src/components/sidebar/useLastViewed.ts rename to code/ui/manager/src/components/sidebar/useLastViewed.ts diff --git a/code/manager/ui/src/components/sidebar/utils.test.js b/code/ui/manager/src/components/sidebar/utils.test.js similarity index 100% rename from code/manager/ui/src/components/sidebar/utils.test.js rename to code/ui/manager/src/components/sidebar/utils.test.js diff --git a/code/manager/ui/src/components/sidebar/utils.ts b/code/ui/manager/src/components/sidebar/utils.ts similarity index 100% rename from code/manager/ui/src/components/sidebar/utils.ts rename to code/ui/manager/src/components/sidebar/utils.ts diff --git a/code/manager/ui/src/containers/menu.tsx b/code/ui/manager/src/containers/menu.tsx similarity index 100% rename from code/manager/ui/src/containers/menu.tsx rename to code/ui/manager/src/containers/menu.tsx diff --git a/code/manager/ui/src/containers/notifications.tsx b/code/ui/manager/src/containers/notifications.tsx similarity index 100% rename from code/manager/ui/src/containers/notifications.tsx rename to code/ui/manager/src/containers/notifications.tsx diff --git a/code/manager/ui/src/containers/panel.stories.tsx b/code/ui/manager/src/containers/panel.stories.tsx similarity index 100% rename from code/manager/ui/src/containers/panel.stories.tsx rename to code/ui/manager/src/containers/panel.stories.tsx diff --git a/code/manager/ui/src/containers/panel.tsx b/code/ui/manager/src/containers/panel.tsx similarity index 100% rename from code/manager/ui/src/containers/panel.tsx rename to code/ui/manager/src/containers/panel.tsx diff --git a/code/manager/ui/src/containers/preview.tsx b/code/ui/manager/src/containers/preview.tsx similarity index 100% rename from code/manager/ui/src/containers/preview.tsx rename to code/ui/manager/src/containers/preview.tsx diff --git a/code/manager/ui/src/containers/sidebar.tsx b/code/ui/manager/src/containers/sidebar.tsx similarity index 100% rename from code/manager/ui/src/containers/sidebar.tsx rename to code/ui/manager/src/containers/sidebar.tsx diff --git a/code/manager/ui/src/globals.ts b/code/ui/manager/src/globals.ts similarity index 100% rename from code/manager/ui/src/globals.ts rename to code/ui/manager/src/globals.ts diff --git a/code/manager/ui/src/globals/definitions.ts b/code/ui/manager/src/globals/definitions.ts similarity index 100% rename from code/manager/ui/src/globals/definitions.ts rename to code/ui/manager/src/globals/definitions.ts diff --git a/code/manager/ui/src/globals/exports.ts b/code/ui/manager/src/globals/exports.ts similarity index 100% rename from code/manager/ui/src/globals/exports.ts rename to code/ui/manager/src/globals/exports.ts diff --git a/code/manager/ui/src/globals/runtime.ts b/code/ui/manager/src/globals/runtime.ts similarity index 100% rename from code/manager/ui/src/globals/runtime.ts rename to code/ui/manager/src/globals/runtime.ts diff --git a/code/manager/ui/src/globals/types.ts b/code/ui/manager/src/globals/types.ts similarity index 100% rename from code/manager/ui/src/globals/types.ts rename to code/ui/manager/src/globals/types.ts diff --git a/code/manager/ui/src/index.tsx b/code/ui/manager/src/index.tsx similarity index 100% rename from code/manager/ui/src/index.tsx rename to code/ui/manager/src/index.tsx diff --git a/code/manager/ui/src/keybinding.ts b/code/ui/manager/src/keybinding.ts similarity index 100% rename from code/manager/ui/src/keybinding.ts rename to code/ui/manager/src/keybinding.ts diff --git a/code/manager/ui/src/provider.ts b/code/ui/manager/src/provider.ts similarity index 100% rename from code/manager/ui/src/provider.ts rename to code/ui/manager/src/provider.ts diff --git a/code/manager/ui/src/runtime.ts b/code/ui/manager/src/runtime.ts similarity index 100% rename from code/manager/ui/src/runtime.ts rename to code/ui/manager/src/runtime.ts diff --git a/code/manager/ui/src/settings/SettingsFooter.stories.tsx b/code/ui/manager/src/settings/SettingsFooter.stories.tsx similarity index 100% rename from code/manager/ui/src/settings/SettingsFooter.stories.tsx rename to code/ui/manager/src/settings/SettingsFooter.stories.tsx diff --git a/code/manager/ui/src/settings/SettingsFooter.tsx b/code/ui/manager/src/settings/SettingsFooter.tsx similarity index 100% rename from code/manager/ui/src/settings/SettingsFooter.tsx rename to code/ui/manager/src/settings/SettingsFooter.tsx diff --git a/code/manager/ui/src/settings/about.stories.jsx b/code/ui/manager/src/settings/about.stories.jsx similarity index 100% rename from code/manager/ui/src/settings/about.stories.jsx rename to code/ui/manager/src/settings/about.stories.jsx diff --git a/code/manager/ui/src/settings/about.tsx b/code/ui/manager/src/settings/about.tsx similarity index 100% rename from code/manager/ui/src/settings/about.tsx rename to code/ui/manager/src/settings/about.tsx diff --git a/code/manager/ui/src/settings/about_page.tsx b/code/ui/manager/src/settings/about_page.tsx similarity index 100% rename from code/manager/ui/src/settings/about_page.tsx rename to code/ui/manager/src/settings/about_page.tsx diff --git a/code/manager/ui/src/settings/index.tsx b/code/ui/manager/src/settings/index.tsx similarity index 100% rename from code/manager/ui/src/settings/index.tsx rename to code/ui/manager/src/settings/index.tsx diff --git a/code/manager/ui/src/settings/release_notes.stories.tsx b/code/ui/manager/src/settings/release_notes.stories.tsx similarity index 100% rename from code/manager/ui/src/settings/release_notes.stories.tsx rename to code/ui/manager/src/settings/release_notes.stories.tsx diff --git a/code/manager/ui/src/settings/release_notes.tsx b/code/ui/manager/src/settings/release_notes.tsx similarity index 100% rename from code/manager/ui/src/settings/release_notes.tsx rename to code/ui/manager/src/settings/release_notes.tsx diff --git a/code/manager/ui/src/settings/release_notes_page.tsx b/code/ui/manager/src/settings/release_notes_page.tsx similarity index 100% rename from code/manager/ui/src/settings/release_notes_page.tsx rename to code/ui/manager/src/settings/release_notes_page.tsx diff --git a/code/manager/ui/src/settings/shortcuts.stories.tsx b/code/ui/manager/src/settings/shortcuts.stories.tsx similarity index 100% rename from code/manager/ui/src/settings/shortcuts.stories.tsx rename to code/ui/manager/src/settings/shortcuts.stories.tsx diff --git a/code/manager/ui/src/settings/shortcuts.test.js b/code/ui/manager/src/settings/shortcuts.test.js similarity index 100% rename from code/manager/ui/src/settings/shortcuts.test.js rename to code/ui/manager/src/settings/shortcuts.test.js diff --git a/code/manager/ui/src/settings/shortcuts.tsx b/code/ui/manager/src/settings/shortcuts.tsx similarity index 100% rename from code/manager/ui/src/settings/shortcuts.tsx rename to code/ui/manager/src/settings/shortcuts.tsx diff --git a/code/manager/ui/src/settings/shortcuts_page.tsx b/code/ui/manager/src/settings/shortcuts_page.tsx similarity index 100% rename from code/manager/ui/src/settings/shortcuts_page.tsx rename to code/ui/manager/src/settings/shortcuts_page.tsx diff --git a/code/manager/ui/src/settings/typings.d.ts b/code/ui/manager/src/settings/typings.d.ts similarity index 100% rename from code/manager/ui/src/settings/typings.d.ts rename to code/ui/manager/src/settings/typings.d.ts diff --git a/code/manager/ui/src/typings.d.ts b/code/ui/manager/src/typings.d.ts similarity index 100% rename from code/manager/ui/src/typings.d.ts rename to code/ui/manager/src/typings.d.ts diff --git a/code/manager/ui/tsconfig.json b/code/ui/manager/tsconfig.json similarity index 100% rename from code/manager/ui/tsconfig.json rename to code/ui/manager/tsconfig.json diff --git a/code/workspace.json b/code/workspace.json index cdd2202b0d6..e722935bb8d 100644 --- a/code/workspace.json +++ b/code/workspace.json @@ -362,7 +362,7 @@ "implicitDependencies": [] }, "@storybook/ui": { - "root": "manager/ui", + "root": "ui/manager", "type": "library", "implicitDependencies": [] }, diff --git a/code/yarn.lock b/code/yarn.lock index fd750f25228..2959391f88e 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -8853,9 +8853,9 @@ __metadata: languageName: node linkType: hard -"@storybook/ui@7.0.0-alpha.35, @storybook/ui@workspace:*, @storybook/ui@workspace:manager/ui": +"@storybook/ui@7.0.0-alpha.35, @storybook/ui@workspace:*, @storybook/ui@workspace:ui/manager": version: 0.0.0-use.local - resolution: "@storybook/ui@workspace:manager/ui" + resolution: "@storybook/ui@workspace:ui/manager" dependencies: "@fal-works/esbuild-plugin-global-externals": ^2.1.2 "@storybook/addons": 7.0.0-alpha.35 From d017b20ffd74d9fc6e52754e75aa649ae99001c1 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 13 Oct 2022 13:42:04 +0200 Subject: [PATCH 08/20] fix globals --- code/lib/builder-manager/src/utils/globals.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/builder-manager/src/utils/globals.ts b/code/lib/builder-manager/src/utils/globals.ts index e0f0edeebd3..e4db18ceca3 100644 --- a/code/lib/builder-manager/src/utils/globals.ts +++ b/code/lib/builder-manager/src/utils/globals.ts @@ -1 +1 @@ -export { definitions } from '../../../../ui/manager/dist/globals'; +export { definitions } from '@storybook/ui/dist/globals'; From 472de8eb5c604c380e3500bb0c1295350b5e04c1 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 13 Oct 2022 23:12:07 +0200 Subject: [PATCH 09/20] silent unnecessary warning about package.json --- code/lib/core-common/src/utils/get-storybook-refs.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/lib/core-common/src/utils/get-storybook-refs.ts b/code/lib/core-common/src/utils/get-storybook-refs.ts index 6698baf8f76..f79f499c8de 100644 --- a/code/lib/core-common/src/utils/get-storybook-refs.ts +++ b/code/lib/core-common/src/utils/get-storybook-refs.ts @@ -26,7 +26,12 @@ export const getAutoRefs = async (options: Options): Promise if (storybook?.url) { return { id: name, ...storybook, version }; } - } catch { + } catch (error) { + if (error.code === 'ERR_PACKAGE_PATH_NOT_EXPORTED') { + // silent warning because user can't do anything about it + // "package.json" is not part of the package's "exports" field in its package.json + return undefined; + } logger.warn(`unable to find package.json for ${d}`); return undefined; } From 0bb10b294535c6151ce653b13670ae5d39ea553c Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 13 Oct 2022 23:15:10 +0200 Subject: [PATCH 10/20] fix main path --- code/ui/.storybook/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/.storybook/main.ts b/code/ui/.storybook/main.ts index 0ae04d9157b..c937627af8f 100644 --- a/code/ui/.storybook/main.ts +++ b/code/ui/.storybook/main.ts @@ -4,7 +4,7 @@ import type { StorybookConfig } from '../../frameworks/react-vite/dist'; const config: StorybookConfig = { stories: [ - '../ui/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', + '../manager/src/**/*.stories.@(ts|tsx|js|jsx|mdx)', // '../../lib/components/src/**/*.stories.@(js|jsx|ts|tsx|mdx)', // '../../../addons/interactions/**/*.stories.@(ts|tsx|js|jsx|mdx)', ], From fab8c0bb268cb1d843bd38bc8c26dbfbb3ca884c Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Fri, 14 Oct 2022 10:41:22 +1100 Subject: [PATCH 11/20] Don't pass the full path to repro generators --- scripts/next-repro-generators/generate-repros.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/next-repro-generators/generate-repros.ts b/scripts/next-repro-generators/generate-repros.ts index 6b9fbadc113..03fe17496cc 100755 --- a/scripts/next-repro-generators/generate-repros.ts +++ b/scripts/next-repro-generators/generate-repros.ts @@ -136,7 +136,7 @@ const runGenerators = async ( await setupYarn({ cwd: createBaseDir }); const createBeforeDir = join(createBaseDir, BEFORE_DIR_NAME); - const scriptWithBeforeDir = script.replace('{{beforeDir}}', createBeforeDir); + const scriptWithBeforeDir = script.replace('{{beforeDir}}', BEFORE_DIR_NAME); await runCommand(scriptWithBeforeDir, { cwd: createBaseDir }); await localizeYarnConfigFiles(createBaseDir, createBeforeDir); From e275c93973f958700a2d4a71779fa495fd182707 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Fri, 14 Oct 2022 11:40:37 +1100 Subject: [PATCH 12/20] Argh --- code/lib/cli/src/repro-templates.ts | 34 +++++++++---------- .../next-repro-generators/generate-repros.ts | 13 +++++-- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/code/lib/cli/src/repro-templates.ts b/code/lib/cli/src/repro-templates.ts index 610985dc3e0..71c78495c8c 100644 --- a/code/lib/cli/src/repro-templates.ts +++ b/code/lib/cli/src/repro-templates.ts @@ -1,7 +1,7 @@ const craTemplates = { 'cra/default-js': { name: 'Create React App (Javascript)', - script: 'npx create-react-app {{beforeDir}}', + script: 'npx create-react-app .', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/cra', @@ -11,7 +11,7 @@ const craTemplates = { }, 'cra/default-ts': { name: 'Create React App (Typescript)', - script: 'npx create-react-app {{beforeDir}} --template typescript', + script: 'npx create-react-app . --template typescript', cadence: ['ci', 'daily', 'weekly'], // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test'], @@ -26,7 +26,7 @@ const craTemplates = { const reactViteTemplates = { 'react-vite/default-js': { name: 'React Vite (JS)', - script: 'yarn create vite {{beforeDir}} --template react', + script: 'yarn create vite . --template react', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/react-vite', @@ -36,7 +36,7 @@ const reactViteTemplates = { }, 'react-vite/default-ts': { name: 'React Vite (TS)', - script: 'yarn create vite {{beforeDir}} --template react-ts', + script: 'yarn create vite . --template react-ts', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/react-vite', @@ -49,7 +49,7 @@ const reactViteTemplates = { const reactWebpackTemplates = { 'react-webpack/18-ts': { name: 'React Webpack5 (TS)', - script: 'yarn create webpack5-react {{beforeDir}}', + script: 'yarn create webpack5-react .', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/react-webpack5', @@ -59,8 +59,7 @@ const reactWebpackTemplates = { }, 'react-webpack/17-ts': { name: 'React Webpack5 (TS)', - script: - 'yarn create webpack5-react {{beforeDir}} --version-react="17" --version-react-dom="17"', + script: 'yarn create webpack5-react . --version-react="17" --version-react-dom="17"', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/react-webpack5', @@ -73,7 +72,7 @@ const reactWebpackTemplates = { const vue3ViteTemplates = { 'vue3-vite/default-js': { name: 'Vue3 Vite (JS)', - script: 'yarn create vite {{beforeDir}} --template vue', + script: 'yarn create vite . --template vue', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/vue3-vite', @@ -83,7 +82,7 @@ const vue3ViteTemplates = { }, 'vue3-vite/default-ts': { name: 'Vue3 Vite (TS)', - script: 'yarn create vite {{beforeDir}} --template vue-ts', + script: 'yarn create vite . --template vue-ts', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/vue3-vite', @@ -100,7 +99,7 @@ const vue2ViteTemplates = { // We don't really want to maintain weird custom scripts like this, // preferring community bootstrap scripts / generators instead. script: - 'yarn create vite {{beforeDir}} --template vanilla && yarn add --dev @vitejs/plugin-vue2 vue-template-compiler vue@2 && echo "import vue2 from \'@vitejs/plugin-vue2\';\n\nexport default {\n\tplugins: [vue2()]\n};" > vite.config.js', + 'yarn create vite . --template vanilla && yarn add --dev @vitejs/plugin-vue2 vue-template-compiler vue@2 && echo "import vue2 from \'@vitejs/plugin-vue2\';\n\nexport default {\n\tplugins: [vue2()]\n};" > vite.config.js', cadence: ['ci', 'daily', 'weekly'], // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test'], @@ -115,7 +114,7 @@ const vue2ViteTemplates = { const htmlWebpackTemplates = { 'html-webpack/default': { name: 'HTML Webpack5', - script: 'yarn create webpack5-html {{beforeDir}}', + script: 'yarn create webpack5-html .', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/html-webpack5', @@ -128,7 +127,7 @@ const htmlWebpackTemplates = { const svelteViteTemplates = { 'svelte-vite/default-js': { name: 'Svelte Vite (JS)', - script: 'yarn create vite {{beforeDir}} --template svelte', + script: 'yarn create vite . --template svelte', cadence: ['ci', 'daily', 'weekly'], expected: { framework: '@storybook/svelte-vite', @@ -138,7 +137,7 @@ const svelteViteTemplates = { }, 'svelte-vite/default-ts': { name: 'Svelte Vite (TS)', - script: 'yarn create vite {{beforeDir}} --template svelte-ts', + script: 'yarn create vite . --template svelte-ts', cadence: ['ci', 'daily', 'weekly'], // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test'], @@ -205,7 +204,7 @@ const angularCliTemplates = { const litViteTemplates = { 'lit-vite/default-js': { name: 'Lit Vite (JS)', - script: 'yarn create vite {{beforeDir}} --template lit', + script: 'yarn create vite . --template lit', cadence: ['ci', 'daily', 'weekly'] as any, // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test'], @@ -217,7 +216,7 @@ const litViteTemplates = { }, 'lit-vite/default-ts': { name: 'Lit Vite (TS)', - script: 'yarn create vite {{beforeDir}} --template lit-ts', + script: 'yarn create vite . --template lit-ts', cadence: ['ci', 'daily', 'weekly'] as any, // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test'], @@ -232,8 +231,7 @@ const litViteTemplates = { const vueCliTemplates = { 'vue-cli/default-js': { name: 'Vue-CLI (Default JS)', - script: - 'npx -p @vue/cli vue create {{beforeDir}} --default --packageManager=yarn --force --merge', + script: 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge', cadence: ['ci', 'daily', 'weekly'], skipTasks: [ // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. @@ -250,7 +248,7 @@ const vueCliTemplates = { 'vue-cli/vue2-default-js': { name: 'Vue-CLI (Vue2 JS)', script: - 'npx -p @vue/cli vue create {{beforeDir}} --default --packageManager=yarn --force --merge --preset=Default\\ (Vue\\ 2)', + 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge --preset=Default\\ (Vue\\ 2)', cadence: ['ci', 'daily', 'weekly'], skipTasks: [ // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. diff --git a/scripts/next-repro-generators/generate-repros.ts b/scripts/next-repro-generators/generate-repros.ts index 03fe17496cc..8aced727401 100755 --- a/scripts/next-repro-generators/generate-repros.ts +++ b/scripts/next-repro-generators/generate-repros.ts @@ -136,8 +136,17 @@ const runGenerators = async ( await setupYarn({ cwd: createBaseDir }); const createBeforeDir = join(createBaseDir, BEFORE_DIR_NAME); - const scriptWithBeforeDir = script.replace('{{beforeDir}}', BEFORE_DIR_NAME); - await runCommand(scriptWithBeforeDir, { cwd: createBaseDir }); + + // Some tools refuse to run inside an existing directory and replace the contents, + // where as others are very picky about what directories can be called. So we need to + // handle different modes of operation. + if (script.includes('{{beforeDir}}')) { + const scriptWithBeforeDir = script.replace('{{beforeDir}}', BEFORE_DIR_NAME); + await runCommand(scriptWithBeforeDir, { cwd: createBaseDir }); + } else { + await ensureDir(createBeforeDir); + await runCommand(script, { cwd: createBeforeDir }); + } await localizeYarnConfigFiles(createBaseDir, createBeforeDir); From c10dd867c68ff1d83e7c214c4ec8bd3425de2364 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Fri, 14 Oct 2022 14:48:22 +1100 Subject: [PATCH 13/20] Add a 5 min timeout to the script --- scripts/next-repro-generators/generate-repros.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/next-repro-generators/generate-repros.ts b/scripts/next-repro-generators/generate-repros.ts index 8aced727401..12eb7903342 100755 --- a/scripts/next-repro-generators/generate-repros.ts +++ b/scripts/next-repro-generators/generate-repros.ts @@ -24,6 +24,7 @@ import { runRegistry } from '../tasks/run-registry'; const OUTPUT_DIRECTORY = join(__dirname, '..', '..', 'repros'); const BEFORE_DIR_NAME = 'before-storybook'; const AFTER_DIR_NAME = 'after-storybook'; +const SCRIPT_TIMEOUT = 5 * 60 * 1000; const sbInit = async (cwd: string, flags?: string[]) => { const sbCliBinaryPath = join(__dirname, `../../code/lib/cli/bin/index.js`); @@ -142,10 +143,10 @@ const runGenerators = async ( // handle different modes of operation. if (script.includes('{{beforeDir}}')) { const scriptWithBeforeDir = script.replace('{{beforeDir}}', BEFORE_DIR_NAME); - await runCommand(scriptWithBeforeDir, { cwd: createBaseDir }); + await runCommand(scriptWithBeforeDir, { cwd: createBaseDir, timeout: SCRIPT_TIMEOUT }); } else { await ensureDir(createBeforeDir); - await runCommand(script, { cwd: createBeforeDir }); + await runCommand(script, { cwd: createBeforeDir, timeout: SCRIPT_TIMEOUT }); } await localizeYarnConfigFiles(createBaseDir, createBeforeDir); From ca066a8504d9187f9df08b4111d5cfc322fefdbd Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Fri, 14 Oct 2022 15:02:49 +1100 Subject: [PATCH 14/20] Fix vue cli in shell --- code/lib/cli/src/repro-templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli/src/repro-templates.ts b/code/lib/cli/src/repro-templates.ts index 71c78495c8c..b6c3a2c60d0 100644 --- a/code/lib/cli/src/repro-templates.ts +++ b/code/lib/cli/src/repro-templates.ts @@ -248,7 +248,7 @@ const vueCliTemplates = { 'vue-cli/vue2-default-js': { name: 'Vue-CLI (Vue2 JS)', script: - 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge --preset=Default\\ (Vue\\ 2)', + 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge --preset="Default (Vue 2)"', cadence: ['ci', 'daily', 'weekly'], skipTasks: [ // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. From 630ad256843a142d8c142a79bd50e5cc209b81b0 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 14 Oct 2022 10:52:33 +0200 Subject: [PATCH 15/20] optimize deps --- code/ui/.storybook/main.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/code/ui/.storybook/main.ts b/code/ui/.storybook/main.ts index c937627af8f..0cf89ad31f8 100644 --- a/code/ui/.storybook/main.ts +++ b/code/ui/.storybook/main.ts @@ -1,5 +1,5 @@ import vitePluginReact from '@vitejs/plugin-react'; -import { PluginOption } from 'vite'; +import type { PluginOption } from 'vite'; import type { StorybookConfig } from '../../frameworks/react-vite/dist'; const config: StorybookConfig = { @@ -17,14 +17,23 @@ const config: StorybookConfig = { name: '@storybook/react-vite', options: {}, }, - /* - This might look complex but all we're doing is removing the default set of React Vite plugins - and adding them back in, but with the `jsxRuntime: 'classic'` option. - TODO: When we've upgraded to React 18 all of this shouldn't be necessary anymore - */ viteFinal: (config) => { return { ...config, + optimizeDeps: { + ...config.optimizeDeps, + include: [ + ...(config.optimizeDeps?.include ?? []), + 'react-element-to-jsx-string', + 'core-js/modules/es.regexp.flags.js', + 'react-colorful', + ], + }, + /* + This might look complex but all we're doing is removing the default set of React Vite plugins + and adding them back in, but with the `jsxRuntime: 'classic'` option. + TODO: When we've upgraded to React 18 all of this shouldn't be necessary anymore + */ plugins: [...withoutReactPlugins(config.plugins), vitePluginReact({ jsxRuntime: 'classic' })], }; }, From d1e7682c6e6b54fe8ac47603ef9969b1262b4b90 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 14 Oct 2022 11:11:55 +0200 Subject: [PATCH 16/20] comment out failing FilteredAddons story --- code/ui/manager/src/containers/panel.stories.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/code/ui/manager/src/containers/panel.stories.tsx b/code/ui/manager/src/containers/panel.stories.tsx index 982ee395f56..c330f93c918 100644 --- a/code/ui/manager/src/containers/panel.stories.tsx +++ b/code/ui/manager/src/containers/panel.stories.tsx @@ -5,9 +5,19 @@ export default { }; export const AllAddons = () =>
By default all addon panels are rendered
; -export const FilteredAddons = () =>
By default all addon panels are rendered
; +/* +TODO: this story currently breaks the whole Storybook UI (including the manager). +Current findings: +- Only happens when actions below are disabled, not when a11y is. +- Is related to panels and addon tabs. +- Commenting out code/lib/components/src/tabs/tabs.tsx#L186 fixes the issue. +- ... this line: {list.map(({ id, active, render }) => render({ key: id, active }))} +- The error is most likely the shenanigans we do at code/lib/components/src/tabs/tabs.tsx#childrenToList + +export const FilteredAddons = () =>
By default all addon panels are rendered
; FilteredAddons.parameters = { a11y: { disable: true }, actions: { disable: true }, }; +*/ From c17ce4cb5ee35c8fcbe4be214ef122175645c1ec Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 14 Oct 2022 11:48:54 +0200 Subject: [PATCH 17/20] remove the html entrypoint of lib/components --- code/lib/components/html.d.ts | 1 - code/lib/components/html.js | 1 - code/lib/components/package.json | 3 +-- code/lib/components/src/html.tsx | 15 --------------- 4 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 code/lib/components/html.d.ts delete mode 100644 code/lib/components/html.js delete mode 100644 code/lib/components/src/html.tsx diff --git a/code/lib/components/html.d.ts b/code/lib/components/html.d.ts deleted file mode 100644 index 9cb039290c2..00000000000 --- a/code/lib/components/html.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/html'; diff --git a/code/lib/components/html.js b/code/lib/components/html.js deleted file mode 100644 index 9cb039290c2..00000000000 --- a/code/lib/components/html.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/html'; diff --git a/code/lib/components/package.json b/code/lib/components/package.json index 7715af85c1e..a2bb1007a0f 100644 --- a/code/lib/components/package.json +++ b/code/lib/components/package.json @@ -82,8 +82,7 @@ }, "bundler": { "entries": [ - "./src/index.ts", - "./src/html.tsx" + "./src/index.ts" ], "platform": "neutral" }, diff --git a/code/lib/components/src/html.tsx b/code/lib/components/src/html.tsx deleted file mode 100644 index 09d0997d07d..00000000000 --- a/code/lib/components/src/html.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { dedent } from 'ts-dedent'; -import deprecate from 'util-deprecate'; - -const deprecatedHtmlEndpoint = deprecate( - () => {}, - dedent` - The entry point '@storybook/components/html' is deprecated. Please use '@storybook/components' directly instead. - - See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-storybook-components-html-entry-point - ` -); -deprecatedHtmlEndpoint(); - -export * from './typography/DocumentFormatting'; -export { components, resetComponents } from './index'; From 68460d88dca22dcc9265b815837e702b9526efdb Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 14 Oct 2022 11:56:54 +0200 Subject: [PATCH 18/20] fix error typing --- code/lib/core-common/src/utils/get-storybook-refs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/core-common/src/utils/get-storybook-refs.ts b/code/lib/core-common/src/utils/get-storybook-refs.ts index f79f499c8de..20ceb1951c5 100644 --- a/code/lib/core-common/src/utils/get-storybook-refs.ts +++ b/code/lib/core-common/src/utils/get-storybook-refs.ts @@ -27,7 +27,7 @@ export const getAutoRefs = async (options: Options): Promise return { id: name, ...storybook, version }; } } catch (error) { - if (error.code === 'ERR_PACKAGE_PATH_NOT_EXPORTED') { + if ((error as any).code === 'ERR_PACKAGE_PATH_NOT_EXPORTED') { // silent warning because user can't do anything about it // "package.json" is not part of the package's "exports" field in its package.json return undefined; From 2dbdebf70542449142e1713b7d16f7dc0f38ea85 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 14 Oct 2022 13:19:27 +0200 Subject: [PATCH 19/20] fix unused imports --- code/ui/manager/src/components/layout/container.tsx | 2 +- code/ui/manager/src/components/sidebar/Menu.stories.tsx | 2 +- code/ui/manager/src/components/sidebar/Menu.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ui/manager/src/components/layout/container.tsx b/code/ui/manager/src/components/layout/container.tsx index 7b74d211c0e..04667989973 100644 --- a/code/ui/manager/src/components/layout/container.tsx +++ b/code/ui/manager/src/components/layout/container.tsx @@ -496,7 +496,7 @@ class Layout extends Component { }; render() { - const { children, bounds, options, theme, viewMode, panelCount } = this.props; + const { children, bounds, options, viewMode, panelCount } = this.props; const { isDragging, resizerNav, resizerPanel } = this.state; const margin = 0; diff --git a/code/ui/manager/src/components/sidebar/Menu.stories.tsx b/code/ui/manager/src/components/sidebar/Menu.stories.tsx index 42642a39aa3..ffdd60b1ffd 100644 --- a/code/ui/manager/src/components/sidebar/Menu.stories.tsx +++ b/code/ui/manager/src/components/sidebar/Menu.stories.tsx @@ -1,7 +1,7 @@ import { expect } from '@storybook/jest'; import React, { Fragment, FunctionComponent } from 'react'; -import { WithTooltip, TooltipLinkList, Icons } from '@storybook/components'; +import { TooltipLinkList } from '@storybook/components'; import { styled } from '@storybook/theming'; import { within, userEvent, screen } from '@storybook/testing-library'; import { MenuItemIcon, SidebarMenu, ToolbarMenu } from './Menu'; diff --git a/code/ui/manager/src/components/sidebar/Menu.tsx b/code/ui/manager/src/components/sidebar/Menu.tsx index 9b68d9be4ce..da2e8eda41b 100644 --- a/code/ui/manager/src/components/sidebar/Menu.tsx +++ b/code/ui/manager/src/components/sidebar/Menu.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useState, ComponentProps, FC } from 'react'; +import React, { useMemo, ComponentProps, FC } from 'react'; import { styled } from '@storybook/theming'; import { transparentize } from 'polished'; From 48418cc8b2adf77834bee63bf6c5fc69f70659a0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 14 Oct 2022 14:04:27 +0200 Subject: [PATCH 20/20] fix the circleci config to also save code/ui to the workspace --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a194cd619eb..b55c06aa9f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -122,6 +122,7 @@ jobs: - code/addons - code/frameworks - code/lib + - code/ui - code/renderers - code/presets chromatic: