microsoft / vscode-webview-ui-toolkit

A component library for building webview-based extensions in Visual Studio Code.
MIT License
1.95k stars 130 forks source link

Scroll area of `vscode-panels` does not correctly overflow #464

Open totemtec opened 1 year ago

totemtec commented 1 year ago

When the content height is bigger than the panal size, the scroll area is error

To reproduce

https://codesandbox.io/s/naughty-dirac-j06l9r

Expected behavior

The area with green background can scroll.

Current behavior

The area in red border can scoll.

Screenshots

image

Desktop:

hawkticehurst commented 1 year ago

Hey @totemtec!

Could you perhaps explain the error you're seeing a bit more?

Based on the description and small reproduction (thank you for providing that by the way!!), I'm wondering if this might just be a case of mismatched expectations for what the panel component is supposed to do instead of being an actual bug.

The PanelView component of panels doesn't have any kind of overflow scroll behavior/styling. Under the hood, it's just a simple div container that accepts any child content someone puts inside of it. So in your case, by placing child content that is very long, the PanelView will just adopt the same height as the child content if that makes sense?

If overflow scroll styling/behavior is something that you are looking for, I'm happy to consider this as a feature request. But again let me know if I'm misunderstanding anything 😊

hawkticehurst commented 9 months ago

Hey @totemtec! After having a discussion in another issue (#502) that was running into the same overscroll issue I realized that I was wrong in labeling this is an enhancement back in March –– I realized that native VS Code panels have overscroll behavior built-in and as a result so should the toolkit. Apologies for mislabeling this.

I've gone ahead and relabeled this issue as a bug and will try to tackle it sometime in the next few weeks.

madushajg commented 5 months ago

Hi @hawkticehurst Just wanted to check in on the status of this issue, any updates or insights you could share would be greatly appreciated. Thanks!