Skip to content

Commit

Permalink
Disable history operations conditional if multi-view
Browse files Browse the repository at this point in the history
I don't like this at all, but we don't have a way to deal with those operations in a multi-view scenario. This should be a temporary fix util we work on enabling real multi-history support both in backend and client.
  • Loading branch information
davelopez committed Mar 26, 2024
1 parent 181e882 commit 592731a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Props {
hasMatches: boolean;
expandedCount: number;
showSelection: boolean;
isMultiViewItem: boolean;
}
const props = defineProps<Props>();
Expand Down Expand Up @@ -60,6 +61,7 @@ function onUpdateOperationStatus(updateTime: number) {
</BButtonGroup>

<DefaultOperations
v-if="!isMultiViewItem"
v-show="!showSelection"
:history="history"
@update:operation-running="onUpdateOperationStatus" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section v-if="hasSelection">
<section v-if="hasSelection && !isMultiViewItem">
<b-dropdown text="Selection" size="sm" variant="primary" data-description="selected content menu" no-flip>
<template v-slot:button-content>
<span v-if="selectionMatchesQuery" data-test-id="all-filter-selected">
Expand Down Expand Up @@ -178,6 +178,7 @@ export default {
contentSelection: { type: Map, required: true },
selectionSize: { type: Number, required: true },
isQuerySelection: { type: Boolean, required: true },
isMultiViewItem: { type: Boolean, required: true },
totalItemsInQuery: { type: Number, default: 0 },
},
setup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ function setItemDragstart(
<HistoryOperations
v-if="canEditHistory"
:history="history"
:is-multi-view-item="isMultiViewItem"
:show-selection="showSelection"
:expanded-count="expandedCount"
:has-matches="hasMatches(historyItems)"
Expand All @@ -558,6 +559,7 @@ function setItemDragstart(
<template v-slot:selection-operations>
<HistorySelectionOperations
:history="history"
:is-multi-view-item="isMultiViewItem"
:filter-text="filterText"
:content-selection="selectedItems"
:selection-size="selectionSize"
Expand All @@ -577,7 +579,7 @@ function setItemDragstart(
</template>
</HistoryOperations>

<SelectionChangeWarning :query-selection-break="querySelectionBreak" />
<SelectionChangeWarning v-if="!isMultiViewItem" :query-selection-break="querySelectionBreak" />

<OperationErrorDialog
v-if="operationError"
Expand Down

0 comments on commit 592731a

Please sign in to comment.