Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore applyDecorators in v6 story store #443

Merged
merged 2 commits into from Jul 15, 2022
Merged

Ignore applyDecorators in v6 story store #443

merged 2 commits into from Jul 15, 2022

Conversation

kvcvc
Copy link
Contributor

@kvcvc kvcvc commented Jul 14, 2022

In storybookjs/storybook@fcb61e1 decorateStory was renamed by @yannbf to applyDecorators but the same author didn't think to rename potential references leading to a applyDecorators was not supported :( ! log and I assume decorators not being applied when using Storybook. This pull request aims to solve the issue.

@IanVS
Copy link
Member

IanVS commented Jul 14, 2022

Hi, the commit you linked to has not been released in any version of storybook outside of the 7.0 alphas. How were you seeing that warning, since the vite builder is not yet supported in version 7?

Also, we shouldn't rename the handler here, because other frameworks and older versions of storybook will continue to use decorateStory. If we need to support applyDecorators as well, we'll need to add it to the switch, while leaving the other in place as well.

@kvcvc
Copy link
Contributor Author

kvcvc commented Jul 14, 2022

Hi, Ian, I believe the change was part of 6.5.9, or at least that's the version I experienced the issue with.

@IanVS
Copy link
Member

IanVS commented Jul 14, 2022

FWIW, the applyDecorators is an export from frameworks (and can be overridden in preview.js) but is only used in storyStoreV7 mode. The file being updated here is used for the v6 store, which handles decorators a different way, but still ends up reading the export which falls through to the default warning. We can safely ignore it in the case statement where you put it. 👍

@IanVS IanVS changed the title Rename case decorateStory to applyDecorators Ignore applyDecorators in v6 story store Jul 14, 2022
@IanVS IanVS merged commit baf4d7d into storybookjs:main Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants