Skip to content
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 15 commits into from
Aug 12, 2022
Merged

Attribute Sorting/Filtering/Graphing #1280

merged 15 commits into from
Aug 12, 2022

Conversation

BryonLewis
Copy link
Collaborator

@BryonLewis BryonLewis commented Jul 25, 2022

Attributes Filter/Sorting:

New Features:

  • Fixed import of JSON files so that Attributes are calculated when a user imports a trackJSON file. Before they were only calculated when a VIAME-CSV was imported.
  • Attributes Subpanel CSS updated to fix minor issues from displaying frame numbers to not displaying Track Attributes if too many Detection Attributes Existed.
  • Added a Sort option for Attributes which will sort Alphabetically by key or Numerically (placing non-numeric values at the bottom).
  • Attributes now have a color associated with them automatically at run time. I am not saving this value in the Cofiguration.json file. This could be a further update if we allow the user to choose attribute color in the future.
  • Filtering Icon for attributes is active when Attribute filtering is turned on.
  • Attribute Details Panel
    • Attribute Filtering
      • Allows filtering the display of Attributes based on Numeric/Text/Boolean values or if a specific key is visible.
      • Can filter Track and Detection attributes independently
      • Filters are applied in the order they are displayed to allow cascading filters.
    • Timeline Visualization
      • Shows a graph representing the numeric values of attributes for the selected track
      • Limited currently to numeric values only but will updated in the future to include text/boolean values.
      • The graph icon is displayed next to the "Detections" and "Events" button.
      • Graphing is based on using a "Key" filter where it will only graph the accepted keys.
  • Extras:
    • Hid the Groups Button for the timeline if no groups exist.

Dev Information:

  • useAttributes - This file has expanded largely to include the AttributeFilter type definitions and storage of the data to apply filters. If this goes further there may be a need to add more data to it.
    • Storage for the filters, timelines, and functions for modifying the filters/timelines
  • provides.ts - I included a separate useAttributeFilters to the provies.ts to use the specific values associated with AttributesFiltering and visualization.
  • Vue Components
    • There are a few Vue components that were needed to properly display information in the Attribute Details Panel. These are mostly the filtering types and an ability to edit the filtering settings.
  • Attributes Timeline
    • Some small modifications to the LineChart.vue to create a linear graph instead of step and also allow for highlighting of hovered lines.

@BryonLewis BryonLewis changed the title Attribute Sorting/Filtering Attribute Sorting/Filtering/Graphing Aug 4, 2022
@BryonLewis BryonLewis marked this pull request as ready for review August 4, 2022 15:30
docs/UI-Attributes.md Show resolved Hide resolved
docs/UI-AttributeDetails.md Show resolved Hide resolved
docs/UI-AttributeDetails.md Show resolved Hide resolved
docs/UI-AttributeDetails.md Show resolved Hide resolved
docs/UI-AttributeDetails.md Outdated Show resolved Hide resolved
docs/UI-AttributeDetails.md Show resolved Hide resolved
docs/UI-AttributeDetails.md Outdated Show resolved Hide resolved
client/src/components/AttributeFilters.vue Outdated Show resolved Hide resolved
const cameraStore = useCameraStore();
const activeSettings = ref(true);
const sortingMethods = ['a-z', '1-0'];
const sortingMethodIcons = ['mdi-sort-alphabetical-ascending', 'mdi-sort-numeric-ascending'];
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

client/dive-common/components/AttributesSubsection.vue Outdated Show resolved Hide resolved
@BryonLewis
Copy link
Collaborator Author

Change "Key Filter" for the timeline to "Timeline Filter".

@BryonLewis
Copy link
Collaborator Author

BryonLewis commented Aug 10, 2022

Change "Filter Type" to some terminology which isn't already used.
Maybe Switch to using radio buttons for the track/detection to swap between the filters.
Can then use "Display Filters for..." or similar.

Copy link
Collaborator

@marySalvi marySalvi left a comment

Choose a reason for hiding this comment

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

This looks great!

Couple of thoughts that I don't know if they should be for this PR or another:
I think that when you click on the filter button for either track or detection, the radio button selected should reflect whichever you clicked to open it.

Also I think 'Draw Timeline' should trigger the timeline to switch to the attributes linechart

client/dive-common/components/AttributesSubsection.vue Outdated Show resolved Hide resolved
client/src/components/AttributeFilters.vue Outdated Show resolved Hide resolved
Copy link
Collaborator

@marySalvi marySalvi left a comment

Choose a reason for hiding this comment

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

This looks awesome! :shipit:

@BryonLewis BryonLewis merged commit d2214cb into main Aug 12, 2022
@BryonLewis BryonLewis deleted the attributes-filtering branch August 12, 2022 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants