-
Notifications
You must be signed in to change notification settings - Fork 119
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
Scroll patch with mouse wheel or trackpad #1412
Conversation
159d306
to
6ee7419
Compare
4234fda
to
fc6367b
Compare
@nkrkv fixed these issues:
I did all these things in separate commits, you can check it out separately. Then I'll squash it all in the one commit. |
// Only MacOS works fine. So we have to do a hack for proper horizontal | ||
// scrolling with pressed Shift key on all other OS: just switch X and Y. | ||
const wheel = | ||
detector.os.name !== 'macosx' && event.shiftKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one feels fragile nevertheless. Can we go on without relying on OS name? For example, the following predicate looks pretty equivalent to me:
event.shiftKey && normalizedWheel.pixelX === 0
In contrast to the current conditional, this will trigger a swap on macOS when a user hold down the Shift key and somehow scrolled strictly horizontally?! Is it ever possible? If so, what’s in the head of this xoder who holds the Shift key while scrolling with a gesture?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙄 now it’s totally broken
My desktop version no longer scrolls at all. The welcoming comment is not centered on startup.
Scrolling in Firefox browser is several times faster than native. Feels very counter-intuitive.
fc6367b
to
aca8caf
Compare
@nkrkv check it out, please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it’s pretty usable 👍
However, on Firefox I get more coarse scrolling than on Desktop and Chrome (~1.9x faster). Not a big deal and we can leave it as is I think.
The feature should be confirmed to work fine on Windows and ThinkPad. Would you check Windows? And I forgot my ThinkPad, again, today 🙈
Tested it on ThinkPad with a touchpad and trackpoint. Both work fine 👍 Let’s wait for feedback from @joepie91 if he has time for testing until the end of this week. If not, let’s merge and open a new issue if something is wrong. |
I've been working with it a bit on my desktop today (ie. with a regular mouse), and there it worked fine. I'll probably have time to test it on my laptop tomorrow, and I'll report back then. I do keep running into weird intermittent scrolling issues with the project explorer and inspector; I'm up to three different mystery issues now. The specific issues I've been running into:
Annoyingly, none of these issues are reliably reproducible, and I have no idea whether they're a consequence of the patch panning or a totally unrelated issue (eg. a wonky pane scrolling implementation). I don't think they should be a blocker, unless you have a reason to believe that it might be related to patch panning. |
@joepie91 thanks for the reports and test on the desktop. Will you test it on your Thinkpad? About project browser and inspector — we'll inspect it and try to fix with another pull request. Looks like the problem is in the "custom scroll" component 🤔 |
@brusherru I think we should rebase & merge this PR. In case of any flaws, a new issue might be open. |
Apologies for the delay :) I've tested it on my laptop for a bit, and the scrolling works fine. It does get a bit laggy/jittery when I scroll quickly; I'm not sure whether that's due to the scrolling code, or whether it's just a general performance issue. Looking at my process manager, it starts eating a core when that happens. |
Hmm, another issue: if you pan too far away from the contents, it can be difficult to find the contents again, given that it's an infinite canvas and there doesn't seem to be a 'return to center' button or anything. I guess that's a broader panning UX issue though, and not specific to this PR. |
Thanks for testing! To find the origin press HOME or Ctrl+HOME. These commands are also available via the View menu. |
…ons of links/dragged entities and etc
… of a node) occures before `PATCH_OFFSET_UPDATE` was dispatched
aca8caf
to
342a07f
Compare
It will close #1388