lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Add option to disable scrollbars

Open mvllow opened this issue 2 years ago • 2 comments

Describe the solution you'd like

An option to disable the newly added scrollbars from #1878

Describe alternatives you've considered

  • Because the smaller left boxes already have context such as "8 of 8" to indicate where you are in the list, an alternative solution could be to only have scrollbars on the larger, main section.

mvllow avatar May 08 '22 02:05 mvllow

I totally agree, it makes lazygit look chunkier and busier.

I'd like to deactivate the scrollbars aswell / or maybe just make em not so thick.

fschoenfeldt avatar Aug 02 '22 10:08 fschoenfeldt

I support this proposal with both hands, it looks ugly, and too wide

liaohui5 avatar Sep 11 '22 14:09 liaohui5

Is there any solution now?

liaohui5 avatar Dec 02 '23 03:12 liaohui5

I agree, the scrollbars do look pretty chunky. I want to know if it's possible to redesign them to be less chunky such that users don't feel the need to reach for a config option. For example, what do people think of these:

image

image

(compared to current) image

jesseduffield avatar Jan 29 '24 10:01 jesseduffield

It would be great to have a (hacky) patch to try these out, would that be possible easily?

stefanhaller avatar Jan 29 '24 11:01 stefanhaller

Here ya go: https://github.com/jesseduffield/lazygit/commit/7c5ecf8bd55208525f13d945ef4dacb27a21092f

jesseduffield avatar Jan 29 '24 11:01 jesseduffield

Thanks. It's really tricky to find a good balance between it being discernible (at a glance) and still looking elegant. I feel we could do without the and to mark the beginning and end of the scrollbar; it looks more elegant without, and I think it's still clear enough. Drawing a black line seems to result in gray in your color scheme, but in mine I can hardly see the line.

Here's another attempt that's much simpler: 7a190f080625. I'm not saying it's better, just some more input. It's too bad that the thicker line isn't centered, but I couldn't find a glyph that's better. Also, for this the algorithm in calcScrollbar needs to be adapted, it now has a minimum size of 3, but it should be 1. I couldn't concentrate enough on the math needed for that right now.

stefanhaller avatar Jan 29 '24 15:01 stefanhaller

I rather like the first option, from the screenshot. Effective, but less "bold" and therefore visually obtrusive. For the record, I really like the addition of scrollbars. But one view of the history of scrollbars is "a big catfight over how they should look." 😜

I'll grab the branch later and try these options out.

jwhitley avatar Jan 29 '24 16:01 jwhitley

For the sake of comparison here's @stefanhaller's scrollbar:

image

I actually like this quite a bit: I avoided using glyphs that weren't centered, but I actually think this works really well because the scrollbar isn't encroaching on the content inside the view: instead it's taking up the space between the views which is just dead space.

It does feel slightly awkward that the scrollbar's bounds aren't clearly defined, but I can't think of a glyph that we could put on either end that could signify the bounds, e.g. this looks bad: image

So on net I think having a boundless scrollbar is better. All we need to do is change it so that it can be one character long at minimum, and then patent it.

jesseduffield avatar Jan 29 '24 21:01 jesseduffield

I'm gonna add this to the v0.41 milestone because once you really see the existing chunky scrollbars for what they are you cannot unsee

jesseduffield avatar Jan 29 '24 21:01 jesseduffield

All we need to do is change it so that it can be one character long at minimum,

Are you expecting me to do that? I wouldn't be angry if you beat me to it...

and then patent it.

😂

stefanhaller avatar Jan 29 '24 21:01 stefanhaller

Are you expecting me to do that? I wouldn't be angry if you beat me to it...

I've just spent a couple minutes on it myself and I am struggling to actually find the right place to change, so any assistance is appreciated (though I truly made this bed myself and now it's time to sleep in it)

jesseduffield avatar Jan 29 '24 21:01 jesseduffield

I had the feeling that you'll need to adapt all of calcScrollbar, calcScrollbarHeight, and calcRealScrollbarStartEnd somehow. But it's really just a feeling, couldn't really wrap my head around it yet. And now I'm going to bed. Good luck!

stefanhaller avatar Jan 29 '24 21:01 stefanhaller

Yeah, I agree. Good night :)

jesseduffield avatar Jan 29 '24 21:01 jesseduffield

Alright with https://github.com/jesseduffield/lazygit/pull/3283 we now have slim scrollbars.

Before: image

After: image

Now the question is: is this a big enough improvement to remove the need to make scrollbars's visibility configurable? I think at the very least we should see how people react in the next release.

jesseduffield avatar Jan 29 '24 21:01 jesseduffield

Now the question is: is this a big enough improvement to remove the need to make scrollbars's visibility configurable? I think at the very least we should see how people react in the next release.

Thanks for revisiting this issue! FWIW I will personally still use my fork that disables the scrollbars. I don't see any value in their presence given the 123 of 456 footer, it's just unneeded visual noise for me.

apazzolini avatar Jan 31 '24 16:01 apazzolini