diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index d1ba27e108..85515068b3 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -7,46 +7,25 @@ setCompodocJson(docJson); const decorator = componentWrapperDecorator( (story) => { - return ` - + return /*html*/ `
${story}
-
- -
- ${story} -
-
- -
- ${story} -
-
- -
- ${story} -
-
- - - - - `; }, ({ globals }) => { + // We need to add the theme class to the body to support body-appended content like popovers and menus + document.body.classList.remove("theme_light"); + document.body.classList.remove("theme_dark"); + + document.body.classList.add(`theme_${globals["theme"]}`); + return { theme: `${globals["theme"]}` }; }, ); @@ -56,16 +35,11 @@ const preview: Preview = { globalTypes: { theme: { description: "Global theme for components", - defaultValue: "both", + defaultValue: "light", toolbar: { title: "Theme", icon: "circlehollow", items: [ - { - title: "Light & Dark", - value: "both", - icon: "sidebyside", - }, { title: "Light", value: "light", @@ -76,16 +50,6 @@ const preview: Preview = { value: "dark", icon: "moon", }, - { - title: "Nord", - value: "nord", - left: "⛰", - }, - { - title: "Solarized", - value: "solarized", - left: "☯", - }, ], dynamicTitle: true, }, diff --git a/apps/browser/src/platform/popup/layout/popup-layout.mdx b/apps/browser/src/platform/popup/layout/popup-layout.mdx index b93c649d69..6a28f7f4f7 100644 --- a/apps/browser/src/platform/popup/layout/popup-layout.mdx +++ b/apps/browser/src/platform/popup/layout/popup-layout.mdx @@ -4,9 +4,6 @@ import * as stories from "./popup-layout.stories"; -Please note that because these stories use `router-outlet`, there are issues with rendering content -when Light & Dark mode is selected. The stories are best viewed by selecting one color mode. - # Popup Tab Navigation The popup tab navigation component composes together the popup page and the bottom tab navigation diff --git a/libs/auth/src/angular/anon-layout/anon-layout-wrapper.mdx b/libs/auth/src/angular/anon-layout/anon-layout-wrapper.mdx index a218eaa149..8fe332b8ca 100644 --- a/libs/auth/src/angular/anon-layout/anon-layout-wrapper.mdx +++ b/libs/auth/src/angular/anon-layout/anon-layout-wrapper.mdx @@ -6,10 +6,6 @@ import * as stories from "./anon-layout-wrapper.stories"; # Anon Layout Wrapper -NOTE: These stories will treat "Light & Dark" mode as "Light" mode. This is done to avoid a bug with -the way that we render the same component twice in the same iframe and how that interacts with the -`router-outlet`. - ## Anon Layout Wrapper Component The auth owned `AnonLayoutWrapperComponent` orchestrates routing configuration data and feeds it diff --git a/libs/components/src/stories/colors.mdx b/libs/components/src/stories/colors.mdx index 22079dfcbf..3a4a4f0fe3 100644 --- a/libs/components/src/stories/colors.mdx +++ b/libs/components/src/stories/colors.mdx @@ -13,7 +13,7 @@ export const Table = (args) => ( - + @@ -119,6 +119,4 @@ Below are all the permited colors. Please consult design before considering addi
General usageGeneral usage
-
-
diff --git a/libs/components/src/stories/kitchen-sink/components/kitchen-sink-main.component.ts b/libs/components/src/stories/kitchen-sink/components/kitchen-sink-main.component.ts index 9c609300ed..fd682bd151 100644 --- a/libs/components/src/stories/kitchen-sink/components/kitchen-sink-main.component.ts +++ b/libs/components/src/stories/kitchen-sink/components/kitchen-sink-main.component.ts @@ -56,12 +56,6 @@ class KitchenSinkDialog { isolated stories. The stories for the Kitchen Sink exist to be tested by the Chromatic UI tests.

- -

- NOTE: These stories will treat "Light & Dark" mode as "Light" mode. This is done to avoid a - bug with the way that we render the same component twice in the same iframe and how that - interacts with the router-outlet. -

diff --git a/libs/components/src/stories/kitchen-sink/kitchen-sink.mdx b/libs/components/src/stories/kitchen-sink/kitchen-sink.mdx index 49493f749e..34e8008188 100644 --- a/libs/components/src/stories/kitchen-sink/kitchen-sink.mdx +++ b/libs/components/src/stories/kitchen-sink/kitchen-sink.mdx @@ -9,7 +9,3 @@ import * as stories from "./kitchen-sink.stories"; The purpose of this story is to compose together all of our components. When snapshot tests run, we'll be able to spot-check visual changes in a more app-like environment than just the isolated stories. The stories for the Kitchen Sink exist to be tested by the Chromatic UI tests. - -NOTE: These stories will treat "Light & Dark" mode as "Light" mode. This is done to avoid a bug with -the way that we render the same component twice in the same iframe and how that interacts with the -`router-outlet`.