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

Panel isn't visible when its size is exceeding the viewport height #14632

Open
weaintplastic opened this issue Apr 16, 2021 · 1 comment
Open

Comments

@weaintplastic
Copy link

weaintplastic commented Apr 16, 2021

Describe the bug
We are using the controls add-on. When we have a large number of controls rendered, the panel isn't shown anymore as soon as it runs out of vertical space. We only see the preview and the panel is hidden behind it but not visible due to a low (non-existing) z-index.

export const Panel: FunctionComponent<{

To Reproduce
I found only one consistent way to reproduce the bug.

  1. Increase the Panels height by dragging it to the top
  2. Reduce the browsers window and make the Panel "overflow" the Preview
  3. Reload the browser
  4. Wonder where the Panel is gone
  5. Increase the height of the browser window
  6. See your panel again

Kapture 2021-04-16 at 15 45 15

Expected behavior
Have the panel always visible.

Screenshots
If applicable, add screenshots to help explain your problem.

Code snippets
If applicable, add code samples to help explain your problem.

Additional Information

Why is this a problem? I guess the height of the panel is stored somewhere in local storage. Since we are embedding storybook into a styleguide, the available viewport there is much smaller than the browsers window. If someone is visiting our storybook application and dragging the panel (height stored in local storage) and is then visiting the styleguide where the same story is loading in an iframe, the panel's height is too big and therefore not rendered in the styleguide.

At least that's what I imagine what's happening.

@weaintplastic weaintplastic changed the title Panel isn't visble when it's content is too large Panel isn't visible when its content is too large Apr 16, 2021
@weaintplastic weaintplastic changed the title Panel isn't visible when its content is too large Panel isn't visible when its size is exceeding the viewport height Apr 19, 2021
@weaintplastic
Copy link
Author

weaintplastic commented Apr 19, 2021

As a hotfix I'm deleting the local storage entry in .storybook/preview.js

localStorage.removeItem('storybook-layout');

@shilman shilman removed the PN label Apr 24, 2023
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

2 participants