Storybook doesn't remember the addon orientation
See original GitHub issueDescribe the bug Storybook doesn’t remember the addon orientation.
To Reproduce
- Open a Storybook URL
- Change the addon orientation (dock to the right)
- Close the browser tab
- Open the same Storybook URL
System
Environment Info:
System:
OS: Windows 10 10.0.19044
CPU: (4) x64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
Binaries:
Node: 16.13.0 - C:\Program Files\Node.js\node.EXE
npm: 8.6.0 - C:\Program Files\Node.js\npm.CMD
Browsers:
Chrome: 100.0.4896.75
Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.36)
npmPackages:
@storybook/addon-actions: 6.4.19 => 6.4.19
@storybook/addon-controls: 6.4.19 => 6.4.19
@storybook/addons: 6.4.19 => 6.4.19
@storybook/api: 6.4.19 => 6.4.19
@storybook/components: 6.4.19 => 6.4.19
@storybook/core: 6.4.19 => 6.4.19
@storybook/core-events: 6.4.19 => 6.4.19
@storybook/react: 6.4.19 => 6.4.19
@storybook/theming: 6.4.19 => 6.4.19
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
react storybook addon knobs not showing - Stack Overflow
I was able to fix this simply by hitting the D key, which changes the addon panel orientation. (You can also do this...
Read more >Features and behavior - Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >React Storybook Tutorial - 11 - Viewport Addon - YouTube
Courses - https://learn.codevolution.dev/ Support UPI - https://support.codevolution.dev/ Support PayPal ...
Read more >Addon Gallery - Storybook
Similar to knobs this doesn't add any additional React wrappers to the story, so any other addons used (prop-types, jsx) aren't effected. Has...
Read more >SOLID: The First 5 Principles of Object Oriented Design
Open-closed Principle (OCP) states: Objects or entities should be open for extension but closed for modification. This means that a class should ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I created a PR for the above change. We might also want to take a look at the other ui preferences and see if we want to make them persistent
I don’t quite understand the reasoning here, since other layout changes are preserved. For instance, if you resize the sidebar, close the tab, and reopen Storybook, that setting is preserved. If you’re going to preserve that, why not preserve the addon orientation too? Seems very equivalent to me.
Edit: I’ll also add that I always switch to the right-side addon orientation, because I feel it’s a nicer layout and a better use of space (no scrolling for my table of controls), so I’d prefer some way of Storybook remembering that, whether its in local storage or via an explicit setting.