villebro opened a new pull request #13622:
URL: https://github.com/apache/superset/pull/13622


   ### SUMMARY
   Add support for temporal and boolean options to native filters. To 
facilitate this, a custom SQLAlchemy type is introduced to handle literal binds 
using `datetime` objects. In addition, the select Select filter component 
implements a formatter to show only the relevant digits of the timestamp - 
`YYYY-MM-DD` for dates, and `YYY-MM-DD HH:MM:SS` for hours-seconds and full 
`YYY-MM-DD HH:MM:SS.MMMMMM` for sub-second timestamps.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Dropdown options for filter on date column:
   
![image](https://user-images.githubusercontent.com/33317356/111066945-63597780-84ca-11eb-89b5-e69f05b2ce75.png)
   
   Dropdown options for filter on datetime column. Notice how the format adapts 
to only show the date if there are no hours, minutes or seconds:
   
![image](https://user-images.githubusercontent.com/33317356/111066659-cf3ae080-84c8-11eb-8d7d-05b6da732f0a.png)
   
   Dropdown options on boolean column:
   
![image](https://user-images.githubusercontent.com/33317356/111066966-766c4780-84ca-11eb-9e84-dadd3087488a.png)
   
   A bunch of filters enabled at the same time:
   
![image](https://user-images.githubusercontent.com/33317356/111067039-d4009400-84ca-11eb-8c30-3b87a42564c8.png)
   
   The rendered query:
   
![image](https://user-images.githubusercontent.com/33317356/111067050-e549a080-84ca-11eb-853c-3bb9c0dbfb30.png)
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to