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]: Name from defineOptions in Vue 3 Component is ignored in the Documentation Show Code preview #30455

Open
radoslawkalamon opened this issue Feb 3, 2025 · 0 comments

Comments

@radoslawkalamon
Copy link

Describe the bug

The name defined in defineOptions() within a Vue 3 component is ignored in the Documentation "Show Code" section of Storybook. There are no error messages, but the expected behavior is not observed.

Screenshot:
Image

Screenshot from Vue Dev Tools:
Image

Reproduction link

https://stackblitz.com/edit/github-igquysze?file=src%2FFilenameButton.stories.ts

Reproduction steps

Steps to Reproduce:

  1. Define a Vue component with defineOptions and name attribute.
  2. Create story for this component.
  3. Run the Storybook instance.
  4. Navigate to the component's documentation.
  5. Observe the "Show Code" section.

Expected Behavior:
The name from defineOptions should be displayed in the Documentation "Show Code" section.

Actual Behavior:
The name from defineOptions is ignored and filename is shown.

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.20.3 - /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.6.0-alpha.3 => 8.6.0-alpha.3 
    @storybook/addon-interactions: ^8.6.0-alpha.3 => 8.6.0-alpha.3 
    @storybook/addon-onboarding: ^8.6.0-alpha.3 => 8.6.0-alpha.3 
    @storybook/blocks: ^8.6.0-alpha.3 => 8.6.0-alpha.3 
    @storybook/test: ^8.6.0-alpha.3 => 8.6.0-alpha.3 
    @storybook/vue3: ^8.6.0-alpha.3 => 8.6.0-alpha.3 
    @storybook/vue3-vite: ^8.6.0-alpha.3 => 8.6.0-alpha.3 
    storybook: ^8.6.0-alpha.3 => 8.6.0-alpha.3

Additional context

No response

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

No branches or pull requests

2 participants