DPGAlliance / publicgoods-scripts

Scripts to generate static site from WordPress
http://digitalpublicgoods.net
MIT License
4 stars 6 forks source link

Select // Deselect #221

Closed PelinSmines closed 11 months ago

PelinSmines commented 1 year ago

In the Registry home page, the current "select all" functionality doesn't function properly: How does it work now? Bug 1) If I deselect all (unselecting all types and SDGs), I then cannot add back individual items by selecting one by one. Bug 2) If I leave "select all" enabled, and then uncheck each type in turn, then turning them back on does not restore the category to the list. How it should work: 1) NEW feature: Select all and deselect all function should work separately both for DPG Types and SDGs. User should be able to select/deselect all of the types and also for SDGs. 2) When all is deselected, the selected item should return a result if there's a match. (Bugs mentioned above) 3) When all is selected, unselected items should be filtered out. (This works fine)

Originally posted by @mlschechter in https://github.com/DPGAlliance/publicgoods-website/issues/23#issuecomment-1627818749

PelinSmines commented 1 year ago

Currently, Select / deselect works. And there is a separate Select / Deselect for SDGs and DPG types. However, there is still a bug: When I just deselect one of the SDGs (1. Poverty for example), it only reduces 1 from the total of 157 DPGs. However, if I deselect all SDGs and then select 1. Poverty only, then it populates 30 DPGs. Same with 2. Zero hunger. Reducing only 1 when deselected vs 26 when only Zero Hunger is selected.

  1. Good Health and Wellbeing: Reduces 33 when deselected, while populates 81 when selected as the only SDG.
  2. Quality Education: Reduces 11, populates 39.
  3. Gender Equality: Reduces 1, populates 20.
  4. Clean Water: Reduces nothing, populates 12.
  5. affordable and clean energy: Reduces nothing, populates 7 I tried all 17 SDGs, none of them works correctly. @skylark1848 @gazdagergo
law909 commented 11 months ago

Filters are working correctly. There are DPGs that belong to multiple SDGs. When you turn off a specific SDG filter, only the DPGs exclusively associated with that SDG disappear. When you enable only a specific SDG filter, all DPGs associated with that SDG will appear. You can see this working on this video