-
Notifications
You must be signed in to change notification settings - Fork 21
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
Attribute Sorting/Filtering/Graphing #1280
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1dd467a
beginning of attribute filtering
BryonLewis 713aa0c
temporary stuff
BryonLewis 15a3d22
adding in custom filters
BryonLewis 25e8847
moving filtering into useAttributes
BryonLewis 2d649df
adding key filters and improving filtering
BryonLewis e2fbd73
Linter fixes
BryonLewis 9757390
adding basic timeline graphing for detecitons
BryonLewis 1100e56
fixing issues and upating documentation
BryonLewis e8ec62d
Adding documentation
BryonLewis d802fd7
fix value issues
BryonLewis c236f4f
Merge branch 'main' into attributes-filtering
BryonLewis fd94188
Update docs/UI-AttributeDetails.md
BryonLewis c7d2a0c
Merge branch 'attributes-filtering' of github.com:Kitware/dive into a…
BryonLewis ef8b848
addressing comments
BryonLewis 6d3959f
Fixing upload, changing styling
BryonLewis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<script lang="ts"> | ||
import { | ||
defineComponent, ref, watch, PropType, | ||
} from '@vue/composition-api'; | ||
|
||
import StackedVirtualSidebarContainer from 'dive-common/components/StackedVirtualSidebarContainer.vue'; | ||
import { useReadOnlyMode } from 'vue-media-annotator/provides'; | ||
import { usePrompt } from 'dive-common/vue-utilities/prompt-service'; | ||
import AttributeFilters from 'vue-media-annotator/components/AttributeFilters.vue'; | ||
import AttributeTimeline from 'vue-media-annotator/components/AttributeTimeline.vue'; | ||
import TooltipBtn from 'vue-media-annotator/components/TooltipButton.vue'; | ||
|
||
export default defineComponent({ | ||
name: 'AttributesSideBar', | ||
|
||
components: { | ||
StackedVirtualSidebarContainer, | ||
AttributeFilters, | ||
AttributeTimeline, | ||
TooltipBtn, | ||
}, | ||
|
||
props: { | ||
width: { | ||
type: Number, | ||
default: 300, | ||
}, | ||
subCategory: { | ||
type: String as PropType<'Timeline' | 'Filtering'>, | ||
required: false, | ||
}, | ||
}, | ||
|
||
setup(props) { | ||
const readOnlyMode = useReadOnlyMode(); | ||
const { visible } = usePrompt(); | ||
const currentMode = ref(props.subCategory); | ||
const modes = ref(['Filtering', 'Timeline']); | ||
watch(() => props.subCategory, () => { | ||
if (props.subCategory !== undefined) { | ||
currentMode.value = props.subCategory; | ||
} | ||
}); | ||
return { | ||
readOnlyMode, | ||
currentMode, | ||
modes, | ||
visible, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
|
||
|
||
<template> | ||
<StackedVirtualSidebarContainer | ||
:width="width" | ||
:enable-slot="false" | ||
> | ||
<template #default="{ bottomHeight }"> | ||
<v-container> | ||
<h3> {{ currentMode }} </h3> | ||
<v-row class="px-3"> | ||
<div class="mx-1"> | ||
<tooltip-btn | ||
icon="mdi-filter" | ||
tooltip-text="Filter Attributes displayed" | ||
size="large" | ||
:color="currentMode === 'Filtering'? 'primary' : 'default'" | ||
outlined | ||
tile | ||
@click="currentMode = 'Filtering'" | ||
/> | ||
</div> | ||
<div class="mx-1"> | ||
<tooltip-btn | ||
icon="mdi-chart-line-variant" | ||
tooltip-text="Chart Numeric Attributes" | ||
size="large" | ||
outlined | ||
:color="currentMode === 'Timeline'? 'primary' : 'default'" | ||
|
||
tile | ||
@click="currentMode = 'Timeline'" | ||
/> | ||
</div> | ||
</v-row> | ||
<v-divider /> | ||
<attribute-filters | ||
v-if="currentMode === 'Filtering'" | ||
class="flex-grow-0 flex-shrink-0" | ||
:height="bottomHeight" | ||
:hotkeys-disabled="visible() || readOnlyMode" | ||
/> | ||
<attribute-timeline | ||
v-if="currentMode === 'Timeline'" | ||
class="flex-grow-0 flex-shrink-0" | ||
:height="bottomHeight" | ||
/> | ||
</v-container> | ||
</template> | ||
</StackedVirtualSidebarContainer> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect to be able to toggle ascending/descending for both of these sorts not switch between sort types. I think this is fine for now because space is an issue but we might want to log an issue for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the behavior in the type list. It has the same sort of sorting. Alphabetically or Numerically by count. I wanted to stick with the same paradigm for this.