-
Notifications
You must be signed in to change notification settings - Fork 316
Conversation
# Conflicts: # src/tags/control/TextArea/TextArea.js
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
src/regions/AliveRegion.tsx
Outdated
@@ -28,13 +38,20 @@ export const AliveRegion = ( | |||
|
|||
return observer(({ item, ...rest }: RegionComponentProps) => { | |||
const canRender = options?.renderHidden || !item.hidden; | |||
const shouldNotUsePortal = isFF(FF_DBLCLICK_DELAY) || options?.shouldNotUsePortal; |
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.
options.shouldNotUsePortal
is set to true only in one region (Brush) and the value is isFF(FF_DBLCLICK_DELAY)
, so it can be just removed.
@@ -388,7 +392,10 @@ const SelectionLayer = observer(({ item, selectionArea }) => { | |||
const Selection = observer(({ item, selectionArea, ...triggeredOnResize }) => { | |||
return ( | |||
<> | |||
<SelectedRegions item={item} selectedRegions={item.selectedRegions} {...triggeredOnResize} /> | |||
{ !isFF(FF_DBLCLICK_DELAY) |
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.
reverse condition for readability, please
if ('ruler' === el?.attrs?.name) { | ||
return true; | ||
} | ||
if ((!isFF(FF_DBLCLICK_DELAY) || !isMoveTool) |
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.
please, rewrite this! extract lambda into separate named function, add comment, simplify condition
src/mixins/KonvaRegion.js
Outdated
@@ -35,7 +34,7 @@ export const KonvaRegionMixin = types.model({}) | |||
}; | |||
}) | |||
.actions(self => { | |||
let deferredSelectId = null; | |||
let deferredSelectId; |
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.
are there some importance in this change from null
to undefined
?
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.
Nope, it's just an accident
…bs/label-studio-frontend into fb-lsdv-5248/bbox-optimization
Previously, we used the deferred action call approach for double-clicking on a region. It was caused by the fact that there was no way to catch dblclick interaction 'cause re-rendering elements on selection prevents emiting events.
Right now this problem should be solved by using
Portal
element ofKonva
. As long as the elements are still the same we can catch second click on them so we do not need ta wait anymore.PR fulfills these requirements
[fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made
ex.fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
Change has impacts in these area(s)
(check all that apply)
What libraries were added/updated?
N/A
Does this change affect performance?
Nope
Does this change affect security?
Nope
What alternative approaches were there?
(briefly list any if applicable)
What feature flags were used to cover this change?
fflag_fix_front_lsdv_5248_double_click_delay_280823_short
Does this PR introduce a breaking change?
(check only one)
What level of testing was included in the change?
(check all that apply)
Which logical domain(s) does this change affect?
Image Segmentation