Skip to content

Venue Type Filter #34

@gassc

Description

@gassc

Ask: new filter by venue type.

Some out-loud thinking:

  • A fish fry can have one or more of the existing kinds of “feature” filters (alcohol, pierogies, etc.), but can only be one type of venue
  • Whereas the existing feature filters are used to narrow down fish fries from the entire list, a venue type filter, in a way, would determine what is in list in the first place.
  • Feature filters are inclusive. Checking on one or more means only those fish fries that include those features are shown
  • I’m seeing venue type as a second set of “inclusive” filters, but the venue types are pre-checked. If you don’t want to include a certain type of venue on the map, you turn them off
    • This approach could also accommodate keeping a certain type of venue off by default if desired (e.g., restaurants, something that has been discussed in the past).
  • The "verified for " filter is additive to these

Thinking in terms of the “query”:

  • Show me all the fish fries for all types of venues (i.e., the initial map view)
    • No feature filters are checked, all venue types are checked.
    • venue_type in <list of all venue types>
  • Show me only fish fries everywhere except restaurants
    • No feature filters are checked, one venue type is unchecked.
    • (venue_type in <list of all venue types that excludes restaurants>)
  • I’m interested in only fish fries with homemade pierogies, doesn’t matter what kind of venue
    • One feature filter is checked, all venue types are checked.
    • (pierogies = True) AND (venue_type in <list of all venue types>)
  • I’m interested in only fish fries with homemade pierogies at lunch, doesn’t matter what kind of venue
    • Two feature filters are checked, all venue types are unchecked.
    • (pierogies = True AND lunch = True) AND (venue_type in <list of all venue types>)
  • I’m interested in only fish fries with homemade pierogies at fire halls
    • One feature filters is checked, all venue types are unchecked.
    • (pierogies = True) AND (venue_type = fire hall)

A lot of the work to implement this will happen somewhere in this function:

function filterFeatures(f) {

The template change hereabouts:

<div class="modal " id="filterModal" tabindex="-1" role="dialog">

Also see this issue regarding improving the filter logic: #20

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions