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
Hi, we've recently kicked off a project to implement the code-connect for our design system. We have already been using the Storybook and thought it would be straight forward to implement the code-connect, but we ran into an issue with the component registration when using different export styles on our *.stories.tsx files
The anonymous default object literal export works seamlessly:
but, when the default export is assigned to a constant, Storybook correctly includes the Figma embed, but the component fails to register in dev-mode:
// This configuration does not appear in dev mode// There are no CLI errors or warnings, but Storybook displays the Figma embed.constmetadata: Meta<typeofButton>={title: 'Button',component: Button,argTypes: {variant: {control: 'radio',options: ['primary','secondary','tertiary','danger'],}},parameters: {design: {type: 'figma',url: 'https://www.figma.com',examples: [Default],props: {variant: figma.enum('variant',{primary: 'primary',secondary: 'secondary',tertiary: 'tertiary',danger: 'danger',}),},},},}exportdefaultmetadata
It seems like code-connect fails to recognize the component when the Storybook files deviate from a certain pattern, which seems like a restrictive limitation. Documenting this behavior could save time for others facing similar issues. Additionally, any insights into why this happens or potential fixes would be greatly appreciated, if there is anything we can do on our side?
Hey, thanks for the input on this! We're definitely aware that we don't support every Storybook syntax and so your feedback is really helpful. I think in this case, our parser isn't following the metadata reference – hopefully this is quite an easy fix. We'll take a look and get back to you once we have a solution.
Hi, we've recently kicked off a project to implement the code-connect for our design system. We have already been using the Storybook and thought it would be straight forward to implement the
code-connect
, but we ran into an issue with the component registration when using different export styles on our*.stories.tsx
filesThe anonymous default object literal export works seamlessly:
but, when the default export is assigned to a constant, Storybook correctly includes the Figma embed, but the component fails to register in dev-mode:
It seems like
code-connect
fails to recognize the component when the Storybook files deviate from a certain pattern, which seems like a restrictive limitation. Documenting this behavior could save time for others facing similar issues. Additionally, any insights into why this happens or potential fixes would be greatly appreciated, if there is anything we can do on our side?our storybook dependencies:
The text was updated successfully, but these errors were encountered: