vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.39k stars 3.52k forks source link

DAE hate the scrollbar? #42

Open rauchg opened 8 years ago

rauchg commented 8 years ago

Should we hide it by default?

montogeek commented 8 years ago

We should :)

montogeek commented 8 years ago

It does not hide it?

rauchg commented 8 years ago

It seems like the hterm options hides them completely, all the time. I don't like that. Upon the user scrolling, they should be shown. I'll have to think more about how to do that nicely. One idea is listening on scroll events and ignore them whenever we know that the terminal itself is triggering scrolling.

rauchg commented 8 years ago

This actually sounds like a very difficult problem :(. Here's the best solution I can think of:

[1] 50 is arbitrary to encompass linux, windows, mac. Can probably be less on the mac.

montogeek commented 8 years ago

I like the second idea, is how iTerm works by default, it only shows the scrollbar if you scroll using wheel's mouse, when you stop it disappears after ~500 ms

jesseditson commented 8 years ago

I occasionally run into a situation where the scrollback is super long, and I want to scrub it much faster than scrollwheel lets me. I usually start scrolling, then grab the scroll handle and drag it up and down. I noticed that unlike most OSX apps, this behavior is not the same (normally when you hover the scroll handle in an OSX app, it'll slightly expand it's width and become draggable), I'd love to see that act like the rest of the OS!

jesseditson commented 8 years ago

Here's a quick gif of that behavior in chrome:

eliihen commented 8 years ago

@rauchg: Just my five cents, if you don't mind.

I am on Linux and use rxvt-unicode (AKA urxvt), which is a popular terminal emulator. In urxvt it is common practice to hide the scrollbar because it is also very ugly. When hidden, it behaves like the hterm option you disagree with, where the scrollbar is always hidden. I find this to be preferable, as the mouse wheel handles the scrolling, and when I start typing the terminal snaps back to the bottom. No Ugly scrollbar takes up any of my precious ultrabook pixels or obscures my text.

Besides, many people are going to be using Terminal Multiplexers like tmux or screen where the scrollback buffer is completely handled by the multiplexer and mouse scrolling is absolutely void.

In both these cases, there is an argument to be made for hiding the scrollbar completely, which I support. At the very least, please consider making it an option in .hypertext.js, where the option can be either Always show, Hidden when not in use or Always hidden.

assertchris commented 8 years ago

On the other hand, scrolling far back is so difficult using only the scroll wheel. Neither arrow keys nor page up/page down keys control the scroll position...

MartyGentillon commented 7 years ago

related: https://github.com/zeit/hyper/issues/1540 https://github.com/zeit/hyper/issues/1251

chabou commented 7 years ago

other related: #301

chabou commented 6 years ago

I totally agree with @esphen:

the option can be either Always show, Hidden when not in use or Always hidden.