-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
V9 Docsite: Hide Addons
tab from mobile viewports
#23339
V9 Docsite: Hide Addons
tab from mobile viewports
#23339
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 26adba4:
|
📊 Bundle size report🤖 This report was generated against 5090df2a0e145fa2664852334e62592ec6cef5ac |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 5090df2a0e145fa2664852334e62592ec6cef5ac (build) |
/* | ||
* Hides "Addons" button from mobile view nav. | ||
*/ | ||
nav > button:last-child { |
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.
This feels brittle to me. Storybook might change its DOM structure and then this won't work anymore.
Is it possible to use the showPanel property to disable this via Storybook's API?
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.
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.
Filed an issue with Storybook.
The addons and canvas tabs should only be visible during the internal devloop. Apart from the fact that this happens who does it impact ? |
c931a19
to
26adba4
Compare
Not super critical but the consensus has been that the addons tab provides no value to visitors of the docsite and only adds noise so hiding/removing it might be the way to go. |
Do you see the addons tab when you visit the public docsite ??? |
Yup 😥 |
No, you can see it on desktop if you shrink the width of the browser window to "mobile" size. |
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.
Too bad showPanel: false
doesn't work for mobile viewports. This is fine by me as an interim solution and hopefully it'll be fixed upstream in Storybook soon.
* hide add-ons button * add showPanel:true to hide addons from desktop too
Current Behavior
New Behavior
Related Issue(s)
Fixes #23161