You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Show code" button on several of my stories' autodocs pages changed to say "No code available" after upgrading Storybook from 6.5 to 7.0. This happened on stories that use the FAST Element ref directive to refer to parts of their template.
I tried debugging my source transform function and found that it was only called with an empty string as the source input in the stories that stopped working.
To build this repository, clone the main branch then run npm install then npm run build. Then npm run storybook -w @ni/nimble-components will launch the storybook.
I can try to provide a smaller reproduction if that would be helpful. I could also try debugging the code that populates the "Show code" pane if you can share instructions for where to look and how to debug the code with source maps.
FAST is a framework for defining custom elements, similar to others like LitElement. It offers a templating syntax which we are using to construct the HTML that we pass to Storybook. That syntax includes directives like ref to identify DOM nodes in the template so they can be referenced from elsewhere. That directive runs during the connectedCallback() to populate a property on the custom element which refers to that DOM element. I'm not sure what about this might trigger this bug.
The text was updated successfully, but these errors were encountered:
Describe the bug
The "Show code" button on several of my stories' autodocs pages changed to say "No code available" after upgrading Storybook from 6.5 to 7.0. This happened on stories that use the FAST Element
ref
directive to refer to parts of their template.I tried debugging my source transform function and found that it was only called with an empty string as the source input in the stories that stopped working.
To Reproduce
This is reproducing in the Storybook for the ni/nimble repository in docs pages like dialog (source) and tooltip (source).
To build this repository, clone the
main
branch then runnpm install
thennpm run build
. Thennpm run storybook -w @ni/nimble-components
will launch the storybook.I can try to provide a smaller reproduction if that would be helpful. I could also try debugging the code that populates the "Show code" pane if you can share instructions for where to look and how to debug the code with source maps.
System
Additional context
FAST is a framework for defining custom elements, similar to others like LitElement. It offers a templating syntax which we are using to construct the HTML that we pass to Storybook. That syntax includes directives like
ref
to identify DOM nodes in the template so they can be referenced from elsewhere. That directive runs during theconnectedCallback()
to populate a property on the custom element which refers to that DOM element. I'm not sure what about this might trigger this bug.The text was updated successfully, but these errors were encountered: