|
1 | 1 | <template> |
2 | | - <VerticalResizable class="wrapper" :id="`${recordCriteria.datasetId}-r-v-rz`"> |
3 | | - <template #left> |
4 | | - <HorizontalResizable |
5 | | - :id="`${recordCriteria.datasetId}-r-h-rz`" |
6 | | - class="wrapper__left" |
7 | | - > |
8 | | - <template #up> |
9 | | - <section class="wrapper__records"> |
10 | | - <DatasetFilters :recordCriteria="recordCriteria"> |
11 | | - <ToggleAnnotationType |
12 | | - v-if=" |
13 | | - records.hasRecordsToAnnotate && |
14 | | - recordCriteria.committed.isPending |
15 | | - " |
| 2 | + <span class="focus__container"> |
| 3 | + <div v-if="!records.hasRecordsToAnnotate"> |
| 4 | + <section class="wrapper__records"> |
| 5 | + <DatasetFilters :recordCriteria="recordCriteria" /> |
| 6 | + </section> |
| 7 | + |
| 8 | + <div class="wrapper--empty"> |
| 9 | + <p class="wrapper__text --heading3" v-text="noRecordsMessage" /> |
| 10 | + </div> |
| 11 | + </div> |
| 12 | + <VerticalResizable |
| 13 | + v-else |
| 14 | + :id="`${recordCriteria.datasetId}-r-v-rz`" |
| 15 | + class="wrapper" |
| 16 | + > |
| 17 | + <template #left> |
| 18 | + <HorizontalResizable |
| 19 | + :id="`${recordCriteria.datasetId}-r-h-rz`" |
| 20 | + class="wrapper__left" |
| 21 | + > |
| 22 | + <template #up> |
| 23 | + <section class="wrapper__records"> |
| 24 | + <DatasetFilters :recordCriteria="recordCriteria"> |
| 25 | + <ToggleAnnotationType |
| 26 | + v-if=" |
| 27 | + records.hasRecordsToAnnotate && |
| 28 | + recordCriteria.committed.isPending |
| 29 | + " |
| 30 | + :recordCriteria="recordCriteria" |
| 31 | + /></DatasetFilters> |
| 32 | + <SimilarityRecordReference |
| 33 | + v-show="recordCriteria.isFilteringBySimilarity" |
| 34 | + v-if="!!records.reference" |
| 35 | + :fields="records.reference.fields" |
16 | 36 | :recordCriteria="recordCriteria" |
17 | | - /></DatasetFilters> |
18 | | - <SimilarityRecordReference |
19 | | - v-show="recordCriteria.isFilteringBySimilarity" |
20 | | - v-if="!!records.reference" |
21 | | - :fields="records.reference.fields" |
22 | | - :recordCriteria="recordCriteria" |
23 | | - :availableVectors="datasetVectors" |
24 | | - /> |
25 | | - <div class="wrapper__records__header"> |
26 | | - <PaginationFeedbackTask :recordCriteria="recordCriteria" /> |
27 | | - </div> |
28 | | - <Record |
29 | | - v-if="records.hasRecordsToAnnotate" |
30 | | - :datasetVectors="datasetVectors" |
31 | | - :recordCriteria="recordCriteria" |
| 37 | + :availableVectors="datasetVectors" |
| 38 | + /> |
| 39 | + <div class="wrapper__records__header"> |
| 40 | + <PaginationFeedbackTask :recordCriteria="recordCriteria" /> |
| 41 | + </div> |
| 42 | + <Record |
| 43 | + v-if="records.hasRecordsToAnnotate" |
| 44 | + :datasetVectors="datasetVectors" |
| 45 | + :recordCriteria="recordCriteria" |
| 46 | + :record="record" |
| 47 | + /> |
| 48 | + <div v-else class="wrapper--empty"> |
| 49 | + <p class="wrapper__text --heading3" v-text="noRecordsMessage" /> |
| 50 | + </div> |
| 51 | + </section> |
| 52 | + </template> |
| 53 | + |
| 54 | + <template #downHeader> |
| 55 | + <p v-text="$t('guidelines')" /> |
| 56 | + </template> |
| 57 | + <template #downContent> |
| 58 | + <AnnotationGuidelines /> |
| 59 | + </template> |
| 60 | + </HorizontalResizable> |
| 61 | + </template> |
| 62 | + |
| 63 | + <template #right> |
| 64 | + <HorizontalResizable |
| 65 | + :id="`${recordCriteria.datasetId}-q-h-rz}`" |
| 66 | + class="wrapper__right" |
| 67 | + > |
| 68 | + <template #up> |
| 69 | + <QuestionsForm |
| 70 | + v-if="!!record" |
| 71 | + :key="`${record.id}_questions`" |
| 72 | + class="wrapper__form" |
| 73 | + :class="statusClass" |
| 74 | + :datasetId="recordCriteria.datasetId" |
32 | 75 | :record="record" |
| 76 | + :show-discard-button="!record.isDiscarded" |
| 77 | + :is-draft-saving="isDraftSaving" |
| 78 | + :is-submitting="isSubmitting" |
| 79 | + :is-discarding="isDiscarding" |
| 80 | + :enableAutoSubmitWithKeyboard="true" |
| 81 | + @on-submit-responses="onSubmit" |
| 82 | + @on-discard-responses="onDiscard" |
| 83 | + @on-save-draft="onSaveDraft" |
33 | 84 | /> |
34 | | - <div v-else class="wrapper--empty"> |
35 | | - <p class="wrapper__text --heading3" v-text="noRecordsMessage" /> |
36 | | - </div> |
37 | | - </section> |
38 | | - </template> |
39 | | - |
40 | | - <template #downHeader> |
| 85 | + </template> |
| 86 | + <template #downHeader> |
| 87 | + <p v-text="$t('metrics.progress')" /> |
| 88 | + <AnnotationProgress |
| 89 | + class="annotation-progress" |
| 90 | + :datasetId="recordCriteria.datasetId" |
| 91 | + enableFetch |
| 92 | + /> |
| 93 | + </template> |
| 94 | + <template #downContent> |
| 95 | + <AnnotationProgress :datasetId="recordCriteria.datasetId" /> |
| 96 | + <AnnotationProgressDetailed :datasetId="recordCriteria.datasetId" /> |
| 97 | + </template> |
| 98 | + </HorizontalResizable> |
| 99 | + </template> |
| 100 | + <BaseCollapsablePanel |
| 101 | + hideOnDesktop |
| 102 | + :isExpanded="expandedGuidelines" |
| 103 | + @toggle-expand="expandedGuidelines = !expandedGuidelines" |
| 104 | + > |
| 105 | + <template #panelHeader> |
41 | 106 | <p v-text="$t('guidelines')" /> |
42 | 107 | </template> |
43 | | - <template #downContent> |
| 108 | + <template #panelContent> |
44 | 109 | <AnnotationGuidelines /> |
45 | 110 | </template> |
46 | | - </HorizontalResizable> |
47 | | - </template> |
48 | | - |
49 | | - <template #right> |
50 | | - <HorizontalResizable |
51 | | - :id="`${recordCriteria.datasetId}-q-h-rz}`" |
52 | | - class="wrapper__right" |
53 | | - > |
54 | | - <template #up> |
55 | | - <QuestionsForm |
56 | | - v-if="!!record" |
57 | | - :key="`${record.id}_questions`" |
58 | | - class="wrapper__form" |
59 | | - :class="statusClass" |
60 | | - :datasetId="recordCriteria.datasetId" |
61 | | - :record="record" |
62 | | - :show-discard-button="!record.isDiscarded" |
63 | | - :is-draft-saving="isDraftSaving" |
64 | | - :is-submitting="isSubmitting" |
65 | | - :is-discarding="isDiscarding" |
66 | | - :enableAutoSubmitWithKeyboard="true" |
67 | | - @on-submit-responses="onSubmit" |
68 | | - @on-discard-responses="onDiscard" |
69 | | - @on-save-draft="onSaveDraft" |
70 | | - /> |
71 | | - </template> |
72 | | - <template #downHeader> |
73 | | - <p v-text="$t('metrics.progress')" /> |
74 | | - <AnnotationProgress |
75 | | - class="annotation-progress" |
76 | | - :datasetId="recordCriteria.datasetId" |
77 | | - enableFetch |
78 | | - /> |
79 | | - </template> |
80 | | - <template #downContent> |
81 | | - <AnnotationProgress :datasetId="recordCriteria.datasetId" /> |
82 | | - <AnnotationProgressDetailed :datasetId="recordCriteria.datasetId" /> |
83 | | - </template> |
84 | | - </HorizontalResizable> |
85 | | - </template> |
86 | | - <BaseCollapsablePanel |
87 | | - hideOnDesktop |
88 | | - :isExpanded="expandedGuidelines" |
89 | | - @toggle-expand="expandedGuidelines = !expandedGuidelines" |
90 | | - > |
91 | | - <template #panelHeader> |
92 | | - <p v-text="$t('guidelines')" /> |
93 | | - </template> |
94 | | - <template #panelContent> |
95 | | - <AnnotationGuidelines /> |
96 | | - </template> |
97 | | - </BaseCollapsablePanel> |
98 | | - </VerticalResizable> |
| 111 | + </BaseCollapsablePanel> |
| 112 | + </VerticalResizable> |
| 113 | + </span> |
99 | 114 | </template> |
100 | 115 | <script> |
101 | 116 | import { useFocusAnnotationViewModel } from "./useFocusAnnotationViewModel"; |
@@ -152,6 +167,14 @@ export default { |
152 | 167 | </script> |
153 | 168 |
|
154 | 169 | <style lang="scss" scoped> |
| 170 | +.focus { |
| 171 | + &__container { |
| 172 | + display: flex; |
| 173 | + flex-direction: column; |
| 174 | + height: 100%; |
| 175 | + min-height: 0; |
| 176 | + } |
| 177 | +} |
155 | 178 | .wrapper { |
156 | 179 | position: relative; |
157 | 180 | display: flex; |
|
0 commit comments