Esri / crowdsource-polling

Provides a means for citizens to provide feedback to their governments
Apache License 2.0
20 stars 15 forks source link

Filtering, part 2 #218

Closed allisonmuise closed 4 years ago

allisonmuise commented 5 years ago

Need ability to filter specific layers using specific queries, such as road blocks that fall within a specific date range.

Perhaps configure using the 'Ask for values' filters defined in the map, with a configuration toggle (off by default) that users can enable to have these filters exposed in the app (backwards compatibility)?

allisonmuise commented 5 years ago

Formerly part of #213 cc @jlindemann

ashutoshverma-ct commented 4 years ago

@allisonmuise

Based on the above comments, we are assuming the following points for this functionality:

  1. Filters can be applied to multiple layers of the webmap
  2. In the configuration:
    • Add one parameter to allow the user to show/hide filter button (Backward compatibility)
  3. In the widget:
    • The user can define multiple filters on one or multiple layers
    • Each filter can be turned ON/OFF individually
    • One master switch to turn OFF all the filters at once (please confirm this if required)
    • Settings button for each filter to modify layer/expression/value

Let us know your thoughts on this (mockups attached)

Description Proposed mockups
Adding a new button beside "Sign in" image
Filters list on click of filter button (buttons to edit and enable filters) image
Create/Edit filter popup screen image
allisonmuise commented 4 years ago

@ashutoshverma-ct I'm going to distinguish between 2 users:

Due to limitations with the app config panel, I believe we would need to pre-determine how many filters could be set if the filter configuration were to take place in the app config panel. To get around this, I propose using the filter configurations from the map.

I'm imagining something that would have a Manager style UX for the App Configurer and a Near Me style UX for the App User.

1) App configurer defines a series of filters on one or many layers in the map. 2) App configurer enables the display of these filters in the app. This can be a single checkbox parameter in the configuration panel that allows the App User to see the list of configured filters. As you described above, this should be off by default for backwards compatibility. 3) App User can tap the Filter button and then toggle on/off each of the filters. I like your idea for an 'all off'/'all on' option when more than one filter is configured. User should be prompted for values when Ask For Values is enabled on a filter.

ashutoshverma-ct commented 4 years ago

@allisonmuise

Based on the above points, in the widget, we will now have only one screen for all the defined filters and a button to view the filter screen. Following are the salient points:

  1. Each filter label will be layer name
  2. The user can expand/collapse only those filters in which "Ask for value" is enabled
  3. By default, all the filters will be applied and in the collapse state

image

allisonmuise commented 4 years ago

@ashutoshverma-ct

3 brings up a good point. Let's add a second configuration parameter for users to toggle the initial state of the filters - by default they should be applied, but this will give users an option to disable them initially

allisonmuise commented 4 years ago

It appears that configuring 'ask for values' filters on date fields is no longer possible. There was a bug in AGOL that allowed it for a time, but they have since fixed it.

We do need a way to configure date filters in this app:

Could you please look into using the time enabled settings on the layer? This will require two additional configuration parameters: 1) users can choose to expose the date filters (off by default) 2) users can choose to filter using start and/or end time for time enabled on two fields (start and end by default, only applied if previous option is enabled, not applicable when time is enabled on a single field)

allisonmuise commented 4 years ago

@CTLocalGovTeam One other note re: the word Filter at the top of the app. We would like to make this the standard filter icon. let's re-arrange the header bar in the following order to make this look better. From left to right the icons (when relevant) should be filter, help, sign in. The burger menu options are fine as discussed.

ashishchoure commented 4 years ago

@allisonmuise

We would like to discuss the date filter requirements in detail to make sure we are on same page. Could you please set up a call at your convenient time?

allisonmuise commented 4 years ago

@ashishchoure Would after status tomorrow work for you?

ashishchoure commented 4 years ago

@allisonmuise

We can discuss the requirements after status.

ashutoshverma-ct commented 4 years ago

@allisonmuise

Considering all the inputs during the discussions, here are the updated points along with the mockup:

  1. Configuration:

    • A new checkbox "Show date filters" will be added to allow a user to edit date-time fields of the widget filter
  2. Widget:

    • Date filter on the webmap is not allowing "Ask for values" so this filter will not be exposed in the application filter
    • For time-enabled feature layers (mockup attached representing this case):
      • Single Field: Only one field will be exposed for date and time (separate for date and time picker)
      • Two Fields: Two fields will be exposed for date and time (separate for date and time picker)

Note: Filters defined in the map with no "Ask for values" will be not be shown in the widget

Mockup
Please confirm
  • For single field: Date-time field label will be "Event date and time"
  • For two fields: labels will be "Start date and time" and "End date and time"

  • Mockup also includes the filter icon in the header section
    allisonmuise commented 4 years ago

    @jlindemann - please review and let CT know if this looks good to you

    jlindemann commented 4 years ago

    This looks good @ashutoshverma-ct @allisonmuise I assume the second drop down is 15 minute intervals like other apps?

    ashutoshverma-ct commented 4 years ago

    @jlindemann @allisonmuise

    I assume the second drop down is 15 minute intervals like other apps?

    Yes, the second dropdown is the 15-minute interval. Here are the screenshots for both first and second dropdown.

    image

    jlindemann commented 4 years ago

    looks good

    ashutoshverma-ct commented 4 years ago

    As discussed, we need to provide a "back" button for the filter screen and match the style as shown in the below sample screenshots:

    Filter de-activated Filter activated
    MicrosoftTeams-image (3) MicrosoftTeams-image (2)
    allisonmuise commented 4 years ago

    verified