Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the viewMode is docs, we only show tabs
When the number of tabs is 1, there's no point in showing them
When we don't show anything, the toolbar should be collapsed
AFAIK this was exactly the issue in #10592
This code makes it so when there's only 1 tab shown in docsmode the toolbar collapses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't repro #10592 but @hipstersmoothie 's issue is that "nothing is rendered". AFAICT this change renders even less than what was there before, so I don't understand how this could solve that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can set up an example repo if neeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best is repro in official-storybook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndelangen @shilman I've ran this locally and the only issue I see is that on initial load,
the MDX
docs-only
page that I select onSET_STORIES
shows the toolbar like:and after navigate another story with Canvas/Docs tab, and going back, it's not shown:
the tabs/reordering seems to work fine with
beta.22
:Dnow I'd like to know how to set the
selectedTab
in a similar way asselectedPanel
hehe