Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 29 additions & 12 deletions client/dive-common/components/ConfidenceSubsection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export default defineComponent({
type: Array as PropType<[string, number][]>,
required: true,
},
disabled: {
type: Boolean,
default: false,
},
},
setup() {
const typeStylingRef = useTypeStyling();
Expand Down Expand Up @@ -82,12 +86,35 @@ export default defineComponent({
}"
/>
</v-col>
<v-col class="type-item-value">
<v-col>
{{ pair[0] }}
</v-col>
<v-col class="type-score">
<v-spacer />
<v-col class="type-score shrink mr-1">
{{ pair[1].toFixed(4) }}
</v-col>
<v-col
v-if="pair[1] !== 1 && !disabled"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if this should be shown if the pair length > 1 or if the pair[1] !== 1. I know the idea of the confidencePairs means this should never be 1.0 while also having other pairs but if anyone reformatted their CSV to have a 1.0 pair and other pairs they wouldn't be able to use this quick tool to assign a true pair. It's a small thing and probably don't worry about it too much.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it depends on what you care about. If a pair already has a value of 1.0 then maybe it doesn't matter. Likewise, if there's only one pair, but it's 0.25, maybe someone would want to make it 1.0.

We can always change it later if someone has a preference.

class="shrink"
>
<v-tooltip
open-delay="200"
bottom
>
<template #activator="{ bind, on }">
<v-btn
x-small
icon
v-bind="bind"
v-on="on"
@click="$emit('set-type', pair[0])"
>
<v-icon>mdi-check</v-icon>
</v-btn>
</template>
<span>Accept {{ pair[0] }} as correct type</span>
</v-tooltip>
</v-col>
</v-row>
</span>
</v-col>
Expand All @@ -97,19 +124,9 @@ export default defineComponent({

<style lang="scss">
.type-color-box {
margin-top: 5px;
min-width: 10px;
max-width: 10px;
min-height: 10px;
max-height: 10px;
}
.type-item-value {
max-width: 80%;
margin: 0px;
}
.type-score {
font-size: 1em;
max-width: 25%;
min-width: 25%;
}
</style>
2 changes: 2 additions & 0 deletions client/dive-common/components/TrackDetailsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ export default defineComponent({
:confidence-pairs="
flatten(selectedTrackList.map((t) => t.confidencePairs)).sort((a, b) => b[1] - a[1])
"
:disabled="selectedTrackList.length > 1"
@set-type="selectedTrackList[0].setType($event)"
/>
<attribute-subsection
v-if="!mergeInProgress"
Expand Down