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]: Addon-docs: Permalinking to MDX docs pages #30532

Open
Radiergummi opened this issue Feb 13, 2025 · 0 comments
Open

[Bug]: Addon-docs: Permalinking to MDX docs pages #30532

Radiergummi opened this issue Feb 13, 2025 · 0 comments

Comments

@Radiergummi
Copy link

Radiergummi commented Feb 13, 2025

Describe the bug

As originally reported in #9428, the Meta block doesn't take an id prop, making it impossible to assign a permalink to MDX documentation pages. This hasn't changed in the releases since the original issue, and it still seems like a bug to me.
Quoting:

Currently in V 5.3 the docs-block has a title property from which the docs-page URL is generated, e.g. the title "DesignSystem / Component / MyButton" creates a route like http://...path/=/docs/designsystem-components-mybutton--page. If we change the title of the docs page, then the link is broken. It would be better if the Meta-Tag could receive an id which enables you to permalink to the page.
Typical use case: Initial creation of pages from entities of your design process where a draft-name and a guid is given e.g. MyButton with guid 781e6e22-e3d2-4ca7-835b-a8b65095bfc0. In later implementation steps, the name may change to TheButton whereas the guid remains the same. Links from design artifacts into storybook should stay the same as they reference the same entity (permalink).

Reproduction link

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

Reproduction steps

This doesn't really apply; if you're so inclined, open up the repro, check the id="home" on the Meta block, and witness how the link to the story doesn't change.

System

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.5.0-alpha.3 => 8.5.5 
    @storybook/addon-interactions: ^8.5.0-alpha.3 => 8.5.5 
    @storybook/addon-onboarding: ^8.5.0-alpha.3 => 8.5.5 
    @storybook/blocks: ^8.5.0-alpha.3 => 8.5.5 
    @storybook/nextjs: ^8.5.0-alpha.3 => 8.5.5 
    @storybook/react: ^8.5.0-alpha.3 => 8.5.5 
    @storybook/test: ^8.5.0-alpha.3 => 8.5.5 
    storybook: ^8.5.0-alpha.3 => 8.5.5

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

1 participant