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

fix(discoverability): click incorrectly toggles region creator mode #602

Merged
merged 1 commit into from
Sep 28, 2020

Conversation

ChenCodes
Copy link
Contributor

@ChenCodes ChenCodes commented Sep 23, 2020

Main Issue:
When the user clicks down on a region area, handleStart is being called which causes the Region button to be toggled on. However, when they let go of the button, handleStop is not being fired.

Solution:
We will call handleAbort in handleStop if the shape is null. handleAbort will call resetCreator which should emit the cancel event that the FSM in Preview SDK will consume.

Demo:
ezgif com-video-to-gif (9) 11 39 11 AM

@ChenCodes
Copy link
Contributor Author

Need to add unit tests

src/region/RegionAnnotations.tsx Outdated Show resolved Hide resolved
src/store/eventing/staged.ts Outdated Show resolved Hide resolved
@ChenCodes ChenCodes marked this pull request as ready for review September 25, 2020 23:16
@ChenCodes ChenCodes requested a review from a team as a code owner September 25, 2020 23:16
@ChenCodes ChenCodes force-pushed the click-toggles-region-creator-mode branch from aee9f88 to 90b4253 Compare September 28, 2020 18:39
src/region/RegionAnnotations.tsx Outdated Show resolved Hide resolved
src/region/RegionCreator.tsx Outdated Show resolved Hide resolved
mxiao6
mxiao6 previously approved these changes Sep 28, 2020
@mergify mergify bot merged commit d59c012 into box:master Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants