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

[Storybook]: "forceReRender" event does not appear to function #8395

Open
2 tasks done
jkaeser opened this issue Feb 25, 2022 · 4 comments
Open
2 tasks done

[Storybook]: "forceReRender" event does not appear to function #8395

jkaeser opened this issue Feb 25, 2022 · 4 comments
Assignees
Labels
dev: research dev Needs some dev work follow-up: DDS engineering inactive package: web components Work necessary for the IBM.com Library web components package storybook

Comments

@jkaeser
Copy link
Member

jkaeser commented Feb 25, 2022

Summary

Storybook exposes a "forceReRender" event/option in its client API, and it looks like we have attempted to use it in the web components package's Storybook configuration to re-render stories when the "Carbon theme" input value changes (see https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/.storybook/config.ts#L86-L92).

From what I can tell, emitting this event doesn't actually trigger anything within Storybook, and the story contents are not re-rendered. Some searching shows others have found the same issue (albeit in other Storybook flavors):

I'm interested in this since it may help us resolve some bugs that occur when knobs are updated but the web components are not re-rendered.

Does anyone know if we are using this part of the API correctly?

Relevant information

No response

Name and organization

John Kaeser
Front End Developer @ Lullabot

Code of Conduct

@jkaeser jkaeser added question Further information is requested package: web components Work necessary for the IBM.com Library web components package storybook labels Feb 25, 2022
@oliviaflory
Copy link
Contributor

@jkaeser could you provide examples of where the knobs aren't working?

@jkaeser
Copy link
Member Author

jkaeser commented Mar 1, 2022

@oliviaflory I've seen a couple bugs that only occur in Storybook environments due to the way Web Components and Storybook interact, and the ability to force a re-render would have provided a clean solution to them. Examples are #8301 and #8335, both of which have been fixed at this point.

@kennylam kennylam added dev: research and removed question Further information is requested labels Mar 8, 2022
@kennylam
Copy link
Member

kennylam commented Mar 8, 2022

@jkaeser We'll do a quick audit of the Storybook components and see what next steps are.

@stale
Copy link

stale bot commented May 27, 2023

We've marked this issue as stale because there hasn't been any activity for 60 days. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev: research dev Needs some dev work follow-up: DDS engineering inactive package: web components Work necessary for the IBM.com Library web components package storybook
Projects
Status: No status
Development

No branches or pull requests

8 participants