diff --git a/site/.storybook/main.js b/site/.storybook/main.js deleted file mode 100644 index 7a275f0ef90ee..0000000000000 --- a/site/.storybook/main.js +++ /dev/null @@ -1,33 +0,0 @@ -import turbosnap from "vite-plugin-turbosnap"; - -module.exports = { - stories: ["../src/**/*.stories.tsx"], - - addons: [ - "@chromatic-com/storybook", - "@storybook/addon-docs", - "@storybook/addon-links", - "@storybook/addon-themes", - "storybook-addon-remix-react-router", - ], - - staticDirs: ["../static"], - - framework: { - name: "@storybook/react-vite", - options: {}, - }, - - async viteFinal(config, { configType }) { - config.plugins = config.plugins || []; - if (configType === "PRODUCTION") { - config.plugins.push( - turbosnap({ - rootDir: config.root || "", - }), - ); - } - config.server.allowedHosts = [".coder"]; - return config; - }, -}; diff --git a/site/.storybook/main.ts b/site/.storybook/main.ts new file mode 100644 index 0000000000000..00d97a245891c --- /dev/null +++ b/site/.storybook/main.ts @@ -0,0 +1,29 @@ +export default { + stories: ["../src/**/*.stories.tsx"], + + addons: [ + "@chromatic-com/storybook", + "@storybook/addon-docs", + "@storybook/addon-links", + "@storybook/addon-themes", + "storybook-addon-remix-react-router", + ], + + staticDirs: ["../static"], + + framework: { + name: "@storybook/react-vite", + options: {}, + }, + + async viteFinal(config) { + // Storybook seems to strip this setting out of our Vite config. We need to + // put it back in order to be able to access Storybook with Coder Desktop or + // port sharing. + config.server = { + ...config.server, + allowedHosts: [".coder", ".dev.coder.com"], + }; + return config; + }, +} satisfies import("@storybook/react-vite").StorybookConfig; diff --git a/site/package.json b/site/package.json index d230e35163642..37ea2306feac0 100644 --- a/site/package.json +++ b/site/package.json @@ -183,8 +183,7 @@ "ts-proto": "1.164.0", "typescript": "5.6.3", "vite": "6.3.5", - "vite-plugin-checker": "0.9.3", - "vite-plugin-turbosnap": "1.0.3" + "vite-plugin-checker": "0.9.3" }, "browserslist": ["chrome 110", "firefox 111", "safari 16.0"], "resolutions": { diff --git a/site/pnpm-lock.yaml b/site/pnpm-lock.yaml index e815515146754..1341de609fe1c 100644 --- a/site/pnpm-lock.yaml +++ b/site/pnpm-lock.yaml @@ -459,9 +459,6 @@ importers: vite-plugin-checker: specifier: 0.9.3 version: 0.9.3(@biomejs/biome@1.9.4)(eslint@8.52.0)(optionator@0.9.3)(typescript@5.6.3)(vite@6.3.5(@types/node@20.17.16)(jiti@2.4.2)(yaml@2.7.0)) - vite-plugin-turbosnap: - specifier: 1.0.3 - version: 1.0.3 packages: @@ -6084,9 +6081,6 @@ packages: vue-tsc: optional: true - vite-plugin-turbosnap@1.0.3: - resolution: {integrity: sha512-p4D8CFVhZS412SyQX125qxyzOgIFouwOcvjZWk6bQbNPR1wtaEzFT6jZxAjf1dejlGqa6fqHcuCvQea6EWUkUA==, tarball: https://registry.npmjs.org/vite-plugin-turbosnap/-/vite-plugin-turbosnap-1.0.3.tgz} - vite@6.3.5: resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==, tarball: https://registry.npmjs.org/vite/-/vite-6.3.5.tgz} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -12766,8 +12760,6 @@ snapshots: optionator: 0.9.3 typescript: 5.6.3 - vite-plugin-turbosnap@1.0.3: {} - vite@6.3.5(@types/node@20.17.16)(jiti@2.4.2)(yaml@2.7.0): dependencies: esbuild: 0.25.3 diff --git a/site/src/modules/dashboard/DashboardLayout.tsx b/site/src/modules/dashboard/DashboardLayout.tsx index 2fdc04d21da9d..1bbf5347e085e 100644 --- a/site/src/modules/dashboard/DashboardLayout.tsx +++ b/site/src/modules/dashboard/DashboardLayout.tsx @@ -23,10 +23,10 @@ export const DashboardLayout: FC = () => { {canViewDeployment && } -
+
-
+
}> diff --git a/site/src/modules/dashboard/DeploymentBanner/DeploymentBannerView.tsx b/site/src/modules/dashboard/DeploymentBanner/DeploymentBannerView.tsx index e6e4c8e32be84..60681db06102a 100644 --- a/site/src/modules/dashboard/DeploymentBanner/DeploymentBannerView.tsx +++ b/site/src/modules/dashboard/DeploymentBanner/DeploymentBannerView.tsx @@ -105,6 +105,7 @@ export const DeploymentBannerView: FC = ({ return (