prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Wishlist: ScrollBarMargin control reacting to mouse-clicks
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
hi @jonathanslenders
would be nice if one could click on the arrows of the ScrollBarMargin control as used in TextArea to scroll, and even better if one could drag the handle around to scroll.
my naive guess is that it could be sufficient to just add a handler argument to the spots that emit the text fragments like here:
('class:scrollbar.arrow', self.up_arrow_symbol, scroll_up_handler),
Contributor guide
No contributing guide indexed for this repository
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 by tracing the ScrollBarMargin control as used by TextArea, especially the code that emits text fragments such as the scrollbar arrow tuple shown in the issue. Determine how mouse events are handled there; the work is done when arrow clicks scroll and the scrollbar handle can be dragged to scroll.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100