feat(workspaces): support smooth horizontal wheel switching in sidebar#12448
feat(workspaces): support smooth horizontal wheel switching in sidebar#12448Andresshamis wants to merge 22 commits intozen-browser:devfrom
Conversation
cf4a940 to
a36c1f8
Compare
mr-cheffy
left a comment
There was a problem hiding this comment.
Could you please run npm run lint:fix?
|
Dear Mr Cheffy, anything you would like to improve or adjust? I believe this is finished but Id be happy to work on it if you have anything in mind, let me know! |
|
as an MX Master haver, this would be very nice :D |
|
Added targeted inline comments in /src/zen/workspaces/ZenWorkspaces.mjs explaining the non-obvious wheel behavior decisions: direction-flip accumulator reset, explicit wheel accumulator for smoother low-amplitude input, and why forceSwitch commits immediately once visual snap threshold is crossed. This keeps the wheel-only architecture while documenting why these choices are intentional for UX consistency. |
|
It's acting a bit weird. Trackpad move is inverted, swiping fast overshoots, swiping slow makes a sudden space change, etc: CleanShot.2026-02-25.at.00.44.58.mp4 |
ff341e2 to
5b31d0b
Compare
|
Why are you force pushing? Its making it really difficult to keep cloning the PR 😅 |
|
Thanks for the detailed feedback. I tested a full migration from I’ve now restored native trackpad gesture handling to match pre-PR behavior, and scoped the new behavior to horizontal mouse-wheel input. Concretely, I added a short post-trackpad suppression window so trackpad tail events don’t enter the wheel/AppCommand path ( I also ran Latest adjustment in this push: mouse horizontal direction now matches macOS natural scroll expectation. |
|
@mr-cheffy pushed a final refinement pass focused on swipe consistency and maintainability notes. What changed in this pass:
Validation:
If there’s any remaining behavior you want adjusted before merge, I can iterate immediately. |
|
@mr-cheffy final refinement pushed in
Code comments were updated inline in Validation run on this branch:
If you want, I can split these into separate follow-up commits for easier review granularity. |
|
I am sorry for force pushing @mr-cheffy , Wont happen again, I am now aware this makes it more work on your end. If you'd need me to do anything to fix my mistake of the force push Ill do it straight away. I'm always learning, so wont do it again. |
CleanShot.2026-02-25.at.21.03.38.mp4Looks good, but when swiping and suddenly changing direction, it kind of goes back half the sidebar's width? Also, there should be some sort of "force" when reaching to the end of the space, instead of just stopping instantly, it should start to get more "difficult" to reach the end. Not sure if im explaining correctly CleanShot.2026-02-25.at.21.05.01.mp4 |
…-workspace-switch
…kspace-switch' into codex/horizontal-wheel-workspace-switch
|
In both of your latest videos, I also used to have these bugs, however I fixed and no longer happening on my device Macbook Pro 14 M4, I think you might have been looking at an earlier commit since I also remember these bugs but no longer happen on my device, might have been a partial commit. can you verify? Cant seem to be able to replicate this again, I am pretty sure its fixed in latest version. |
|
I wonder if moving this into its own ZenSpaceScrollManager (and file) would be worth it as this implementation starts to grow bigger and bigger.
Yes, but im using a trackpad, so that might be it |
|
@mr-cheffy @Andresshamis Requesting you to please help in shipping this change, tired of clicking on the icons to navigate to workspaces 😭 |
Summary
AppCommandshortly after horizontal wheel eventsRelated
Testing
npx eslint src/zen/workspaces/ZenWorkspaces.mjsnpx prettier --check src/zen/workspaces/ZenWorkspaces.mjsIMG_6964.compressed.mp4