Open jkaeser opened 2 years ago
@jkaeser could you provide examples of where the knobs aren't working?
@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 https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/8301 and https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/8335, both of which have been fixed at this point.
@jkaeser We'll do a quick audit of the Storybook components and see what next steps are.
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.
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