posit-dev / posit-dev/positron
Wrap components that require scrolling in a Scrollable component
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
For Positron in the Web, the wheel event is listened to in order to drop the event. This prevents users from using gestures to navigate to another URL. This causes problems with Positron UI components where scrolling doesn't work.
Wrapping our components in a Scrollable can get around this problem. It uses VS Code's scrollable code, which handles the wheel event and allows scrolling. This does have limitations where the Scrollable does need to know the width & height as well as scroll width & height but will probably be fine.
The Console and interpreter dropdown already have this fixed with a workaround. The Plots view already uses a Scrollable. Anything that uses PositronModalPopup might be fine since it has the workaround but it does not guarantee child components can scroll.
Any of the views likely need a fix if their contents require scrolling. For example, fhe Variables view currently does not scroll in web.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/vs/base/browser/ui/positronComponents/scrollable/Scrollable.tsx and inspect the Variables view for content that should scroll. Compare its behavior with the existing Console, interpreter dropdown, and Plots view workarounds, including PositronModalPopup. Done means views whose contents require scrolling can scroll on the web without breaking URL navigation gestures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100