prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Scroll a ScrollablePane to show the bottom element.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
While trying to make a simple chat app (just a passion project, no high stakes), I ran into a problem when displaying messages:
Since the amount of messages can increase above what can be displayed on the screen (the server side max is 50 messages at 2 lines each or 100 lines total), we want to use the ScrollablePane element. However when new elements are added at the bottom, they are not visible when the number of messages reaches a certain point.
I have tried implementing the desired behavior, but was unable, as the only way I thought of required query a components size and I was unsuccessful at finding any method do such.
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 reading the ScrollablePane implementation and its existing scrolling behavior. Determine how newly appended elements can keep the bottom element visible without relying on unavailable component-size queries; done means a growing message list automatically shows its newest bottom element.
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
- 45/100