Skip to content
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

Activate tools immediately using last good known mouse event #511

Merged
merged 7 commits into from
Dec 16, 2020

Conversation

nikku
Copy link
Member

@nikku nikku commented Dec 15, 2020

A long standing UX issue in our toolkit is the fact that tool activation (hand tool, lasso tool, space tool, global connect tool) via keyboard shortcuts is wonky. Due to the fact that a mouse event is missing during keyboard activation actual visual feedback is only displayed after the first mouse move interaction.

A couple of related bugs have been filed in the past regarding this: #136, bpmn-io/bpmn-js#584, camunda/camunda-modeler#664, camunda/camunda-modeler#1229.

Since the rework of copy and paste (and the introduction of two-step copy and paste) we have the means to fix this issue: Automatically activate the tools using the last mouse position recorded by our mouse component.

This PR implements the described behavior for all tools.


Screen cast showing the improved behavior in action in bpmn-js

capture KDFcD6_optimized


Closes #136

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Dec 15, 2020
@nikku nikku force-pushed the immediate-hand branch 2 times, most recently from 0ea287e to 133f80c Compare December 15, 2020 21:55
@nikku nikku marked this pull request as ready for review December 15, 2020 22:02
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Dec 15, 2020
@azeghers
Copy link

Works for me.
This has the added benefit of fixing another bug I didn't see reported in the related issues :
When double tapping a keyboard key to activate a tool, it would enable and disable it but still show as activated in the palette.
Code looks fine to me 👍

@fake-join fake-join bot merged commit 6928f9a into develop Dec 16, 2020
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Dec 16, 2020
@fake-join fake-join bot deleted the immediate-hand branch December 16, 2020 14:34
@philippfromme
Copy link
Contributor

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow cursor to be changed with keybindings
4 participants