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 content not scrollable #199

Open
sr258 opened this issue Nov 19, 2023 · 3 comments
Open

panel content not scrollable #199

sr258 opened this issue Nov 19, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sr258
Copy link

sr258 commented Nov 19, 2023

The "Mock Request" panel in Storybook is not scrollable. While there is more content inside, there is no way to scroll vertically. There is a overflow: hidden CSS property on two divs that prevents scrolling.

I use storybook-addon-mock v4.3.0 and Storybook 7.5.3.

@nutboltu nutboltu added the bug Something isn't working label Nov 23, 2023
@pkyeck
Copy link

pkyeck commented May 14, 2024

came here to report the same bug ...

Screenshot 2024-05-14 at 17 42 54

really annoying, if you have a couple of mocks :(

I did take a quick look at the source and found this in Panel.js:

return (
        <AddonPanel {...props}>
            <ScrollArea>
                {mockData.map((item, index) => {
                    // ... snip
                })}
            </ScrollArea>
        </AddonPanel>
    );

ScrollArea sounds correct but it either never worked or is not supposed to work like this!? 🤔

I just removed the two nested <div>s that get added via DevTools and this seems to do the trick... maybe I'll do a PR with this super small change if nobody says that the <ScrollArea> is needed for anything else ...

@pkyeck
Copy link

pkyeck commented May 14, 2024

Ok, made the changes and tested them locally 👍

But because we are also still using the 4.3.0 version, I can't just create a PR to main 😕
Here are the changes, these would need to go into a v4 branch and be published as 4.3.1

https://github.com/linearlabs-workspace/storybook-addon-mock/compare/4.3.0...pkyeck:fix-panel-not-scrollable?expand=1

@pkyeck
Copy link

pkyeck commented May 14, 2024

would be great to also get this PR cherry-picked into the v4 branch: #212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants