When I set parameter options on a Component level basis, the following occurs:
parameters.options.showPanel set to false.So what I want to happen is for the panel to hide for one component and then show again on the others. This surely is possible? Am I doing something wrong?
Here is the Component with the options:
export default {
title: 'Color',
parameters: {
options: {
showPanel: false,
},
},
}
Any help would be hugely appreciated!
I think this might have more to do with how Storybook UI handles state and less to do with component parameters. What happens when you set showPanel: true globally and false for one component?
Thanks @shilman. Annoyingly this doesn't work.
If it helps, I've also tried by explicitly setting showPanel: true on another component. The panel shows back up when clicking into that component. But then the same happens when returning to the original, no-panel component.
Clearly setting showPanel: true on every other component will fix it, but this isn't ideal nor future-proof.
You can set parameters globally, per component, and per story. These are all workarounds. I believe @tmeasday started on a proper solution once upon a time but it鈥檚 buried in an issue somewhere
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Yeah, TBH although I realise there are legitimate use cases where this is nice my current feeling is that setting options per-story (or component) is too messy and complicated to really be worth it. I reckon we should drop this as a "feature".
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Can somebody stop stalebot flagging this as staled? It is not. It is a real problem that I'm also facing because I am following the official docs.
Chipping in here setting it to true on a global level makes it work to disable it on a story level.
Just verified with
showPanel: false,
isToolshown: false,
So in my case it seems it's an issue with nothing being set before i set it to false in my component?
Perhaps defaulting to true on all options if nothing is being set by the user in preview.ts might resolve my use-case?
Edit:
It appears that disabling the panel and tools in one story impacts the other stories in the group as well which is perfect for me as they belong to a getting started group of documentation stories
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
this "issue" is still existing. If the intention is to "not fix it" then I will not close it without stating that.
Which version of Storybook?
@shilman same issue with 5.3.19 storybook
@danielo515 do you want to fix it? if you want to contribute you are very welcome to. just because i don't have time to look into it doesn't mean that we should close the issue. Storybook is a community-driven project with almost 1000 contributors. If I close the issue then there is almost no chance that somebody will fix it. Stale bot and issue upvotes (this issue currently has only 2 upvotes for a project used by tens of thousands of teams!) are the mechanism we use to triage.
Yeah, I completely understand that @shilman
It is just that the bot usually closes issues that are not fixed, and at the end it is not clear if the intention was to not fix it or if the bot just closed them. That's why I was suggesting to add a won't fix label if that was the case
whose call is that? i'd say there are very few issues that we "won't fix" but a lot of issues that we "can't fix" due to time constraints. which ones are those? the ones that stale out. how long does it take to determine the issues that stale out? a month or two. during that time, i can see the upvote/comment activity and whether people have signed up to fix them ("in progress"). if a bug/feature looks like a dealbreaker to me, or somebody is signed up to do it i'll mark it as "todo", which also tells the stale bot to go away. after 6.0 ships, i hope to have more hands on deck and will spend more time on product management and community organization, at which point i'd consider revising this strategy. in the meantime, leaning on stale bot has been the only way to manage a large, complex project like this while chipping away at key platform features to make storybook more useful.
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!