storybook-addon-mock
storybook-addon-mock copied to clipboard
panel content not scrollable
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.
came here to report the same bug ...
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 ...
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
would be great to also get this PR cherry-picked into the v4 branch: https://github.com/linearlabs-workspace/storybook-addon-mock/pull/212