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

v5 URL format: default to first story if no path or storyId is included #7582

Closed
kevinSuttle opened this issue Jul 26, 2019 · 3 comments
Closed

Comments

@kevinSuttle
Copy link
Contributor

kevinSuttle commented Jul 26, 2019

Is your feature request related to a problem? Please describe.
Having to include --* at the end of Storybook URLs is a bit of a task. Seems avoidable.

Describe the solution you'd like

  1. If the URL doesn't have --* or $[storyID} at the end of it, the router would redirect to the first story listed.

  2. (Maybe related?) If the URL doesn't have

  • a /
  • or ?
  • or path

redirect to the first story

e.g. https://monorepo-git-next.storybook.now.sh/examples/official-storybook - nothing happens
https://monorepo-git-next.storybook.now.sh/examples/official-storybook/ - redirect happens

Describe alternatives you've considered
Always including /, ?, path, and --* at the end of Storybook URLs.

Are you able to assist bring the feature to reality?
I can

Additional context
Example:

https://monorepo-dzdv58z2b.now.sh/examples/official-storybook/?path=/story/docs-docspage--with-subtitle - works

If you remove the --${storyId} at the end, the Story group is selected on the left, but there is no individual story selected or rendered on the Canvas

Try: https://monorepo-dzdv58z2b.now.sh/examples/official-storybook/?path=/story/docs-docspage

Image 2019-07-26 at 3 45 54 PM

@kevinSuttle kevinSuttle changed the title v5 URL format: default to first story if no storyId is included v5 URL format: default to first story if no path or storyId is included Aug 15, 2019
@stale stale bot added the inactive label Sep 5, 2019
@stale stale bot removed the inactive label Sep 6, 2019
@macrozone
Copy link
Contributor

@kevinSuttle would also be great if the urls would not be case-sensitive, see #8500

@storybookjs storybookjs deleted a comment from stale bot Oct 21, 2019
@shilman
Copy link
Member

shilman commented Oct 24, 2019

Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.27 containing PR #7648 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

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

@shilman shilman closed this as completed Oct 24, 2019
@kevinSuttle
Copy link
Contributor Author

Thank you!

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

3 participants