IATI / D-Portal

http://d-portal.org/
Other
31 stars 23 forks source link

humanitarian filter - switch instead of dropdown? #538

Closed stevieflow closed 3 years ago

stevieflow commented 4 years ago

Currently the humanitarian filter is a drop down

As there will only ever be two choices (yes or no), could this be dealt with by an on/off switch , similar to :

d-portal (2)

notshi commented 4 years ago

Actually, the humanitarian filter is 3 states:

  1. Disabled
  2. Yes
  3. No

So it can't be a switch! :}

andylolz commented 4 years ago

Ahhh, good point! So that's:

stevieflow commented 4 years ago

Is the first state when the attribute is not present? If so, then I'd suggest it's a No..?

stevieflow commented 4 years ago

I think an on/off switch can still apply though. In effect, if you select "yes", you just want to filter to activities that have attribute ''@humanitarian="1"'' (or similar) at the ''iati-activity'' element

andylolz commented 4 years ago

Right, yeah – so in that case, the options would be:

I.e. no way of specifying "development only".

notshi commented 4 years ago

When we apply filters for the search, we need it to be 3 states.

Apply filters when @humanitarian =1 or true Apply filters when @humanitarian =0 or false Apply filters regardless if @humanitarian exists or not; ie. all activities.

The default for no filters is always all activities.

stevieflow commented 4 years ago

I see your point @andylolz

My understanding of the humanitarian flag is it is just that - you use it to declare when an activity has some humanitarian aspect. It's a positive addition you make to the data, rather than an assumption. Before this, it was just assumed that all data was development, i guess

I dont think ^^ helps, although it could paint the user story

andylolz commented 4 years ago

as a d-portal user I want to filter to activities that only have the humanitarian flag, so that I am clear this data is relevant to humanitarian (or something)

Yes, exactly.

Expressing this as user stories is helpful. I find it a bit difficult to come up with the user story for the "@humanitarian =0 or false" filter. It’s guaranteed to only return a subset of all development activities, because the @humanitarian attribute was only added at v2.02.

amy-silcock commented 4 years ago

This has been implemented as a drop down option. This keeps it in the same style as the other filter options.

stevieflow commented 4 years ago

This keeps it in the same style as the other filter options.

Is that the end of the discussion therefore?

notshi commented 3 years ago

Closing this as resolved.