atanasster / storybook-addon-deps

A storybook addon to add a dependencies tree exporer tab.
https://atanasster.github.io/storybook-addon-deps/?path=/docs/design-system-avatarlist--short
MIT License
59 stars 3 forks source link

storybook-addon-deps/blocks not working with Storybook 6.4.9 #19

Open scurrilus-funke opened 2 years ago

scurrilus-funke commented 2 years ago

Hi, first of all thanks for this nice component.

Today i did an upgrade to Storybook 6.4.9 after that stories with integration of "storybook-addon-deps/blocks" stoped working.

In the Browser console i get this error.

Bildschirmfoto 2021-12-09 um 11 28 39

When i remove "storybook-addon-deps/blocks" from a specific story the doc works. Please give me hint, what is to change in Setup.

Here is an Example. I use MDX stories.

import { Meta, Story, Preview, ArgsTable, Source } from '@storybook/addon-docs';
import { DependenciesTable } from 'storybook-addon-deps/blocks';
import { OpulenceBox } from './OpulenceBox';
import ImgTeaserListData from '@/mocks/ImgTeaserListData.json';
import ImgFullMediaCardData from '@/mocks/ImgFullMediaCardData.json';

<Meta
    title="PageBoxComponents/OpulenceBox"
    component={OpulenceBox}
    args={{pageData: {headline: 'Neues aus Bochum', opulenceCardProps: ImgFullMediaCardData, opulenceArticlePropsList: ImgTeaserListData[0].list }}}
/>

<Source />

<Preview>
    <Story name="OpulenceBox">{args => <OpulenceBox {...args} />}</Story>
</Preview>

<ArgsTable story="OpulenceBox" />

<DependenciesTable titleDependencies="Dependencies" titleDependents="Dependents" of={OpulenceBox} />

Here is my preview.js config.

import { DocsPage } from 'storybook-addon-deps/blocks/DocsPage';

addParameters({
    viewport: {
        viewports: INITIAL_VIEWPORTS,
    },
    docs: {
        container: DocsContainer,
        page: DocsPage,
    },
    dependencies: { withStoriesOnly: false, hideEmpty: true },
});
scurrilus-funke commented 2 years ago

Additional Information: Rollback to Storybook 6.3.12 brings DependenciesTable and docs back to work.

atanasster commented 2 years ago

Thanks for the info, I am not actively maintaining the plugin, but if someone files a PR will be glad to merge it. Btw, are you using the new storyStore format?