OpenDevelopmentMekong / wp-odm_tabular_pages

Internal ODM Wordpress plugin for exposing a page template for tabular pages
https://opendevelopmentmekong.net
GNU General Public License v3.0
0 stars 2 forks source link

Only show filter options which lead to results #115

Open acorbi opened 7 years ago

acorbi commented 7 years ago

Currently, on the tabular pages such as Laws, there are filter options which return 0 results.

For example if the user selects Disasters and emergency response as taxonomic term: https://pp.opendevelopmentcambodia.net/tabular/laws-profiles-and-agreements/?query=&taxonomy=Disasters+and+emergency+response&odm_document_type=all&odm_promulgation_date=

screenshot from 2017-01-18 18-37-14

A nice enhancement would be to remove those options which lead to 0 results. a possible solution would be to extend the scripts run along with odm-automation on every deployment which would generate a JSON file containing a summary of which filters return any results. However, this could be tricky if you consider that users can filter using more than one filter box and the fact that the filters can be added dynamically, which would involve too many possible combinations to be managed easily.

prustar commented 7 years ago

@acorbi -- I wouldn't do this -- there are results for every topic so the fact that it's not showing up in the laws doesn't mean that there aren't any resources at all. Also for the above complexity you've stated above. Better to offer a statement as suggested in Github issue 120. Or allow for the system to search for other alternative document types under this topic and offer it to users so they stay on the site and explore more rather than reduce what we offer.

Huyeng commented 7 years ago

I would like to share the idea that ODC would like to enhance the filter on the law page, Law-demo.pptx

prustar commented 7 years ago

@Huyeng -- I find the two filter boxes confusing. Is this the expected behaviour that ODC users are after?

prustar commented 7 years ago

@Huyeng @tthy -- had another look and it's clearer to me. Once we set the hierarchy of legal documents then it would help the display issue.