I noticed a property in Storybooks Options Docs called selectedPanel which I assume will allow me to pre-select an addon panel.
I'm unclear on how to use it. The example is:
options: { selectedPanel: 'storybook/a11y/panel' }
What I don't understand is where the 'storybook/a11y/panel' string comes from. What if I want to preselect the 'Source' panel?
I've encountered the same issue and managed to find out that the
panelIdcan at least be found in the addon'sregistersource code step. For example, I wanted to openReadmetab for certain stories.I ended up finding the id of the panel in
registerWithPanelTitle.js, and then using it with thestoriesOfAPI like this:For a11y, it can be found in
constants.ts.Although, I've searched for those in the distributed
node_modulesversions in my case.P.S. If you want to reorder the panels for all of the stories globally, the list that the addons are imported in handles it.