diff --git a/apps/nextjs/.storybook/chromatic.ts b/apps/nextjs/.storybook/chromatic.ts index ab39986c..b2321b0f 100644 --- a/apps/nextjs/.storybook/chromatic.ts +++ b/apps/nextjs/.storybook/chromatic.ts @@ -1,11 +1,6 @@ import "@storybook/csf"; -type ChromaticModes = - | "legacy" - | "mobile" - | "mobile-wide" - | "desktop" - | "desktop-wide"; +type ChromaticModes = "mobile" | "mobile-wide" | "desktop" | "desktop-wide"; export function chromaticParams(modes: ChromaticModes[]) { return { @@ -23,11 +18,6 @@ export function chromaticParams(modes: ChromaticModes[]) { ...(modes.includes("desktop-wide") && { "desktop-wide": { viewport: "desktopWide" }, }), - // NOTE: Before we used modes, all snapshots were by default in the 1200px mode. - // This option allows us to reuse the existing desktop snapshot until we're ready to migrate - ...(modes.includes("legacy") && { - "1200px": { viewport: 1200 as const }, - }), }, }, }; diff --git a/apps/nextjs/.storybook/preview.tsx b/apps/nextjs/.storybook/preview.tsx index c0bed2ea..55f606d8 100644 --- a/apps/nextjs/.storybook/preview.tsx +++ b/apps/nextjs/.storybook/preview.tsx @@ -15,6 +15,7 @@ import { DialogProvider } from "../src/components/AppComponents/DialogContext"; import { AnalyticsProvider } from "../src/mocks/analytics/provider"; import { ClerkDecorator } from "../src/mocks/clerk/ClerkDecorator"; import { TRPCReactProvider } from "../src/utils/trpc"; +import { chromaticParams } from "./chromatic"; import { RadixThemeDecorator } from "./decorators/RadixThemeDecorator"; import "./preview.css"; @@ -48,6 +49,7 @@ const preview: Preview = { }, }, }, + ...chromaticParams(["desktop"]), }, loaders: [mswLoader], }; diff --git a/apps/nextjs/src/components/AppComponents/Chat/export-buttons/index.stories.tsx b/apps/nextjs/src/components/AppComponents/Chat/export-buttons/index.stories.tsx index 8c0ce1c8..10df1a04 100644 --- a/apps/nextjs/src/components/AppComponents/Chat/export-buttons/index.stories.tsx +++ b/apps/nextjs/src/components/AppComponents/Chat/export-buttons/index.stories.tsx @@ -4,7 +4,6 @@ import type { ChatContextProps } from "@/components/ContextProviders/ChatProvide import { ChatContext } from "@/components/ContextProviders/ChatProvider"; import { DemoContext } from "@/components/ContextProviders/Demo"; -import { chromaticParams } from "../../../../../.storybook/chromatic"; import ExportButtons from "./"; const ChatDecorator: Story["decorators"] = (Story, { parameters }) => ( @@ -43,9 +42,6 @@ const meta: Meta = { sectionRefs: {}, documentContainerRef: { current: null }, }, - parameters: { - ...chromaticParams(["legacy"]), - }, }; export default meta; diff --git a/apps/nextjs/src/components/AppComponents/Chat/header.stories.tsx b/apps/nextjs/src/components/AppComponents/Chat/header.stories.tsx index 5e416bb5..d563f73c 100644 --- a/apps/nextjs/src/components/AppComponents/Chat/header.stories.tsx +++ b/apps/nextjs/src/components/AppComponents/Chat/header.stories.tsx @@ -24,7 +24,6 @@ const meta: Meta = { decorators: [DemoDecorator], parameters: { layout: "fullscreen", - ...chromaticParams(["legacy"]), docs: { story: { height: "150px", @@ -48,7 +47,7 @@ export const DemoUser: Story = { appSessionsPerMonth: 3, appSessionsRemaining: 2, }, - ...chromaticParams(["legacy", "desktop-wide"]), + ...chromaticParams(["desktop", "desktop-wide"]), }, };