Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Venue Type Filter #34

Open
gassc opened this issue Feb 13, 2023 · 0 comments
Open

Venue Type Filter #34

gassc opened this issue Feb 13, 2023 · 0 comments

Comments

@gassc
Copy link
Member

gassc commented Feb 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant