Skip to content

Conversation

@nick-skriabin
Copy link
Member

This PR fixes inability to lock or hide Vector regions.

  • Original disabled prop was renamed to selected and inverted logic to clearly reflect what it does
  • Introduced new disabled prop that will actually disable all shape interactions
  • Fixed region hiding

@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 7dd5ec9
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/692435cd13e8a000082165be

@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for label-studio-playground canceled.

Name Link
🔨 Latest commit 7dd5ec9
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/692435cd4b2dfe00085b4c50

@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 7dd5ec9
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/692435cd47aa1000081edc53

@github-actions github-actions bot added the fix label Nov 20, 2025
@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 7dd5ec9
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/692435cdf2bd1700089a8b39

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 0% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.70%. Comparing base (3e1a026) to head (7dd5ec9).

Files with missing lines Patch % Lines
.../editor/src/components/KonvaVector/KonvaVector.tsx 0.00% 70 Missing ⚠️
...ponents/KonvaVector/eventHandlers/mouseHandlers.ts 0.00% 7 Missing ⚠️
...components/KonvaVector/components/VectorPoints.tsx 0.00% 5 Missing ⚠️
web/libs/editor/src/regions/VectorRegion.jsx 0.00% 4 Missing ⚠️
...onents/KonvaVector/eventHandlers/pointSelection.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #8853       +/-   ##
============================================
+ Coverage    37.94%   57.70%   +19.75%     
============================================
  Files          735      554      -181     
  Lines        57849    40332    -17517     
  Branches      9403    10810     +1407     
============================================
+ Hits         21953    23273     +1320     
+ Misses       35892    17055    -18837     
  Partials         4        4               
Flag Coverage Δ
lsf-e2e 49.45% <0.00%> (?)
lsf-integration 49.04% <0.00%> (?)
lsf-unit 8.34% <0.00%> (-0.02%) ⬇️
pytests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

<>
{/* White outline ring for selected points - rendered outside the colored stroke */}
{!disabled && isSelected && (
{selected && isSelected && (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selected AND isSelected? feels a little awkward

Copy link
Collaborator

@hlomzik hlomzik Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ isExplicitlySelected + isMultiSelection + selectedPoints
can it all be simplified? feels that we went too deep

} = currentValuesRef.current;

if (disabled || isDragging.current || isDraggingNewBezier || ghostPointDragInfo?.isDragging) {
if (disabled || !selected || isDragging.current || isDraggingNewBezier || ghostPointDragInfo?.isDragging) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you removed disabled from props but still use it in this condition. is it correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didn't remove it. it was renamed and re-introduced

original disabled was renamed to selected to better reflect what it does. newly added disabled is specifically for disabling user interactions

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you removed it couple of lines earlier in var destructuring and replaced with selected. so apparently it's used from some code above, which makes it not obvious plus I believe it's missing from useEffect dependencies.
I'd suggest to return it back to this function.

Copy link
Collaborator

@hlomzik hlomzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general code looks like a good fit (after fixing issue with missing disabled var)

@nick-skriabin
Copy link
Member Author

nick-skriabin commented Nov 22, 2025

/git merge

Workflow run
Successfully merged: create mode 100644 web/libs/ui/src/lib/dropdown/index.ts

@nick-skriabin
Copy link
Member Author

nick-skriabin commented Nov 24, 2025

/git merge

Workflow run
Successfully merged: 35 files changed, 45 insertions(+), 45 deletions(-)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants