-
-
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
linkTo seems to expect the humanized story name #9963
Comments
I just hit the same issue, took a while to work out the solution. The docs say:
which doesn't seem to tally with the implementation. Plus |
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! |
As far as I know the bug is still there. |
At the very least, the documentation should be updated as it doesn't tally with the implementation. |
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! |
I would defintely consider this a bug. When looking at the story file, I see the names prior to humanization, so I should be able to use them the same. It seems the addon should humanize whatever is passed to it before creating the anchor slug from the result. Here's another example of what doesn't currently work: export default {
title: 'common/Example',
component: Example,
};
export const Default = () => (
<Example>
<LinkTo story="LinkedTo">Link</LinkTo>
</Example>
);
export const LinkedTo = () => (
<Example>You have arrived.</Example>
); |
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! |
This is still an issue. |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
Still an issue. |
Describe the bug
It seems like
linkTo
expects the humanized story name as the second parameter, rather than what the function is called. I.e. giving it "withEmoji" fails and "With Emoji" succeeds. This does not align with the docs where it looks like you should use the same name as the function itself.To Reproduce
Expected behavior
Navigate to the withEmoji story.
Code snippets
Does not work:
Works:
System:
The text was updated successfully, but these errors were encountered: