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

collapsible filter lists in footer #1414

Merged
merged 3 commits into from
Oct 19, 2021
Merged

Conversation

eharkins
Copy link
Contributor

@eharkins eharkins commented Oct 7, 2021

Makes lists of filter options in the footer collapsible (or rather expandable since they are collapsed by default); see nextstrain/ncov#738 (comment) for motivation for doing this.

Uses https://www.npmjs.com/package/react-collapsible similar to the situation report listings on https://nextstrain.org/sars-cov-2.

Maybe it would be better to just use a traditional dropdown (as the color by does in the sidebar) rather than this special collapsible component - when interacting with it, I'm not sure what it gives us in terms of a good user experience that a regular dropdown menu does not. Maybe being able to see all options at once listed next to one another? Or being able to see which ones are selected while you are looking through options? Interested in feedback on this!

@jameshadfield jameshadfield temporarily deployed to auspice-collapsible-fil-uhfhm4 October 7, 2021 19:39 Inactive
@emmahodcroft
Copy link
Member

emmahodcroft commented Oct 8, 2021

I actually think this works well. I like that it brings the very bottom of the page (which has pretty critical things like the download and the citation) "up higher" so that hopefully they're easier to see - I don't blame anyone for currently stopping scrolling during such a big chunk of blue text!

I think being able to see all the filtering options is actually still pretty useful, and being able to see which filters are applied. I'll admit this isn't quite as useful anymore, with the new filter type-in box, but actually in trying this out I realised it's faster (at least for me) to filter multiple clades by using these than typing, since I can click much faster than I can type!
So I think this is a nice compromise between maintaining the old usability but in a much more compact style.

However, would be curious to see what others think!

Makes it easier to understand filters without needing to expand/contract each filter.
Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

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

Thanks @eharkins - this is much nicer. I tweaked the styles a tiny bit. I plan to merge this shortly.

@jameshadfield jameshadfield merged commit c35bdc8 into master Oct 19, 2021
@jameshadfield jameshadfield deleted the collapsible-filters branch October 19, 2021 20:23
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.

3 participants