Skip to content

Commit 97af826

Browse files
mattdawkinsclaude
andcommitted
Add type and confidence to column visibility settings
Allow users to show/hide the Type and Confidence columns in the bottom track list view through the column settings panel. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 83ef8f6 commit 97af826

File tree

4 files changed

+88
-59
lines changed

4 files changed

+88
-59
lines changed

client/dive-common/components/TrackListColumnSettings.vue

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,27 @@ export default defineComponent({
7373
Column Visibility
7474
</div>
7575

76-
<!-- Built-in columns -->
76+
<!-- Core columns -->
7777
<div class="text-caption grey--text mb-1">
78+
Core Columns
79+
</div>
80+
<v-checkbox
81+
v-model="columnVisibility.type"
82+
dense
83+
hide-details
84+
label="Type"
85+
class="my-0 py-0"
86+
/>
87+
<v-checkbox
88+
v-model="columnVisibility.confidence"
89+
dense
90+
hide-details
91+
label="Confidence"
92+
class="my-0 py-0"
93+
/>
94+
95+
<!-- Frame columns -->
96+
<div class="text-caption grey--text mt-2 mb-1">
7897
Frame Columns
7998
</div>
8099
<v-checkbox

client/dive-common/store/settings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { cloneDeep, merge } from 'lodash';
33
import { AnnotatorPreferences } from 'vue-media-annotator/types';
44

55
interface ColumnVisibilitySettings {
6+
type: boolean;
7+
confidence: boolean;
68
startFrame: boolean;
79
endFrame: boolean;
810
startTimestamp: boolean;
@@ -85,6 +87,8 @@ const defaultSettings: AnnotationSettings = {
8587
autoZoom: false,
8688
filterDetectionsByFrame: false,
8789
columnVisibility: {
90+
type: true,
91+
confidence: true,
8892
startFrame: true,
8993
endFrame: true,
9094
startTimestamp: false,

client/src/components/TrackItem.vue

Lines changed: 62 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -473,66 +473,70 @@ export default defineComponent({
473473
{{ track.trackId }}
474474
</div>
475475
<!-- Editable type field -->
476-
<select
477-
v-if="editingType && lockTypes"
478-
ref="typeInputRef"
479-
v-model="editTypeValue"
480-
class="compact-type-input compact-select-input"
481-
@blur="saveType"
482-
@change="saveType"
483-
@keydown.enter="saveType"
484-
@keydown.escape="cancelEditType"
485-
@click.stop
486-
>
487-
<option
488-
v-for="item in allTypes"
489-
:key="item"
490-
:value="item"
476+
<template v-if="!columnVisibility || columnVisibility.type !== false">
477+
<select
478+
v-if="editingType && lockTypes"
479+
ref="typeInputRef"
480+
v-model="editTypeValue"
481+
class="compact-type-input compact-select-input"
482+
@blur="saveType"
483+
@change="saveType"
484+
@keydown.enter="saveType"
485+
@keydown.escape="cancelEditType"
486+
@click.stop
491487
>
492-
{{ item }}
493-
</option>
494-
</select>
495-
<input
496-
v-else-if="editingType"
497-
ref="typeInputRef"
498-
v-model="editTypeValue"
499-
type="text"
500-
list="allTypesOptions"
501-
class="compact-type-input"
502-
@blur="saveType"
503-
@keydown.enter="saveType"
504-
@keydown.escape="cancelEditType"
505-
@click.stop
506-
>
507-
<span
508-
v-else
509-
class="track-type-compact text-truncate"
510-
:class="{ editable: !readOnlyMode && !lockTypes }"
511-
@click="startEditType"
512-
>{{ trackType }}</span>
488+
<option
489+
v-for="item in allTypes"
490+
:key="item"
491+
:value="item"
492+
>
493+
{{ item }}
494+
</option>
495+
</select>
496+
<input
497+
v-else-if="editingType"
498+
ref="typeInputRef"
499+
v-model="editTypeValue"
500+
type="text"
501+
list="allTypesOptions"
502+
class="compact-type-input"
503+
@blur="saveType"
504+
@keydown.enter="saveType"
505+
@keydown.escape="cancelEditType"
506+
@click.stop
507+
>
508+
<span
509+
v-else
510+
class="track-type-compact text-truncate"
511+
:class="{ editable: !readOnlyMode && !lockTypes }"
512+
@click="startEditType"
513+
>{{ trackType }}</span>
514+
</template>
513515
<!-- Editable confidence field -->
514-
<input
515-
v-if="editingConfidence"
516-
ref="confidenceInputRef"
517-
v-model="editConfidenceValue"
518-
type="number"
519-
step="0.01"
520-
min="0"
521-
max="1"
522-
class="compact-confidence-input"
523-
@blur="saveConfidence"
524-
@keydown.enter="saveConfidence"
525-
@keydown.escape="cancelEditConfidence"
526-
@click.stop
527-
>
528-
<span
529-
v-else
530-
class="track-confidence-compact"
531-
:class="{ editable: !readOnlyMode }"
532-
@click="startEditConfidence"
533-
>
534-
{{ topConfidence !== null ? topConfidence.toFixed(2) : '' }}
535-
</span>
516+
<template v-if="!columnVisibility || columnVisibility.confidence !== false">
517+
<input
518+
v-if="editingConfidence"
519+
ref="confidenceInputRef"
520+
v-model="editConfidenceValue"
521+
type="number"
522+
step="0.01"
523+
min="0"
524+
max="1"
525+
class="compact-confidence-input"
526+
@blur="saveConfidence"
527+
@keydown.enter="saveConfidence"
528+
@keydown.escape="cancelEditConfidence"
529+
@click.stop
530+
>
531+
<span
532+
v-else
533+
class="track-confidence-compact"
534+
:class="{ editable: !readOnlyMode }"
535+
@click="startEditConfidence"
536+
>
537+
{{ topConfidence !== null ? topConfidence.toFixed(2) : '' }}
538+
</span>
539+
</template>
536540
<!-- Start frame column (clickable to seek) -->
537541
<span
538542
v-if="!columnVisibility || columnVisibility.startFrame"

client/src/components/TrackList.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ export default defineComponent({
526526
>{{ sortIcon('id') }}</v-icon>
527527
</span>
528528
<span
529+
v-if="columnVisibility?.type !== false"
529530
class="col-header col-type sortable"
530531
:class="{ active: sortKey === 'type' }"
531532
@click="handleSort('type')"
@@ -537,6 +538,7 @@ export default defineComponent({
537538
>{{ sortIcon('type') }}</v-icon>
538539
</span>
539540
<span
541+
v-if="columnVisibility?.confidence !== false"
540542
class="col-header col-conf sortable"
541543
:class="{ active: sortKey === 'confidence' }"
542544
@click="handleSort('confidence')"

0 commit comments

Comments
 (0)