adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

Option to turn smooth scrolling on/off #12520

Open markhillard opened 8 years ago

markhillard commented 8 years ago

Just downloaded and installed Brackets 1.7 for Windows. Is there an option to turn smooth scrolling off? I looked through the Wiki and searched online so I figured I'd ask here. Personally, I don't like smooth scrolling in text editors, but I guess that's what I'm used to.

thany commented 8 years ago

+1 Agreed

Not only do I not like it, I didn't have smooth scrolling in 1.6, so why is it suddenly enabled in 1.7? We all know Brackets is built on top of webkit, and in webkit, it's an option that has to be turned on or off. Why the change?

thany commented 8 years ago

Workaround:

Start brackets with a commandline switch:

Brackets.exe --disable-smooth-scrolling

Who knew, right? Certainly the Brackets team didn't, since it's nowhere to be found in their documentation... It wasn't a total guess though. This is a CLI option for Chrome/Chromium. So I thought "what the heck, let's try that, just for kicks".

You can also modify your start menu/desktop/whatever shortcuts, of course. Should work fine. Disclaimer: I tested this briefly. I'm not sure if this will keep working, but hey, it's a workaround. Should be an option, as we already agreed :)

markhillard commented 8 years ago

@thany, nice find! I added that parameter to my desktop shortcut and it works. Hopefully this will be an option in the next release, but I don't think it's too high on Brackts' priority list.

thany commented 8 years ago

Adding it was high enough on their list to make it into 1.7 ;)

ficristo commented 8 years ago

Related: https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/UhE1rxzhkkk/fxUQqTWRDQAJ Chomium changed the default value for this option and it is possible that future versions will remove that option entirely. I think we inherited the new default when we updated to a new version of CEF.

thany commented 8 years ago

So can we then have a switch for this in 1.8? Or at least bring back the same behaviour as we came to expect up until 1.6 (nonsmooth scrolling)?

It's just that, at least in my book, smooth scrolling for a text editor is just... not very sensible, to say the least. Plus, smooth scroll makes me dizzy, which is why I turn it off for everything that has the option. (for the same reason, I'm also happy the hype about parallax scrolls is over :))

zaggino commented 8 years ago

@MarcelGerber @ficristo can this be easily made a preference?

Denisov21 commented 8 years ago

+1 Agree

nethip commented 8 years ago

I think it is a bit tricky to implement this as an option, if it can be done only via command line, as we don't have any preferences management on the shell side (brackets.json and state.json load after CEF initialization followed by Brackets load).

@ficristo Do we know if we can enable/disable this setting at runtime(once Brackets is loaded)? or does it have to be via command line only?

zaggino commented 8 years ago

Isn't this related? https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior

marcelgerber commented 8 years ago

@zaggino I looked into that yesterday, but no, Chrome doesn't respect that option (even with --enable-experimental-web-platform-features).

thany commented 8 years ago

I haven't tested, but the two options would most likely mean: auto: whatever the browser would do standardly smooth: override browser default with smooth scrolling

Sadly scroll-behavior doesn't come with a nonsmooth option or similar 😕 So probably no way to turn the default smooth into nonsmooth - only the other way around.

ficristo commented 8 years ago

@nethip has already confirmed my understanding that is hard in brackets-shell, maybe easier with electron, to read a preferences file since we have to implement the feature. According to MDN the auto value for scroll-behavior is The scrolling box is scrolled in an instant fashion. I don't know if it is what we want. The last alternative is to disable it in the shell, checking if the the flag is not already passed by the user.

zaggino commented 8 years ago

Available in brackets-electron@1.8.3 https://github.com/zaggino/brackets-electron/issues/74

thany commented 8 years ago

Should be a more easily settable option. I understand Brackets is meant for developers, but a dialog with options, including that one, is essential for people to find them.

On top of that, disabling smooth scrolling is an accessibility option, making it more important for people that need it (like myself) to assert the validity of working with Brackets in the first place.

Why is it an accessibility option you ask? Smooth scrolling makes me dizzy. I have to be able to turn it off, or I won't be able to use a program for more than a few minutes. So please put it in an easier to find place than some config file.

markhillard commented 8 years ago

@zaggino, nice work! I think making the shell option available in brackets.json is just fine, since that's where all the other general settings are located.

I'm running the latest version of Brackets: Release 1.7 build 1.7.0-16898 (release b0a363b71). I also noticed that your brackets-electron fork is now at version 1.8.3. Will this be rolled into a future release? Just curious and thanks for taking care of this.

zaggino commented 8 years ago

@markhillard this option is electron specific for now, brackets-shell based on CEF doesn't support it

markhillard commented 8 years ago

Thanks for the clarification @zaggino.

thany commented 7 years ago

One year later, can we still have a preference to disable smooth scrolling?

sergeevabc commented 6 years ago

It blows my mind there is no option to disable smooth scrolling. It would make editor less sluggish for sure.

thany commented 6 years ago

Not just less sluggish, but usable for some people (like myself) who cannot stand smooth scrolling. I genuinely get dizzy from it. Possibly because the "ticks" from the scrollwheel do not match the smooth animation that happens on screen. Possibly because too large an area of the screen animates. Possibly because it's just not natural - smooth scrolling is not how we "scroll" along real paper.

At any rate, for a given application, smooth scrolling MUST be disabled for me, otherwise I CANNOT use it without having to call in sick after a day of use.

markhillard commented 6 years ago

Just checked the 1.10 release at https://github.com/adobe/brackets/milestone/42 and this issue is on the list.

thany commented 6 years ago

Except we're on 1.11 already, so we won't see it coming in 1.10, safe to say ;)

markhillard commented 6 years ago

Oh right, duh. Well I guess I'll still be using the command line switch then.