storybook-addon-iframe doesn't adhere to viewMode param.
bring2dip opened this issue Β· comments
π bug report
Affected Package
@geometricpanda/storybook-addon-iframe
doesn't seem to adhere to viewMode
options parameter. I want to open the page in Docs
tab by default.
Note:
[ADDON_IFRAME]: {
title: 'Docs',
},
Description
@geometricpanda/storybook-addon-iframe
doesn't seem to adhere to viewMode
options parameter. I want to open the in Docs tab by default.
π¬ Minimal Reproduction
By default the following path query param is set even though I set the viewMode
in parameters.
http://localhost:6006/?path=/story/about--page
Expected:
http://localhost:6006/?path=/iframe/about--page
π Your Environment
Storybook Version:
"@storybook/react": "6.5.0-alpha.5",
@geometricpanda Version:
"@geometricpanda/storybook-addon-iframe": "0.2.1",
yeah unfortunately this is a limitation within storybook - without getting into too much detail, it would require fairly intrusive customisation of the Storybook routing (similar to how docs works) and become fragile should there ever be future changes (which with V7 there will likely be).
I could look at exposing the inner iframe and loading mechanism so that it's consumable in a Docs Block, that way you could embed it within an MDX file - which would in turn allow you to use the in-build storybook docs routing
That would be great :) . It's a nice to have feature.