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
UI: Add URL parameters to SB to tweak visible UI #17891
UI: Add URL parameters to SB to tweak visible UI #17891
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 2317c2a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
57f8598
to
24c2da2
Compare
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.
@JonathanKolnik can you add some QA instructions here to help me kick the tires?
@shilman sorry for not including QA instructions. If you build any of the examples and apply the query param you can also tweak the params here in this story https://github.com/storybookjs/storybook/pull/17891/files#diff-49dbf57f9190dc0ee066badd7466c4ed85ac1797dd09fd0d9a42a86b010be845R173 oh also works in the hosted storybooks (still getting used to how meta this is haha) you can see here how the canvas tab is hidden https://5a375b97f4b14f0020b0cda3-lzkxepkwvd.chromatic.com/?path=/story/ui-preview--with-toolbar-exclusions&toolbarExclude=canvas it's also worth testing the prefix matching like this https://5a375b97f4b14f0020b0cda3-lzkxepkwvd.chromatic.com/?path=/story/ui-preview--with-toolbar-exclusions&toolbarExclude=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.
Did a quick test & it's looking great.
@JonathanKolnik can you check chromatic? |
@shilman updated by leaving the story the way it was before this branch |
Issue: UI can not be hidden conditionally
What I did
Add the ability to use a comma-separated list query param:
Storybook’s addons all use a slash-separated prefix convention, so it uses a prefix match (i.e.
storybook/a11y
would matchstorybook/a11y/panel
.This applies to both tabs in addition to toolbar buttons.
How to test
If your answer is yes to any of these, please make sure to include it in your PR.