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

Preview component hidden content obscured (Firefox) #16714

Closed
m7kvqbe1 opened this issue Nov 17, 2021 · 4 comments
Closed

Preview component hidden content obscured (Firefox) #16714

m7kvqbe1 opened this issue Nov 17, 2021 · 4 comments

Comments

@m7kvqbe1
Copy link

Describe the bug

Storybook Docs Stories in Firefox obscures hidden content (such as a Context Menu or Date Picker component sheet).

Appears to be working as expected in Chrome.

To Reproduce

Check any component story that has a floating sheet:

Screenshot 2021-11-17 at 11 05 19

System

Environment Info:

  System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 95.0.4638.69
    Firefox: 94.0.1
    Safari: 15.1

Additional context

#8928

We are currently hacking around this with style overides within preview-head.html:

#docs-root .docs-story {
  overflow: visible;
}

#docs-root .docs-story > div:last-child {
  bottom: 10px;
}

#docs-root .docs-story > div:first-child > div:first-child {
  transform: none;
  height: auto;
}
m7kvqbe1 added a commit to Royal-Navy/design-system that referenced this issue Nov 17, 2021
Storybook obscures components that have hidden elements (think ContextMenu or DatePicker) when viewed with the Firefox browser.

This made the docs section almost unusable in Firefox. The only solution at this time appears to be overiding some Storybook styles.

storybookjs/storybook#16714
storybookjs/storybook#8928

Included a `ContextMenu` cypress test to help catch the issue with Storybook version bumps.
m7kvqbe1 added a commit to Royal-Navy/design-system that referenced this issue Nov 17, 2021
Storybook obscures components that have hidden elements (think ContextMenu or DatePicker) when viewed with the Firefox browser.

This made the docs section almost unusable in Firefox. The only solution at this time appears to be overiding some Storybook styles.

storybookjs/storybook#16714
storybookjs/storybook#8928

Included a `ContextMenu` cypress test to help catch the issue with Storybook version bumps.
@shilman
Copy link
Member

shilman commented Nov 19, 2021

@yannbf didn't you mention a workaround for this that's only a configuration change?

@yannbf
Copy link
Member

yannbf commented Dec 3, 2021

@yannbf didn't you mention a workaround for this that's only a configuration change?

If the user wants to force any height of the container, they could do so by opting out of inline rendering with:

parameters: {
  docs: { iframeHeight: 500 } // or any amount
}

I think this is a tricky situation, because.. in this scenario, what would be the ideal solution?

1 - The story container changes in height once hidden component is shown
2 - The story container has to have previously defined height and load in an iframe so everything is contained
3 - The story container allows elements to pop out of it (like date pickers), so that they float outside of the container
4 - Something else

@stale
Copy link

stale bot commented Jan 9, 2022

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jan 9, 2022
@shilman
Copy link
Member

shilman commented Jun 8, 2023

We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:

@shilman shilman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 8, 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

3 participants