fix(editor): make canvas mouse scroll use shift-wheel sideways#127
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Shift+wheelscrolls sideways, andCtrl/Cmd+wheelstill zooms.Why
The canvas still treated middle-button dragging as a first-class mouse pan shortcut, which is not the expected desktop mouse scrolling model. Sideways mouse scrolling should be keyboard-modified wheel input instead.
Impact
Desktop mouse users can pan sideways with
Shift+wheelacross the site canvas. Space-left-drag remains available as the intentional keyboard-modified drag pan gesture; middle-button dragging no longer pans the canvas.Verification
bun test src/__tests__/canvas/useCanvasWheelSync.test.tsxpassed: 5 tests, 0 failures.bun run buildpassed.bun run lintpassed.bunx react-doctor@latest --verbose --diffpassed with no changed-file issues.bunx react-doctor@latest --verbose --scope changed --base mainpassed with no changed-file issues.bun testwas run and still has the pre-existing unrelated failure also present on the fresh baseline:OnboardingPanel framework import > dispatches a CMS site reload after a successful import so the editor refetches(expects a button named/import framework/i, rendered button isImport).