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

Add-on docs top tabs behavior feels awkward #9919

Closed
owenallenaz opened this issue Feb 20, 2020 · 5 comments
Closed

Add-on docs top tabs behavior feels awkward #9919

owenallenaz opened this issue Feb 20, 2020 · 5 comments

Comments

@owenallenaz
Copy link

Is your feature request related to a problem? Please describe.
I think storybook is a great product, but I just feel like the addon-docs could use a little polishing around how it handles the top tabs. Right now when you enable the addon-docs addon, we get the auto generation of the DocsPage as well as the addition of a tab at the top level. Unfortunately to me it feels like the current behavior is awkward and confusing.

Describe the solution you'd like

  • Eliminate the top tabs (or allow us to configure them).
  • If a story is an MDX story, then when you navigate to that item, it should load MDX style as it currently does (as if it was in the doc tab)
  • If a story is not an MDX story, then it should load in the canvas, as it currently does (with no docs tab).
  • If you still want to auto generate the DocsPage, then it should create a new story at the same Hierarchy. This story could sort to the top of that hierarchy. This makes the DocsPage have it's own unique left nav item, rather than a weird docs tab at the top that is shared between all stories.
  • This way when people navigate using the left navigation they don't have to then ALSO navigate using the top tabs. As it stands right now, if I'm on the docs tab, and I click between the stories, nothing changes. I have to click to the canvas tab. That just feels like a wonky UX.

Looking at other issues throughout the repo it seems like I see similar complaints about trying to hide the canvas tab or hide the docs tab, but I think most of those are largely dancing around the issue, which is that the tabs at the top don't interact well with the left-navigation focus of the product as a whole. Clicking on a nav item in the left should take me to that content. Right not clicking on the left nav gives you a different behavior depending on whether you click the canvas tab or the doc tab previously selected.

Are you able to assist bring the feature to reality?
Yes. If we want to make this configurable, then we could expose some additional settings. On a standard story file, or in a global setting, if we could dictate which tabs display. The could be done for MDX files, if we could dictate which tabs display. Then if there was only one tab available, no tabs are actually shown.

I'm open to suggestions or helping out if there's a way I could. Thanks for the great product.

@shilman
Copy link
Member

shilman commented Feb 20, 2020

Thanks for the feedback @owenallenaz cc @domyen

I agree there's some confusion around the behavior, so it would be great to work out some improvements.

First, some clarifications:

As it stands right now, if I'm on the docs tab, and I click between the stories, nothing changes.

The page should scroll to that story as of 5.3

If we want to make this configurable, then we could expose some additional settings.

There are some new configuration options in 6.0 per #9095. I haven't had a chance to test it out yet, but it could potentially address some of your needs

@owenallenaz
Copy link
Author

@shilman Thanks for the quick response. Regarding your first clarification, that may be true, but it only occurs if the story list is long enough to be scrollable.

https://www.screencast.com/t/cYCsikgSuL - In this example in the "Menu" hierarchy in the left, you'll see that there are two stories, but each story is very small. So clicking between the stories, has no visual change at all other than the left-nav changing. My thought, was that if I click on a specific story, then it opens that story, and that story only (since the docs tab wouldn't be there anymore). This also helps with really large stories like https://www.screencast.com/t/roqFZJp4 . When someone clicks to DataView->Example, I'd like it to just open the canvas of that story.

I look forward to trying out 6.0 when it's out to see if it'll provide a way that I could configure my stance in this way.

@shilman
Copy link
Member

shilman commented Feb 20, 2020

@owenallenaz 6.0 is available in alpha on the next NPM tag if you'd like to give it a try!

@stale
Copy link

stale bot commented Mar 12, 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 Mar 12, 2020
@stale
Copy link

stale bot commented Apr 11, 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