Smooth scrolling toggle
Is your feature request related to a problem? Please describe. Some people don't like smooth scrolling, or it may be janky on their setup.
Describe the solution you'd like A checkbox in WebCord's settings to enable/disable smooth scrolling.
Describe alternatives you've considered Maybe a keybind. or just dealing with it
Additional context I hate smooth scrolling!!!!
It is there implemented for macOS/Linux?
For Windows, it is internally enabled in Chromium (and by that means, it is likely to be in every Electron app, including official Discord). I believe there's a way to actually disable it, but that would require a separate logic for Windows.
It is there implemented for macOS/Linux?
For Windows, it is internally enabled in Chromium (and by that means, it is likely to be in every Electron app, including official Discord). I believe there's a way to actually disable it, but that would require a separate logic for Windows.
I think you may be thinking about this option? Correct me if I'm wrong. I don't see an option for smooth scrolling in WebCord's options on the latest AppImage release for Linux x64.
I meant, when you scroll with the scroll wheel, the view moves gradually and not instantly. On some of my weaker computers smooth scrolling is laggy on Chromium and Electron apps. Chromium has a #smooth-scrolling flag to toggle this behavior, I'm unfamiliar with Electron but I think it would use the same flags.
It seems some people get motion sickness from smooth scrolling. A toggle for it would be helpful for them and low-end PCs that would struggle with it. I don't see this option in the official client either, so maybe there is something preventing it.
 I think you may be thinking about this option? Correct me if I'm wrong. I don't see an option for smooth scrolling in WebCord's options on the latest AppImage release for Linux x64.
Oh, you're right! For whatever reason I thought this issue might be about middle-click scrooling.
It seems some people get motion sickness from smooth scrolling.
For this case, WebCord as well as other Electron apps utilizes the accesibility settings of the OS as od the animations and I think this is the case for the scrolling as well. So, if you disable animations within the OS, there should be no smooth scrooling at all. The problem is it would also disable other animations and I'm not sure if this is the case for Linux (but definitely is for Windows) as Linux is one of the least standarized OS and if something like this works, I doubt all distributions will support it.
I don't see this option in the official client either, so maybe there is something preventing it.
I think Discord might utilize this on disable animations setting? Since WebCord could also access the state of the setting, I could make WebCord utilize this as well.
~~Electron has a large set of APIs for the accessibility, most of which is either utilized mostly on Windows/macOS or not utilized by the default. I did not mess up with it yet and I might not really need to do so on most cases – Discord already had implemented much of the settings focused on the accessibility.~~ EDIT: Not really that big as I originally thought before looking at docs.
I think Discord might utilize this on disable animations setting? Since WebCord could also access the state of the setting, I could make WebCord utilize this as well.
On my system, smooth scrolling remains on with this setting enabled on WebCord and also the official client.
For this case, WebCord as well as other Electron apps utilizes the accesibility settings of the OS as od the animations and I think this is the case for the scrolling as well. So, if you disable animations within the OS, there should be no smooth scrooling at all.
I tested on a couple of desktop environments on Fedora: GNOME, KDE, and XFCE. GNOME has a toggle for animations which includes smooth scrolling. For KDE and XFCE, I couldn't find a way to disable smooth scrolling and a quick search suggests there currently isn't a way to. GNOME is probably the only desktop that has this system toggle as of now, so I think there is some merit in adding a smooth scrolling option for other environments.
Unfortunately, I couldn't find any API for exactly that task, at least on Linux. I guess the one should take a look for either a Blink features or flags to disable it. If it can't be done via flags, I doubt I can do anything about it...
@ggttttggggtt There's a flag --disable-smooth-scrolling to actually achieve this. As simple as that.
UPDATE: I doesn't disable smooth scrolling in all places, just on scrolling with the scroll wheel or JavaScript (Page Up and Page Down scrolling is still smooth). But it seems this can also be disabled in Discord settings.
@ggttttggggtt I may work on this, yet I need to think if I should sync this setting with the Discord accessibility configuration and how to actually achieve this, since flags can't be injected after Electron initializes itself (and so does Chromium) – and I can't get Discord configuration before Electron initialization. I may also think if I should hide this setting under certain circumstances, e.g. if accessibility settings does already control this, so it might be useless to set it in app (i.e. if you disable animations in OS, you don't have to disable smooth scrolling in WebCord and showing an option to do so would be meaningless).