-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Addon-docs: Permalinking to MDX docs pages #9428
Comments
I'm gonna call this a bug. There should be a |
I also expect this. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
|
Currently in V 5.3 the
<Meta />
docs-block has atitle
property from which the docs-page URL is generated, e.g. the title "DesignSystem / Component / MyButton" creates a route likehttp://...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 anid
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 guid781e6e22-e3d2-4ca7-835b-a8b65095bfc0
. In later implementation steps, the name may change toTheButton
whereas the guid remains the same. Links from design artifacts into storybook should stay the same as they reference the same entity (permalink).Steps to reproduce
my-button.stories.mdx
.http://...path/=/docs/designsystem-components-mybutton--page
http://...path/=/docs/781e6e22-e3d2-4ca7-835b-a8b65095bfc0
(maybe with suffix--page
)http://...path/=/docs/designsystem-components-thebutton--page
http://...path/=/docs/781e6e22-e3d2-4ca7-835b-a8b65095bfc0
(maybe with suffix--page
)http://...path/=/docs/designsystem-components-mybutton--page
Versions
Work summary
A similar thing already works for stories itself (https://github.com/storybookjs/storybook/blob/next/docs/src/pages/basics/writing-stories/index.md#permalinking-to-stories). Permalinking is possible with the property
componentId
. A similar mechanism has to be implemented for docs-page via the Meta tag.I would suppose the property name
id
is more appropriate ascomponentId
. Ifid
is conflicting, thenpageId
may also be a good name.Remark: Both URLs (by title, by id) should be valid.
Where to start
First orientation may be the current implementation of the story with its permalinking feature:
Acceptance criteria
id
orpageId
Who to contact
The text was updated successfully, but these errors were encountered: