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

[Bug] SB Channel events are not doing anything in portable stories #29773

Open
Tracked by #29770 ...
vanessayuenn opened this issue Dec 2, 2024 · 0 comments
Open
Tracked by #29770 ...

Comments

@vanessayuenn
Copy link
Contributor

Storybook Channel

Storybook relies a lot in the Storybook channel. It only works correctly in Storybook, as most of places where channel events are registered are part of Storybook manager UI. In portable stories, it's just mocked. This causes issues in case stories or decorators actually need to emit/listen to events. One very clear example is the useArgs hook from @storybook/preview-api, which relies on emitting events, and therefore it won't do anything in portable stories. It so happens that many people use that hook because they want the controls panel to update as they interact with their components.

💡 Solutions/Action items:

  • Honestly not sure, we need to discuss/research
  • (From Michael) Specifically for useArgs, we could listen to its event in the mocked channel in PS and throw an error mentioning it's not supported (great short term solution)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant