check if docsOnly is set to hide the addon panels #9687
Merged
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.
Issue: #9684
What I did
added additional check for docsOnly for hiding addon panels
the use case is what user goes to a 'story' path out of a mdx page
How to test
the flow of this code is really complicated, I have the use cases in official-storybook but comes also that depending on the setup it can get even more complicated.
At some point, you might decide to not set 'story' by default if user navigates to the main age - and show addons/toolbars only after the first story was loaded, so we know if its a documentation only story. There will be a slight delay to displaying the addon panel if its actually a canvas story, but long term will avoid UI complications