storybook icon indicating copy to clipboard operation
storybook copied to clipboard

Open on Docs tab by default

Open aymenmensi opened this issue 2 years ago • 0 comments

I want it to open by default on the doc tab and then be able to navigate as I used to

Description

when using viewMode: 'docs' it doesn't load the docs by default at first and then when I change to another component story it goes to the doc tab, but when I toggle to another story from the same component it sends me back to the docs page

scenario

  1. Page loads at http://localhost:6006/?path=/story/introduction-saqara-ui--page, it should've been docs not story
  2. I open the button "Primary" story, and it opens on the doc page http://localhost:6006/?path=/docs/components-button--primary
  3. I navigate to the story tab (canvas) http://localhost:6006/?path=/story/components-button--primary
  4. I navigate to the "Secondary" story wanting the story (canvas) tab to be opened but get the docs page again http://localhost:6006/?path=/docs/components-button--secondary

Screencast from 12-09-22 09:55:05.webm

Recommended fix

the viewMode: 'docs' should able us to load the docs page at first not the canvas one, then it should let us navigate like we always do without redirecting us to the docs with every navigation

aymenmensi avatar Sep 12 '22 08:09 aymenmensi