Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[native filters] Select filter should allow user pick time column #14744

Closed
3 tasks done
graceguo-supercat opened this issue May 21, 2021 · 7 comments · Fixed by #15117
Closed
3 tasks done

[native filters] Select filter should allow user pick time column #14744

graceguo-supercat opened this issue May 21, 2021 · 7 comments · Fixed by #15117
Assignees
Labels
dashboard:native-filters Related to the native filters of the Dashboard need:design-review Requires input/approval from a Designer P1 Priority item - Major

Comments

@graceguo-supercat
Copy link

graceguo-supercat commented May 21, 2021

Current Select type filter component has time range control, but doesn't offer a time column control. For a dataset has multiple time columns, this will introduce a potential data quality issue.

Screen_Shot_2021-05-21_at_12_01_48_AM-2

Screenshots

This is screenshot to explain how filter_box is used in airbnb: A filter field, which is not a Date filter, it can still have time range and time column to limit the available choices. For example, with "Last 180 days" time range, this filter has 6 options, while without 180 days limit, it will show 8 options:
Screen_Shot_2021-05-20_at_11_25_40_PM-3

Environment

latest master

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

I remember we discussed this issue in the next version of filter configure modal design. So i assume @junlincc is aware of this issue. I created an issue is to make sure backend can handle the extra query parameter for native filter component. cc @villebro

@graceguo-supercat graceguo-supercat added the #bug Bug report label May 21, 2021
@junlincc junlincc added need:design-review Requires input/approval from a Designer dashboard:native-filters Related to the native filters of the Dashboard and removed #bug Bug report labels May 21, 2021
@junlincc
Copy link
Member

hi @graceguo-supercat i do remember you brought this up in the discussion. can you further explain what potential data quality issue means? 😅

@villebro
Copy link
Member

Good catch - do I understand correctly, that the need is to add the Time Column control to the Select and Range filters?

@graceguo-supercat
Copy link
Author

graceguo-supercat commented May 21, 2021

can you further explain what potential data quality issue means?

for example, i have 2 time columns in a dataset, updated_time and created_time. In old filter_box, I can set time range as last 6 months and time column as updated_time. If native filter component not having time column control, this time range may add to created_time column, which will generate wrong options for this filter field.

@graceguo-supercat
Copy link
Author

add the Time Column control to the Select and Range filters

yes. thank you!!

@junlincc junlincc added the P1 Priority item - Major label Jun 7, 2021
@junlincc
Copy link
Member

junlincc commented Jun 7, 2021

@villebro @zhaoyongjie this is problematic, can we simply add a column select when there's 2 and more dataset is available, and make it dynamic?

@villebro
Copy link
Member

villebro commented Jun 8, 2021

We could fairly easily add a time column dropdown above "Time Range" here where the user could specify an optional time column if there are two or more time columns in a dataset:
image

@junlincc
Copy link
Member

junlincc commented Jun 8, 2021

For quick fix that's ok.. eventually we need to remove the time range and blend it into a regular filter though. let's go for the easy solution for now! 😛

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dashboard:native-filters Related to the native filters of the Dashboard need:design-review Requires input/approval from a Designer P1 Priority item - Major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants