Skip to content
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

viewMode won't work in storyStoreV7 properly #17717

Open
Davo911 opened this issue Mar 15, 2022 · 7 comments
Open

viewMode won't work in storyStoreV7 properly #17717

Davo911 opened this issue Mar 15, 2022 · 7 comments

Comments

@Davo911
Copy link

Davo911 commented Mar 15, 2022

Following snippet is in the preview.js to display the 'docs' tab as default.

export const parameters = {
  viewMode: "docs",
};

This works like a charm as it should, but as soon as the storyStoreV7 feature flag is set in the main.js, the viewMode setting seems to be ignored.

Reproduction Code

Environment Info:
System:
OS: Windows 10 10.0.19044
CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
Binaries:
Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
Yarn: 3.2.0 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.36)

@orta-sanz
Copy link

Facing same issue, with storyStoreV7: false the viewMode parameter works again

@Agontuk
Copy link

Agontuk commented May 30, 2022

I can confirm the same issue, using storybook v6.4.8

@Daniel-Knights
Copy link

viewMode isn't working for me even if I set storyStoreV7: false. Tried clearing localStorage, but no luck

@ccsenter
Copy link

Confirming that in the latest build (v6.5.13), setting globally viewMode: 'docs' in preview.js parameters, is being disregarded when the story is rendered the first time. If I select the story again in nav, then everything works as expected.

@nagisaando
Copy link

v6.5.14 as well. Still, the issue is present. Also I'm using '@storybook/builder-vite', which requires storyStoreV7 otherwise it fails when I build a static files.

@sharvilak11
Copy link

Same for 6.5.15 with webpack too.

@shilman
Copy link
Member

shilman commented Jan 23, 2023

Sorry for the radio silence on this. We're getting rid of viewMode in 7.0, so I don't think this will get fixed unless somebody wants to open a PR against the main-prerelease branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants