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

Legacy "selectedName=$name" query parameter doesn't work if story name/id is different #9544

Closed
tmeasday opened this issue Jan 20, 2020 · 3 comments
Assignees
Milestone

Comments

@tmeasday
Copy link
Member

Describe the bug

As we naively map the name to an "story id part" using toId() we don't factor in the possibility the story has a non-automatic name.

To Reproduce

export const defaultStory = () => {}
defaultStory.story = { name: 'Default' };
  1. Browse to http://localhost:6006/iframe.html?selectedKind=kind&selectedName=Default
  2. Notice it redirects you to http://localhost:6006/iframe.html?id=kind--default

Expected behavior
It should redirect you to the actual story id, ie kind--default-story in this case.

@shilman shilman added this to the 5.3.x milestone Jan 20, 2020
@shilman shilman self-assigned this Jan 20, 2020
@shilman shilman added this to 5.3 bugs in Hotlist Jan 20, 2020
@shilman
Copy link
Member

shilman commented Jan 20, 2020

Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.7 containing PR #9545 that references this issue. Upgrade today to try it out!

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Jan 20, 2020
@shilman shilman removed this from 5.3 bugs in Hotlist Jan 20, 2020
@tmeasday
Copy link
Member Author

@shilman it seems this bug is also present in 5.2, we should probably backport the fix.

@shilman
Copy link
Member

shilman commented Jan 31, 2020

@tmeasday We’ve never backported a fix to a minor version before and I’m not sure I want to get into the habit of it. We’ve done it across major versions and I’m happy to do that when needed. What’s wrong with forcing people to upgrade to 5.3 for the fix?

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