codeforamerica / ohana-web-search

A mobile-friendly website for finding human and social services in your community
http://ohana-web-search-demo.herokuapp.com
BSD 3-Clause "New" or "Revised" License
69 stars 74 forks source link

Hide defunct and inactive services #675

Open anselmbradford opened 9 years ago

anselmbradford commented 9 years ago

Moving the status visibility part of https://github.com/codeforamerica/ohana-web-search/issues/667#issue-46662482 to its own issue:

because it's possible for all of a Location's services to be inactive or defunct, that Location should probably not appear in search results, and if it were to be visited directly, a message should be shown that this Location is now inactive. See this API commit for more details: codeforamerica/ohana-api@3f0357f

anselmbradford commented 9 years ago

@monfresh I want the services for a location sorted by status so that all defunct services are first, inactive ones are second, and active ones are third. Does the API guarantee any sorting for services by status? Or should the client do that? If on the client, where and how? I've looked at putting this in the location_controller:

    if @location.services.present? do
      @location.services.sort_by(&:status).reverse!
    end
monfresh commented 9 years ago

The API does not sort services by status. That should probably be left to the client. However, I personally think Ohana Web Search should just show active services. That would makes things a lot simpler and less confusing to the end user. The intended audience probably does not care to read about defunct and inactive services, so why show them, especially since the red warning about their status will draw their eyes to them?

anselmbradford commented 9 years ago

I thought I would hide them under a "show inactive & defunct services" button, so the red warning wouldn't be showing by default.

From the data admin perspective: say there's a service that is inactive or defunct, an administrator sets it to inactive or defunct. Don't want to show it at all? Delete the entry in the database.

From the help seeker perspective: say there's a service they used to use that is now inactive. Suddenly it disappears. What happened to it? Is it gone for good? Is there an error in the website that's preventing it from being shown? Was it never added to the data to begin with? What's going on? I think it's helpful to provide an inconspicuous button where they can see what happened for a service that was once active.

Although a caveat to the above—perhaps it's useful to have defunct services in the database that are equivalent to deleted services, but it is not desirable to delete them? Kind of a like a saved draft for a service. If that is true then at very least I would suggest having a means to see inactive services, particularly since a use-case I could see is to edit the description to say when they may be active again.