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

RE2022-307 Filter Contexts #179

Merged
merged 12 commits into from
Mar 25, 2024
Merged

RE2022-307 Filter Contexts #179

merged 12 commits into from
Mar 25, 2024

Conversation

dauglyon
Copy link
Collaborator

@dauglyon dauglyon commented Mar 19, 2024

This PR introduces the use of filter contexts, which are controlled by the "Filter Context Tabs" (All/Matched/Selected). Fixed filter contexts can also be set for dataproducts without matched/selected tabs. FilterContexts are strings of the form [scope].[mode] where scope is the "filter source" (eg biolog, genomes, samples), and mode is the view mode for that scope (all/matched/selected). These contexts allow different filters to be applied across different scopes AND across different modes (tabs).

This PR includes the state and queries needed to support filtering in all dataproducts, but only implements filtering in the genome_attribs dp. Implementing samples filtering should be a quick PR after this one.

@dauglyon dauglyon changed the title Filter contexts RE2022-307 Filter Contexts Mar 21, 2024
Copy link
Collaborator

@codytodonnell codytodonnell left a comment

Choose a reason for hiding this comment

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

This is looking fantastic. I'm noticing two issues though:

  1. The species taxa chart seems to be constantly reloading on both the Taxa Chart page and the Overview page
  2. The matches are cleared out when you exit the collection (i.e. go back to the collections browsing page) but if you return to the collection the matching button still shows "Matching by MinHash Homolgy." I might expect the matches to persist until I specifically click "Clear Match" or until I reload the page

@codytodonnell
Copy link
Collaborator

codytodonnell commented Mar 22, 2024

Two other things I just noticed:

  1. Pagination state applies to all three contexts, so if I have lots of matches but only a few selected, I could switch over to the Selected tab and be on a page that doesn't exist. I think it'd be good to automatically reset to page 1 whenever you change tabs.
  2. This may just be personal preference but I think it would be smoother if the filters applied to all three contexts. It could get confusing to mentally manage the different sets of filters. The one where it would make sense to have a way to disable the filters is the Selected tab

@codytodonnell codytodonnell self-requested a review March 25, 2024 15:38
@dauglyon dauglyon merged commit 4e58669 into main Mar 25, 2024
4 checks passed
@dauglyon dauglyon deleted the filter-contexts branch March 25, 2024 21:54
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