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

[🎉New Feature for Testing]Dashboard native filter and cascading filter are HERE! #12148

Closed
junlincc opened this issue Dec 19, 2020 · 27 comments
Labels
dashboard:native-filters Related to the native filters of the Dashboard good first issue Good first issues for new contributors

Comments

@junlincc
Copy link
Member

junlincc commented Dec 19, 2020

Highly requested from the community for a couple of years, Superset's new Dashboard Native Filter and Cascading Filter are finally available, ready for testing in master!! We welcome your feedback and comments!

It has been a six months long collaborative project leading by @suddjian, with the dedicated effort from multiple developers.
Credit goes to the below awesome contributors ♥️
@suddjian @villebro @pkdotson @rusackas @mihir174(design)
@agatapst @adam-stasiak
@amitmiran137 @simchanielsen

special thanks to @graceguo-supercat @ktmud @zuzana-vej for user research and code review!

This feature is currently behind a feature flag, to turn on

  1. go to docker/pythonpath_dev/superset_config.py
  2. add below
 FEATURE_FLAGS = {
    "DASHBOARD_NATIVE_FILTERS": True,
}

Features include
Changes included in feat(dashboard): Dashboard-Native Filters #11814 and feat: Native filters fast-follow #12138:

  • Dashboard-native filters can be created, edited, and deleted from the Dashboard in View Dashboard mode
  • Filters can be scoped to specific dashboard panels
  • Filter indicator compatibility
  • Cascading filters(setting parent filter)
  • Instant apply value
  • Default values
  • Collapsible left panel
  • Reset all
  • and much better UX!
  • .......
    WIP
  • Time range filter

Create new filter
create new filter
Filter scoping
scoping
Cascading filter hierarchy setting
Screen Shot 2020-12-19 at 8 10 40 AM
Screen Shot 2020-12-19 at 8 13 40 AM
Open and Collapse side bar
open:co

@junlincc
Copy link
Member Author

junlincc commented Dec 21, 2020

[assigned:polidea][dashboard]native filter sidebar styling and padding should be consistent with the Data panel in Explore
Data Panel in Explore
Screen Shot 2020-12-21 at 12 30 50 AM
Native Filter in Dashboard
Screen Shot 2020-12-21 at 12 32 10 AM

@junlincc
Copy link
Member Author

junlincc commented Dec 21, 2020

[assigned:polidea][dashboard]native filter RESET ALL button does not work properly

Screen.Recording.2020-12-21.at.12.40.39.AM.mov

@junlincc
Copy link
Member Author

junlincc commented Dec 21, 2020

[assigned:polidea][dashboard]new native filter loading state should show Superset infinite loading icon instead of "No Results"

Screen.Recording.2020-12-21.at.12.45.34.AM.mov

@zhaoyongjie
Copy link
Member

zhaoyongjie commented Dec 21, 2020

[assigned:polidea][dashboard] This looks like the Native Filter and Chart filter indicator do not match.

image

@zhaoyongjie
Copy link
Member

zhaoyongjie commented Dec 21, 2020

[dashboard] Timestamp/Datetime-like column is not handled correctly

Filter settings

image

Error

image

@zhaoyongjie
Copy link
Member

zhaoyongjie commented Dec 21, 2020

[assigned:nielsen][dashboard] Apply to specific panels not work.

Screen.Recording.2020-12-22.at.12.10.32.AM.mov

@amitmiran137
Copy link
Member

@zhaoyongjie thank you for sharing
we will take of it
cc: @junlincc @villebro @simchanielsen

@adam-stasiak
Copy link
Contributor

adam-stasiak commented Dec 21, 2020

[assigned:polidea][DASHBOARD]
SCENARIO:
To tabbed dashboard add filter with country name default value: United States
Save
Apply filter With name CHINA
Click on Reset -> Now filter box shows the default value
Click on APPLY -> Default Filter value is not applied

Expected: After click on APPLY it should be current field value applied.
https://user-images.githubusercontent.com/25153919/102827412-cfa06f80-43e2-11eb-9bff-3591138f97ae.mov

@adam-stasiak
Copy link
Contributor

adam-stasiak commented Dec 21, 2020

[dashboard]
Scenario:
Create Filter with reference to dataset
Delete this dataset
Go back to Filter Configuration and Scoping:

Observed: You can find that *FIELD has looped loading animation with name of not available field. After I choose different datasource I still see this old type of field as an option in field box.

Expected: We should indicate somehow that Filter is malformed(@junlincc) and do not propose not available options to set.

compressed.mov

@junlincc Created issue for this #12457

@adam-stasiak
Copy link
Contributor

adam-stasiak commented Dec 21, 2020

[dashboard]
Steps to reproduce:
Add very long name of filter

Observed: You can see that UI glitches. We should handle this better -> I suggest adding in the left side section "..." at the end of too long names or splitting into lines.

@junlincc raised in #12458

@adam-stasiak
Copy link
Contributor

adam-stasiak commented Dec 21, 2020

[dashboard]
Weird behavior for me.

When I add two new filters and:

  • first is correctly filled
  • second is partially filled
    And I click on Save on first filter -> I do not get information that this SAVE will not keep my filter when I quit this modal.

We should indicate that progress will be lost and:

  • force user to finish or remove remaining filters before exit
  • discard not valid filter entries
  • keep them as draft not applicable for usage

@junlincc I think we should consider options for this.

Nagranie.z.ekranu.2020-12-22.o.00.01.28.mov

@junlincc raised this in #12459

@adam-stasiak
Copy link
Contributor

[dashboard] This looks like the Native Filter and Chart filter indicator do not match.

image

I agree- > When we set Native Filter set then we can clearly see number indicator so we should place there native filters as well and update the counter

@adam-stasiak
Copy link
Contributor

adam-stasiak commented Dec 21, 2020

[dashboard]

Default value for filter is not exported with dashboard.
Scenario:
Create Filter with default value.
Export dashboard
Import json file of dashboard

You can see that Default Value for filter was not exported - > Information about Parent relation was exported so I think it should be as well.

@junlincc this issue is gone now :)

@simcha90
Copy link
Contributor

simcha90 commented Dec 22, 2020

[dashboard] Apply to specific panels not work.

Screen.Recording.2020-12-22.at.12.10.32.AM.mov

We will process fix for it in few steps.

  1. UI Config Modal fix:
    refactor: Sync Scoping tree with Forms data #12171
    cc: @amitmiran137 @villebro

@adam-stasiak
Copy link
Contributor

adam-stasiak commented Dec 22, 2020

[dashboard]
When only 1 option is available in filter then it is displayed 1 option()
image
@junlincc raised in #12460

@thoo
Copy link

thoo commented Jan 7, 2021

We have an option to sort values in filterbox. #6523
It would be nice to have it in the native filter too.
image

@adam-stasiak
Copy link
Contributor

adam-stasiak commented Jan 12, 2021

@thoo Could you describe your suggestion wider in seperated ticket? :)

@rmgpinto
Copy link

Two suggestions for native filters:

1- Possibility to change the order of the filters
2- Possibility to change the sorting of the values on the filters (I have a values filter and they appear in a random order)

@junlincc
Copy link
Member Author

  1. Reorder the filter list from the bar? - yes, ideally by drag and drop.
  2. Can you describe your use case in details? @rmgpinto

@rmgpinto
Copy link

I saw now that 2. is the same as what @thoo requested.

@cccs-jc
Copy link
Contributor

cccs-jc commented Mar 3, 2021

We use Superset in the context of Security information and event management (SIEM). Our data often include IP values which users want to filter by adhoc IP ranges (using CIDR notation).

For example when the user inputs a filter value of 192.168.0.0/24 this filter is converted into a range query on the server side. We leverage jinja templating to convert the IP range into an SQL statement like

((IP_COLUMN >= lowIP) AND (IP_COLUMN <= highIP))

This works quite well however there is no validation of the text provided by the user. Ideally we would like to validate the input in the client a bit like is done in the explorer UI.

We would like to be able to provide custom validators to the native filters.

I would also add that being able to provide custom validators to the ad-hoc filter in the Chart Explorer would also be very useful. Currently the ad-hoc filter does not support any input validation.

@junlincc
Copy link
Member Author

@thoo @eugeniamz @rmgpinto

Now dashboard native filter and sort value!! 🎉 thanks to @villebro and @simcha90 🙏

Screen Shot 2021-03-11 at 9 05 46 PM

@junlincc
Copy link
Member Author

Now Dashboard native filter can add multiple time columns!!!🎉
thanks to filter team(R2) @villebro @simcha90 @zhaoyongjie 🙏
Screen Shot 2021-03-11 at 9 08 03 PM

@junlincc
Copy link
Member Author

Now Dashboard native filter integrated with our new robust time picker that allow configure time range is much granular level!!!🎉 thanks to filter team(R2) @villebro @simcha90 @zhaoyongjie 🙏
Screen Shot 2021-03-11 at 8 59 50 PM

@amitmiran137
Copy link
Member

closing this due to the phase 2 followup announcement #13591

@mlmaverick
Copy link

@junlincc Hi, thank you for your efforts in creating this wonderful tool. I was wondering if there is a way to increase the filter limit which is not set to 1000 by default.

Thanks!

image

@progettoautomazione
Copy link

@junlincc Hi, thank you for your efforts in creating this wonderful tool. I was wondering if there is a way to increase the filter limit which is not set to 1000 by default.

Thanks!

image

many many UP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:native-filters Related to the native filters of the Dashboard good first issue Good first issues for new contributors
Projects
None yet
Development

No branches or pull requests