-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: Improve empty state of addon panel #26481
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 5152b7c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Hi @yannbf, having a quick look into the PR, just wondering will it be possible to not show/hide add on panel completely (as it is in v7)? |
a3d75bb
to
d657363
Compare
@mkosir The addon panel is part of the manager UI. After a couple of discussion we think it is best to make sure we always show the addon panel with options to hide it if you want as expected. If you have no addon, we will show a message that redirect you to the addons catalog. The idea to remove the addon panel if you have no addon didn't felt right to us. Addons are a big part of what makes Storybook great. |
@cdedreuille thanks, if I understand correctly it will be possible to hide it, with some config option e.g. |
@mkosir I was referring to the option to hide or show the panel but not removing it completely. I'm not sure I see the value to have an option to remove it completely. What is your use case? Is it to present your design system to your team? Can docs be a good alternative to what you are trying to achieve? |
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.
@yannbf If you could just change the life boat ring icon to the docs one that would be great. Other than that, the code looks great. Thank you 🙏
@cdedreuille I see, I have some use cases, mostly libraries, that just want to quickly visualize different capabilities without adjusting addons params (for example).
Yes I think for some of the projects I will just navigate away from Storybook since it's not the right fit and go with something simpler 👍 |
@mkosir Thanks a lot for sharing your use case. That's really interesting. Have your tried using Storybook Docs? It seems that this could be the right fit for you since this was built for this use case, to actually present your component + code without tooling. If this doesn't work, we are working on a new concept called Portable Stories that will allow you to embed your stories in your own website so you can have full control over the presentation. |
Thanks will try it out, can't wait what you guys will come up with! 🚀 |
@mkosir Also, looking at your Storybook, I think your components could benefit from the controls addon to show what props are available and play with them with easy to use controls. |
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.
A few minor nits, but other than that it looks good!
code/ui/components/src/components/tabs/EmptyTabContent.stories.tsx
Outdated
Show resolved
Hide resolved
857be39
to
5152b7c
Compare
UI: Improve empty state of addon panel (cherry picked from commit ccc04e5)
Closes #26445
What I did
This PR revamps the empty state of the addon panel (when users have zero addons) by doing a couple of things:
1 - Adds the toolbar items so that users can toggle position and close the panel
2 - Adds some copy with a link to the integrations catalog, so that users can explore Storybook addons
3 - Creates a new EmptyTabContent component and reuses that across different addon panels
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
yarn task --task sandbox --start-from auto --template react-vite/default-ts
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/core
team here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>