azavea / fb-gender-survey-dashboard

Interactive exploration of global results from the Facebook "Survey on Gender Equality At Home
https://gender-survey-dashboard.netlify.app/
Apache License 2.0
2 stars 2 forks source link

Open Categories in Response to Search #82

Closed TaiWilkin closed 3 years ago

TaiWilkin commented 3 years ago

Overview

When the user enters a search term on the questions page, categories are automatically opened if they contain matching questions, and closed if they have no matching questions. Note that this means that if the user has manually opened or closed a category, then enters or changes a search, the expansion of the accordion will be changed, as there isn't a reasonable way to track which categories have been manually toggled by the user.

Connects #73

Demo

Search

Testing Instructions

alexelash commented 3 years ago

@TaiWilkin Can these always keep the categories open even when no results are returned? Inside each category there is text that says "Contains no matching questions" which I think will help with clarity.

TaiWilkin commented 3 years ago

Updated to only open categories in response to search, not close them.

TaiWilkin commented 3 years ago

Thanks for the reviews!