Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

fix(Storybook): fixes white flash #30

Closed
wants to merge 3 commits into from

Conversation

arwehrman
Copy link
Contributor

Prior to 6.5, we were able to set appBG in the custom Storybook Theme to set the background in the Preview iframe. This is no longer the case. There are possible fixes coming but have not seen them actually committed to a release yet. See this pr

The other known issue is a white flash when clicking from a Story to the Docs of that Story. This is related to some classes being displayed and not displayed during 'loading' of the pages. The CSS overrides added in this PR are to fix those issues until Storybook fixes them.

This PR makes a few updates to the Storybook configuration:

  • Adds CCS style overrides for style overrides the known appBG and the loading issue styles when clicking between Stories and Docs
  • Disables the following Storybook addons from the toolbar: Background, Measure, Outline and Viewport. We are not utilizing these and most of them have to do with DOM anyway.

@@ -44,10 +44,7 @@ const preview = {
backgrounds: { default: 'dark' },
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't actually need to put this in here, it the default config

color: /(background|color)$/i,
date: /Date$/
}
expanded: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adds description and default column to the controls table

@arwehrman arwehrman force-pushed the fix/storybook-controls-config branch from 701adbf to 5757943 Compare November 17, 2023 19:48
@arwehrman arwehrman closed this Nov 17, 2023
@arwehrman
Copy link
Contributor Author

linked wrong branch and changes

@arwehrman arwehrman deleted the fix/storybook-controls-config branch November 17, 2023 20:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant