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

🛢️ feature/bulk annotation #4333

Merged
merged 150 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
7324d45
✨ Add support for "Draft" status
damianpumar Nov 27, 2023
269fd37
✨ Refactor question completion methods
damianpumar Nov 27, 2023
78671bd
✨ Refactor response methods in Question and
damianpumar Nov 27, 2023
f987336
include draft in metrics
Nov 29, 2023
920510d
update draft status and allow metrics to show it
Nov 29, 2023
9facb16
Merge branch 'develop' into feature/prepare-bulk-annotation
Nov 29, 2023
e5ef966
reverse commit
Nov 29, 2023
d22c186
create variable for draft color
Nov 29, 2023
f2b291d
update metrics status order
Nov 29, 2023
1909f83
update draft counter
Nov 29, 2023
74d0a72
externalize sidebar logic
Nov 29, 2023
43bc950
update draft color
Nov 29, 2023
8ce2d25
remove form title
Nov 30, 2023
fb73b84
update draft light color
Nov 30, 2023
c8cd2ec
update minor styles
Nov 30, 2023
8a94a85
include draft button
Dec 1, 2023
b734d2c
update form buttons style
Dec 1, 2023
a7d8ea9
update draft disabled button
Dec 1, 2023
aa421c5
update styles
Dec 1, 2023
bf5f62f
remove auto paginate onDraft
Dec 4, 2023
514a8bd
remove unused code
Dec 4, 2023
3d96185
include minimal status tag in record
Dec 4, 2023
366cb9a
update annotation guidelines and save draft
Dec 4, 2023
d4996fa
include title in minimal status tag
Dec 4, 2023
ce1bd6e
update condition for disable save draft button
Dec 4, 2023
39770c5
update form UI
Dec 5, 2023
d543542
remove commented code
Dec 5, 2023
3fb884f
Merge branch 'develop' into feature/bulk-annotation
Dec 5, 2023
1fc7947
Create annotation type selector
Dec 5, 2023
377e801
create main bulk and focus components
Dec 5, 2023
119b4ea
Allow record selection and fixed header for records
Dec 5, 2023
c78e8e3
fix lint
Dec 5, 2023
f8c31de
rename folder
Dec 11, 2023
2741228
include global checkbox and page size dropdown
Dec 11, 2023
a2a528e
update styles
Dec 11, 2023
522e386
update styles
Dec 11, 2023
b9ac710
Include bulk annotation view model
Dec 11, 2023
b44d4ac
update styles
Dec 11, 2023
50444ce
include optional chaining
Dec 11, 2023
b427aaa
Merge branch 'develop' into feature/bulk-annotation
leiyre Dec 12, 2023
504f6db
remove clear and auto-save in form
Dec 12, 2023
48a678f
remove emprty space
Dec 12, 2023
d2debd8
✨ Bulk annotation backend integration
damianpumar Dec 12, 2023
9db8e05
show status text in status tag
Dec 12, 2023
2f0601b
update disabled buttons logic and allow save empty draft
Dec 12, 2023
9048337
refactor: allow draft responses without status
frascuchon Dec 12, 2023
4caf187
update draft function
Dec 12, 2023
ef50946
Merge branch 'develop' into feature/prepare-bulk-annotation
Dec 12, 2023
f1de528
update status tag and draftSaving animation
Dec 12, 2023
1f58a7a
replace StatusTag with RecordStatus new component
Dec 13, 2023
4761e64
remove unused prop
Dec 13, 2023
10fea8f
update styles when button action is triggered
Dec 13, 2023
4a8f3b0
remove unused code
Dec 13, 2023
89a758c
darken button disabled background
Dec 13, 2023
d92db80
include tooltip and shortcut key in buttons
Dec 13, 2023
561b9f3
update styles
Dec 13, 2023
7d481ec
show submit button when record is discarded
Dec 13, 2023
e767ca1
styles darken disable status
Dec 13, 2023
edd82c4
test button interactions
Dec 14, 2023
111eed7
active button when using keyboard
Dec 14, 2023
8061c23
change order of button content
Dec 14, 2023
abc2967
update styles for button area in the form
Dec 14, 2023
2b51ae7
fix border radius in button
Dec 14, 2023
71f4dea
✨ Bulk annotation pagination
damianpumar Dec 14, 2023
087d14c
update button styles
Dec 14, 2023
1abe5d3
Merge branch 'develop' into feature/bulk-annotation
damianpumar Dec 15, 2023
32dd0a5
Merge branch 'feature/prepare-bulk-annotation' into feature/bulk-anno…
damianpumar Dec 15, 2023
3c75bf1
✨ Rename view models and added pagination for records to show on bulk
damianpumar Dec 15, 2023
3215adf
🚑 Remove no necessary code
damianpumar Dec 15, 2023
b3ebc43
✨ Improve feature
damianpumar Dec 15, 2023
d320ba8
✨ Fix toggle all
damianpumar Dec 15, 2023
fbd17b7
✨ Fix code
damianpumar Dec 15, 2023
4725b27
✨ Fix no valid status for bulk
damianpumar Dec 15, 2023
a975cdf
✨ WIP, temporal
damianpumar Dec 15, 2023
766c789
✨ Restore to binding
damianpumar Dec 15, 2023
4b45507
✨ Moved to committed class
damianpumar Dec 15, 2023
0615101
Merge branch 'develop' into feature/bulk-annotation
damianpumar Dec 19, 2023
41bb93a
Merge branch 'develop' into feature/bulk-annotation
damianpumar Dec 19, 2023
d3198e0
🗃️ Save as a draft on bulk annotation
damianpumar Dec 21, 2023
85ba9dc
✨ Fix bulk and focus await without queue
damianpumar Dec 21, 2023
99506ea
🚑 Pagination refactor
damianpumar Dec 21, 2023
0857e10
🐛 Fix re-rendering by page
damianpumar Dec 21, 2023
5d0c9f6
🐛 Fix typo
damianpumar Dec 22, 2023
b512e48
include bulk / focus mode icons
Dec 22, 2023
8b41a82
update button switch styles
Dec 22, 2023
02aebd4
include loading state in buttons
Dec 22, 2023
3f42606
include translations
Dec 22, 2023
cf215af
Merge branch 'develop' into feature/bulk-annotation
leiyre Dec 22, 2023
6d15384
fix lint
Dec 22, 2023
1e94cd9
🚀 Improve toggle annotation mode
damianpumar Dec 22, 2023
36a8651
🚑 Improve action buttons, added cache for meta properties and remove …
damianpumar Dec 22, 2023
75e943f
✨ Show notification when some records failed to annotate.
damianpumar Dec 26, 2023
3a2b3c6
refactor records components and fix similarity component
Dec 27, 2023
5408f6c
fix disable button for bulk pagination and include current page end info
Dec 27, 2023
4706fdc
update page size selector styles
Dec 27, 2023
f6cbd41
include records selection info
Dec 27, 2023
7213661
remove unused code
Dec 27, 2023
25bfb50
✨ Improve translation
damianpumar Dec 28, 2023
c474f09
✨ Improve pagination not needed prop
damianpumar Dec 28, 2023
26ec4fd
✨ Hide discard button when all records on bulk were discarded
damianpumar Dec 28, 2023
afaaf53
remove color in svg files
Dec 28, 2023
a3e2e67
include view setting dropdown in records header
Dec 28, 2023
ab7e966
update switch active styles
Dec 28, 2023
5248050
⚰️ Remove no needed prop
damianpumar Dec 29, 2023
9f7b08a
✨ Refactor Record component for bulk and focus
damianpumar Dec 29, 2023
ac1a247
update styles for record fields header
Dec 29, 2023
9fca619
🚑 Fix status position
damianpumar Dec 29, 2023
6aa18ac
✨ Improve base drop down
damianpumar Dec 29, 2023
c12a28a
✨ Snap scroll
damianpumar Dec 29, 2023
2a959a8
update tooltip styles
Dec 29, 2023
2e52156
include title on buttons showing the number of selected records
Dec 29, 2023
b2f555d
remove unused code
Dec 29, 2023
b5aa6d6
fix pink color variable
Jan 4, 2024
cda4001
fix empty result message position
Jan 4, 2024
cd9d43d
fix filters dropdown setting position when visible property changes
Jan 4, 2024
344b322
fix similarity button icons padding
Jan 5, 2024
83d0892
✨ Update changelog
damianpumar Jan 5, 2024
abdfd85
update checkbox styles
Jan 8, 2024
59fe822
perf: improve upsert responses bulk (#4451)
frascuchon Jan 8, 2024
e4b0c7d
Merge branch 'develop' into feature/bulk-annotation
damianpumar Jan 9, 2024
eba86f0
use HeaderFeedbackTask in all feedback pages
Jan 9, 2024
c289db0
✨ Add translations
damianpumar Jan 9, 2024
cbe263e
include load line in bulk
Jan 9, 2024
1409359
improve tooltip mini
Jan 9, 2024
b2fcf1a
replace native title with tooltip
Jan 9, 2024
e5a18b3
update locales
Jan 9, 2024
4e7b4c9
update styles for buttons and links
Jan 9, 2024
ee02518
remove duplicate locale
Jan 9, 2024
f0df104
✨ Fix key for re render
damianpumar Jan 9, 2024
8bbe3c0
🚸 Temporal solution to disable suggestions for bulkmode
damianpumar Jan 10, 2024
54cc768
include decorator-circle and rename classes in BaseCheckbox
Jan 10, 2024
6105bdd
update tooltip styles
Jan 10, 2024
a63ad22
include and update translations
Jan 10, 2024
628c21b
Merge branch 'feature/bulk-annotation' of github.com:argilla-io/argil…
Jan 10, 2024
b634e8a
initialize checkbox animation once
Jan 10, 2024
c300e2e
update load line color
Jan 10, 2024
1f0cead
update decoration circle color in checkbox component
Jan 10, 2024
c5f6d63
fix test snapshots
Jan 11, 2024
bdc2e7c
update styles and text
Jan 11, 2024
200d006
replace icons
Jan 11, 2024
eaced02
remove selected records info in Focus and update tooltip
Jan 11, 2024
790ea1e
update spaces
Jan 11, 2024
1642485
fix undefined error when pre tag is empty
Jan 11, 2024
ebababe
✨ Remove no necessary event
damianpumar Jan 11, 2024
84baddd
✨ Clean component, before has bulk dependencies, this was wrong.
damianpumar Jan 11, 2024
4db2729
show expanded records by default
Jan 12, 2024
ba58c33
update styles
Jan 12, 2024
a7c0bac
🚀 Improve checkbox circle
damianpumar Jan 12, 2024
0888485
🧪 Add missing test
damianpumar Jan 12, 2024
cf6ae3a
update UI tooltips
Jan 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 73 additions & 70 deletions frontend/components/feedback-task/container/mode/BulkAnnotation.vue
Original file line number Diff line number Diff line change
@@ -1,80 +1,83 @@
<template>
<div class="wrapper">
<section class="wrapper__records">
<DatasetFiltersComponent :recordCriteria="recordCriteria">
<ToggleAnnotationType
v-if="
records.hasRecordsToAnnotate && recordCriteria.committed.isPending
"
:recordCriteria="recordCriteria"
/></DatasetFiltersComponent>
<div class="wrapper__records__header">
<div class="wrapper__records__header--left">
<BaseCheckbox
v-if="records.hasRecordsToAnnotate"
class="wrapper__records__header__checkbox"
:value="selectedRecords.length === recordsOnPage.length"
@input="toggleAllRecords"
/>
<span
class="wrapper__records__header__selection-text"
v-if="selectedRecords.length"
v-text="
$tc('bulkAnnotation.recordsSelected', selectedRecords.length)
<span>
<LoadLine v-if="isSubmitting || isDraftSaving || isDiscarding" />
<div class="wrapper">
<section class="wrapper__records">
<DatasetFiltersComponent :recordCriteria="recordCriteria">
<ToggleAnnotationType
v-if="
records.hasRecordsToAnnotate && recordCriteria.committed.isPending
"
:recordCriteria="recordCriteria"
/></DatasetFiltersComponent>
<div class="wrapper__records__header">
<div class="wrapper__records__header--left">
<BaseCheckbox
v-if="records.hasRecordsToAnnotate"
class="wrapper__records__header__checkbox"
:value="selectedRecords.length === recordsOnPage.length"
@input="toggleAllRecords"
/>
<span
class="wrapper__records__header__selection-text"
v-if="selectedRecords.length"
v-text="
$tc('bulkAnnotation.recordsSelected', selectedRecords.length)
"
/>
</div>
<RecordsViewConfig
v-if="records.hasRecordsToAnnotate"
v-model="recordHeight"
/>
<PaginationFeedbackTaskComponent :recordCriteria="recordCriteria" />
</div>
<RecordsViewConfig
v-if="records.hasRecordsToAnnotate"
v-model="recordHeight"
/>
<PaginationFeedbackTaskComponent :recordCriteria="recordCriteria" />
</div>
<SimilarityRecordReference
v-show="recordCriteria.isFilteringBySimilarity"
v-if="!!records.reference"
:fields="records.reference.fields"
:recordCriteria="recordCriteria"
:availableVectors="datasetVectors"
/>
<div class="bulk__records snap" v-if="records.hasRecordsToAnnotate">
<Record
class="snap-child"
:class="{
'record__wrapper--fixed-height': recordHeight === 'fixedHeight',
}"
v-for="(record, i) in recordsOnPage"
:key="`${recordCriteria.committed.page}_${record.id}_${i}`"
:datasetVectors="datasetVectors"
<SimilarityRecordReference
v-show="recordCriteria.isFilteringBySimilarity"
v-if="!!records.reference"
:fields="records.reference.fields"
:recordCriteria="recordCriteria"
:record="record"
:selectedRecords="selectedRecords"
@on-select-record="onSelectRecord"
:availableVectors="datasetVectors"
/>
</div>
<div v-else class="wrapper--empty">
<p class="wrapper__text --heading3" v-text="noRecordsMessage" />
</div>
</section>
<div class="bulk__records snap" v-if="records.hasRecordsToAnnotate">
<Record
class="snap-child"
:class="{
'record__wrapper--fixed-height': recordHeight === 'fixedHeight',
}"
v-for="(record, i) in recordsOnPage"
:key="`${recordCriteria.committed.page}_${record.id}_${i}`"
:datasetVectors="datasetVectors"
:recordCriteria="recordCriteria"
:record="record"
:selectedRecords="selectedRecords"
@on-select-record="onSelectRecord"
/>
</div>
<div v-else class="wrapper--empty">
<p class="wrapper__text --heading3" v-text="noRecordsMessage" />
</div>
</section>

<QuestionsFormComponent
v-if="!!record"
:key="`${record.id}_questions`"
class="wrapper__form"
:class="statusClass"
:datasetId="recordCriteria.datasetId"
:record="record"
:show-discard-button="recordsOnPage.some((r) => !r.isDiscarded)"
:is-draft-saving="isDraftSaving"
:is-submitting="isSubmitting"
:is-discarding="isDiscarding"
:are-actions-enabled="hasSelectedAtLeastOneRecord"
:number-of-selected-records="selectedRecords.length"
@on-submit-responses="onSubmit"
@on-discard-responses="onDiscard"
@on-save-draft="onSaveDraft"
/>
</div>
<QuestionsFormComponent
v-if="!!record"
:key="`${record.id}_questions`"
class="wrapper__form"
:class="statusClass"
:datasetId="recordCriteria.datasetId"
:record="record"
:show-discard-button="recordsOnPage.some((r) => !r.isDiscarded)"
:is-draft-saving="isDraftSaving"
:is-submitting="isSubmitting"
:is-discarding="isDiscarding"
:are-actions-enabled="hasSelectedAtLeastOneRecord"
:number-of-selected-records="selectedRecords.length"
@on-submit-responses="onSubmit"
@on-discard-responses="onDiscard"
@on-save-draft="onSaveDraft"
/>
</div>
</span>
</template>
<script>
import { useBulkAnnotationViewModel } from "./useBulkAnnotationViewModel";
Expand Down
54 changes: 54 additions & 0 deletions frontend/components/feedback-task/header/load-line/LoadLine.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!--
damianpumar marked this conversation as resolved.
Show resolved Hide resolved
- coding=utf-8
- Copyright 2021-present, the Recognai S.L. team.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->

<template>
<span
class="load-line"
:style="{ minWidth: 100, background: color, height: height }"
></span>
</template>

<script>
export default {
props: {
color: {
type: String,
default: "#ff675f",
},
height: {
type: String,
default: "2px",
},
},
};
</script>

<style lang="scss" scoped>
.load-line {
position: absolute;
width: 100%;
animation: load 0.8s ease-in-out infinite;
}
@keyframes load {
0% {
width: 0%;
}
100% {
width: 100%;
}
}
</style>
Loading