question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storybook doesn't remember the addon orientation

See original GitHub issue

Describe the bug Storybook doesn’t remember the addon orientation.

To Reproduce

  1. Open a Storybook URL
  2. Change the addon orientation (dock to the right)
  3. Close the browser tab
  4. 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:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
burhanudaycommented, Apr 23, 2022

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

  1. fullscreen: session
  2. panel: session
  3. nav: session
  4. toolbar: session
1reaction
kaiyomacommented, Apr 12, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found