-
Notifications
You must be signed in to change notification settings - Fork 316
fix: LSDV-4600: Lead time for TextArea #1214
Conversation
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.
It's all good, but little comments+fix would be nice, and the main thing — Lead Time should be described in a PR and in mixin, as this is the first ever appearance of this calculations in the code.
It stores lead_time in the meta field of the main region instead of storing it in shared TextArea tag or its ephemeral TextAreaRegions.
src/mixins/LeadTime.js
Outdated
})) | ||
.actions(self => ({ | ||
internalCountTime(callTime) { | ||
const now = +Date.now(); |
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.
Date.now()
returns a number, you don't need to convert it to number
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.
const now = +Date.now(); | |
const now = Date.now(); |
- TypeScript! - no debounce, it's detected during calculations - two different approaches on how to count trailing events - schema with explanations - simpler usage
lead_time was not added up because of typo
Information in tags can be easily destroyed, the only source of truth is results/regions, so store data there.
Remove useless metaValue — all data in results and this meta were overrided by meta from result Add check for flag enabled
/git merge master
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1214 +/- ##
==========================================
+ Coverage 68.15% 68.16% +0.01%
==========================================
Files 439 441 +2
Lines 28086 28144 +58
Branches 7435 7455 +20
==========================================
+ Hits 19141 19185 +44
- Misses 7729 7740 +11
- Partials 1216 1219 +3
☔ View full report in Codecov by Sentry. |
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)
Describe the reason for change
Annotation results now have a "lead_time"value in export data for textareas. The value reflects how much time the annotator spent typing values in this TextArea. Lead Time is calculated with minimal interaction time 0.5s and with debounce of the same 0.5s, for example:
What does this fix?
This solves a time tracking problem so that typing time of annotators can be calculated.
What libraries were added/updated?
N/A
Does this change affect performance?
no
Does this change affect security?
no
What alternative approaches were there?
N/A
What feature flags were used to cover this change?
fflag_fix_front_lsdv_4600_lead_time_27072023_short
Does this PR introduce a breaking change?
(check only one)
What level of testing was included in the change?
Which logical domain(s) does this change affect?
Textarea, Lead Time