GabeLoins opened a new pull request #4909: [Explore] Adding Adhoc Filters
URL: https://github.com/apache/incubator-superset/pull/4909
 
 
   Here I'm following a similar design pattern as Adhoc Metrics 
(https://github.com/apache/incubator-superset/pull/4663 and 
https://github.com/apache/incubator-superset/pull/4736). Adhoc Filters 
introduces a new control that unifies the 4 previous filter controls (free text 
where, free text having, structured where filter, structured having filter). It 
allows you to select a column or any saved metric / adhoc metric currently 
being used in the metric field to filter by:
   
   
![image](https://user-images.githubusercontent.com/2455694/39441120-c349d18e-4c61-11e8-9116-c274fb50919a.png)
   
   and then once a metric or column is selected lets you switch between writing 
a SQL filter or simple filter for that metric/column:
   
   
![image](https://user-images.githubusercontent.com/2455694/39441185-fa5e9538-4c61-11e8-9399-f81f9f36e23d.png)
   
   (for druid datsources, metric and column filters can only be edited in the 
simple view. for table datsources, column filters can be edited in either but 
metrics filters can only be edited in the sql view)
   
   This PR also removes the legacy filter controls. When loading a chart that 
has legacy filters already attached to it, they will be cast to adhoc filters:
   
![adhocfilters_castslegacyfilters](https://user-images.githubusercontent.com/2455694/39441638-7556e9f6-4c63-11e8-9a79-b91bd264d81b.gif)
   
   Here are some more demos of the feature in action,
   
   creating and editing filters:
   
![adhocfilters_creatingandediting](https://user-images.githubusercontent.com/2455694/39441667-8c148c52-4c63-11e8-936d-92151bc92afb.gif)
   
   transitioning between simple tab and sql tab:
   
![adhocfilters_simpletosql](https://user-images.githubusercontent.com/2455694/39441788-e02fd828-4c63-11e8-9fa7-6540a6b24367.gif)
   
   selecting adhoc metrics to filter on:
   
![adhocfilters_coversadhocmetrics](https://user-images.githubusercontent.com/2455694/39441800-ebfadebe-4c63-11e8-9256-b2f02fcb0ebe.gif)
   
   notes to reviewers:
   The meat of the frontend lies in the three AdhocFilterEditPopover* files and 
the AdhocFilterControl file. The meat of the backend lies in viz.py where I 
break adhoc filters out into the four base types of filters for processing.
   
   reviewers:
   @michellethomas @williaster @graceguo-supercat @john-bodley @mistercrunch 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to