You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/08 12:34:24 UTC

[GitHub] jaylindquist commented on issue #5269: Filters as a native dashboard (v2) construct

jaylindquist commented on issue #5269: Filters as a native dashboard (v2) construct
URL: https://github.com/apache/incubator-superset/issues/5269#issuecomment-411389249
 
 
   @mistercrunch 
   
   We would like to add a proposal for the native dashboard filter as outlined in the first post. We are looking for feedback and approval before implementing.
   
   ### Dashboard changes
   * Global filters will be the focus of the MVP
       * Tab and section filters would work similarly but will not be included in the initial implementation. The initial focus will be to replace the existing Filter Box chart with a native, global dashboard filter
   * The filter component is drag & drop from the insert panel, similar to tabs
       * Global filters go above dashboard-level tabs and below the dashboard title (see images below for an example)
       * Tab filters go below tabs
       * Section filters go at the top of the section
   * New filters can be added when the dashboard is in "Edit Mode" via a button that appears after the list of filters
       * Individual filters are added based on datasource / column name
       * Clicking the New Filter button will open a modal with "Data Source" and "Column" options to select the filter column
       * If the column selected is a time column, the 'Since' / 'Until' filters will be added
   * Filter controls for the dashboard are initially collapsed and can be expanded / collapsed as needed (see images below for an example)
   * Additional options such as timegrain and instant filtering are added via the configuration cog
   
   ### Chart changes
   * Filter box will be removed as a chart type
   * Filter boxes that are currently included in dashboards will need to be removed from the dashboard and options will be added as global filter options
   * All existing filter box charts are deleted (not sure what else can be done with them since they can't be added to dashboards anymore)
   
   ### URL changes
   * The `preselect_filters` query parameter can still be used to fill in filters via a link. It is currently a map which includes the Filter Box ID. The format will need to change into a map of column name to arrays instead
       * Old format
       ```json
       {
           "414": {
               "column1": [
                   "value1",
                   "value2"
               ]
           },
           "12": {
               "column2": [
                   "value3"
               ]
           }
       }
       ```
       * New format
       ```json
       {
         "column1": [
             "value1",
              "value2"
         ],
         "column2": [
             "value3"
         ]
       }
       ```
       * This change can be made backwards compatible by collecting the filters in the old format, ignoring the ID, and applying the filter values based on the column name 
   
   ### Dashboard mockups
   
   *Collapsed filters*
   
   ![global filter closed](https://user-images.githubusercontent.com/222699/43837185-59133bc8-9add-11e8-895e-02c66898796a.png)
   
   *Opened filters*
   
   ![global filter open](https://user-images.githubusercontent.com/222699/43837195-60e4c4fc-9add-11e8-9f8d-6d2f6c914470.png)
   
   *New filter dialog*
   
   ![filters opened edit edit filter](https://user-images.githubusercontent.com/222699/43837207-66c6d61c-9add-11e8-8b9d-8df0ee8b40a9.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org