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

[Bug]: Unable to Use Subtitle doc block in MDX without a Story #27139

Closed
peschee opened this issue May 14, 2024 · 4 comments · Fixed by #27147
Closed

[Bug]: Unable to Use Subtitle doc block in MDX without a Story #27139

peschee opened this issue May 14, 2024 · 4 comments · Fixed by #27147

Comments

@peschee
Copy link
Contributor

peschee commented May 14, 2024

Describe the bug

Since 8.1.0, the <Subtitle> doc block seems to be broken in MDX.

Before, the following used to work:

import { Meta, Subtitle } from '@storybook/blocks';

<Meta title="Some/Title" />

<Subtitle>Some subtitle</Subtitle>

now, the following error is shown:

No CSF file attached to this docs file, did you forget to use <Meta of={} />?

Removing the <Subtitle> doc block fixes things…

To Reproduce

https://stackblitz.com/edit/github-kqs5ug?file=src%2Fstories%2FConfigure.mdx

System

Storybook Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm <----- active
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @storybook/addon-essentials: ^8.1.0-beta.1 => 8.1.0 
    @storybook/addon-links: ^8.1.0-beta.1 => 8.1.0 
    @storybook/blocks: ^8.1.0-beta.1 => 8.1.0 
    @storybook/test: ^8.1.0-beta.1 => 8.1.0 
    @storybook/web-components: ^8.1.0-beta.1 => 8.1.0 
    @storybook/web-components-vite: ^8.1.0-beta.1 => 8.1.0 
    storybook: ^8.1.0-beta.1 => 8.1.0

Additional context

Also happens with 8.1.0. The minimal repro was created from storybook.new, which still seems to use the beta.

@peschee
Copy link
Contributor Author

peschee commented May 15, 2024

I just noticed that after downgrading our SB instance back to 8.0.10 (after regenerating the lock file), it does not work any more even there. So it might be an issue with a transitive dependency?

@shilman
Copy link
Member

shilman commented May 15, 2024

Probably due to #22552

@peschee
Copy link
Contributor Author

peschee commented May 15, 2024

Cool @shilman! Will this be released in a next 8.1.x version or also backported as a bugfix to previous versions?

@shilman
Copy link
Member

shilman commented May 15, 2024

This will be released in 8.1.1, probably within the next hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants