-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: introduce vertical scrollbar #536
base: master
Are you sure you want to change the base?
Conversation
a0b5dfa
to
08fed8a
Compare
This is so nice. It may take us a moment to get to this one, but it's on our radar. In the meantime do you mind fixing the lint stuff? |
08fed8a
to
cfd9cb0
Compare
@meowgorithm rebased, and lint fixed 👍 |
|
||
func (m model) View() string { | ||
if m.viewport.TotalLineCount() > m.viewport.VisibleLineCount() { | ||
return lipgloss.JoinHorizontal(lipgloss.Left, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use lipgloss.Top
rather than lipgloss.Left
Hey again, @nervo and thanks (again) for waiting on this. This is SO awesome. We're really grateful for the PR! My first thought was whether this should just be part of Per your questions:
No, you're doing the right thing here. These are really UI fragments and not full models, and these things get fussier to work with when they're true models.
It doesn't matter too much, but it's a nice detail. Up to you.
Yes, totally. The naming here is spot on.
There are scroll wheel events available you can take advantage of if the mouse is enabled.
There are a few internal factors contributing to this, most of which should be solved for soon. But in the meantime, since you included the tape file, we can clean this up for you when this is merged. |
I think it's nice having this separate from viewport in case people want to use this with a table or their own bubbles. |
Well, here is a pull request on a component i really found missing in the bubbletea ecosystem: a scrollbar \o/
Only a vertical one, available as a model, is provided:
It is easily customizable with styles
It can updated by dedicated messages...
...or directly linked to a viewport:
If you're interested, feel free to review, comment, etc... ❤️
That being said, there are several points on which I would like advice:
example.gif
). Is there something i can do ?huh, and I almost forgot the demo :)