Skip to content

Add the ability to scroll on the workspace indicator and icons container. #8917

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

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

CosmoCreeper
Copy link
Contributor

In this pull request, I have consolidated the scrolling ability in _setupSidebarHandlers into a new function labeled scrollInDirection and have utilized that in another function labeled initScrollEvent (which may be unnecessary.) I have then utilized the scroll event function to add the ability to scroll on the workspace indicator and icons container for a much easier way for users to switch workspaces without clicking or using the Ctrl key.

Possible wanted changes: You may want to change the names of the new functions and/or remove the initScrollEvent function (and replace by directly adding the listeners to each case where it is used).

…stener to workspace indicator and icons container.

Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
@CosmoCreeper CosmoCreeper requested a review from mr-cheffy June 7, 2025 14:18
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Feature labels Jun 7, 2025
@mr-cheffy
Copy link
Contributor

Please handle this on the Zen workspace icons and make sure to only change if ctrl is pressed

@CosmoCreeper
Copy link
Contributor Author

@mauro-balades What do you mean? The purpose of this is that you can scroll on the workspace indicator without pressing Ctrl and on the icons container at the bottom of the screen. (#8917)

@mr-cheffy
Copy link
Contributor

This is not a good idea as the icons can actually be overflowable and therefore having a chance of the user not being able to locate it's desired icon

@CosmoCreeper
Copy link
Contributor Author

CosmoCreeper commented Jun 7, 2025

@mauro-balades Oh wait, I see. Okay, I'll update it.

Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
@CosmoCreeper
Copy link
Contributor Author

CosmoCreeper commented Jun 7, 2025

@mauro-balades I have updated this pr by adding the event to the individual icons rather than the container itself. Do you want me to only trigger this event if the icon hovered is active or is what is here fine?

Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
@CosmoCreeper
Copy link
Contributor Author

CosmoCreeper commented Jun 9, 2025

@mauro-balades Just in case you're wondering what I've changed, I have prevented an edge case in which the user is scrolling horizontally on touchpad and the workspace indicator scrolling event would interfere. This new version will ensure that the scrolling method is not a touchpad and that the user is not scrolling horizontally, otherwise, it will scroll just like before.

Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Co-authored-by: Burhanuddin Salim <burhan.salman@gmail.com>
Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Co-authored-by: Burhanuddin Salim <burhan.salman@gmail.com>
Signed-off-by: CosmoCreeper <179134799+CosmoCreeper@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants