Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

fix: LEAP-240: Prevent creating region on clicking outside selected one #1667

Merged
merged 5 commits into from
Jan 29, 2024

Conversation

Gondragos
Copy link
Contributor

We have a functionality under the feature flag that allows us unselect selected region by clicking outside.
Well... It doesn't work with separated tools like <Rectangle> tag. So we are going to fix it.

PR fulfills these requirements

  • Tests for the changes have been added/updated
  • Docs have been added/updated
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance

What feature flags were used to cover this change?

ff_front_dev_1442_unselect_shape_on_click_outside_080622_short

This change affects (describe how if yes)

  • Performance
  • Security
  • UX

Does this PR introduce a breaking change?

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

  • e2e (codecept)
  • integration (cypress)
  • unit (jest)

Which logical domain(s) does this change affect?

ImageView, Image Segmentation, Image Tools

Updated the handleDeferredMouseDown method to accept a boolean argument that represents whether the mouse was clicked or not. This modification prevents unwanted deselection of regions and labels by ensuring that this event occurs only when the mouse was clicked and deselection is intentional.
@Gondragos
Copy link
Contributor Author

Gondragos commented Jan 29, 2024

/git merge master

Workflow run
Successfully pushed new changes:
Merge remote-tracking branch 'origin/master' into fb-leap-240/fix-click-outside (e0a40fe)

@Gondragos
Copy link
Contributor Author

Gondragos commented Jan 29, 2024

/git merge master

Workflow run
Already up-to-date. Nothing to commit.

@Gondragos Gondragos merged commit 923c09c into master Jan 29, 2024
15 checks passed
@Gondragos Gondragos deleted the fb-leap-240/fix-click-outside branch January 29, 2024 16:56
MasherJames pushed a commit to HelloPareto/label-studio-frontend that referenced this pull request Feb 29, 2024
…ne (HumanSignal#1667)

* fix: LEAP-240: Prevent creating region on clicking outside selected one

* Add tests for clicking outside selected region

* Ensure that unselecting labels and regions was initiated only by click.

Updated the handleDeferredMouseDown method to accept a boolean argument that represents whether the mouse was clicked or not. This modification prevents unwanted deselection of regions and labels by ensuring that this event occurs only when the mouse was clicked and deselection is intentional.

* Add tests for checking labels behaviour

---------

Co-authored-by: Gondragos <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants