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

Redirect to story/canvas from non-existent docs page #9702

Closed
ArrayKnight opened this issue Feb 2, 2020 · 4 comments
Closed

Redirect to story/canvas from non-existent docs page #9702

ArrayKnight opened this issue Feb 2, 2020 · 4 comments

Comments

@ArrayKnight
Copy link

ArrayKnight commented Feb 2, 2020

Describe the bug
Introducing docs addon leads to poor UX when switching between docs pages and stories without docs pages.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://storybook-addon-headless.netlify.com/
  2. Notice that the default page is a docs only page and that the path is a story, not docs
  3. Notice that the paths for the 3 docs pages are not stories, but docs instead
  4. Click on Examples > GraphQL > Artworks (a story without docs)
  5. Notice that the story loads as expected and that the path is a story, not docs
  6. Click on any of the 3 docs pages
  7. Click on Examples > GraphQL > Artworks
  8. Notice that the story doesn't load as expected and that the path is docs, not story

The bug is that there's no value in showing a docs page that doesn't exist and that there's no way (that I'm aware of) to control the navigation links.

Expected behavior
Any (or all) of the below:

  • The docs page redirects to the story
  • The sidebar navigation links should always point to the story path
  • Docs only pages should default to using the story path (only)

Code snippets
https://github.com/ArrayKnight/storybook-addon-headless

System:
OS: Windows 10 10.0.18362
CPU: (8) x64 Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
Binaries:
Node: 12.14.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.13.7 - D:\Git\storybook-addon-headless\node_modules.bin\npm.CMD
Browsers:
Edge: 44.18362.449.0
Chrome: Version 79.0.3945.130 (Official Build) (64-bit)

@shilman
Copy link
Member

shilman commented Feb 5, 2020

@ArrayKnight What a cool addon! Why don't you try the viewMode parameter, available in 6.0.0: #9090

@ArrayKnight
Copy link
Author

ArrayKnight commented Feb 5, 2020

Once v6 is released/stable I'll give that a shot. Is there no way to do so in v5?

@stale
Copy link

stale bot commented Feb 27, 2020

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!

@stale stale bot added the inactive label Feb 27, 2020
@stale
Copy link

stale bot commented Mar 28, 2020

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!

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