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

[native-filters*4]dashboard native filter overwriting charts filter(?) / incompatible #15070

Closed
junlincc opened this issue Jun 9, 2021 · 9 comments · Fixed by #15080
Closed
Assignees
Labels
#bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P0 Priority item - Critical P1 Priority item - Major

Comments

@junlincc
Copy link
Member

junlincc commented Jun 9, 2021

In the first video below, I created a big number chart with a "name filter" from Explore. I saved it to a new dashboard(with 7 random name filters value).
Problem 1: there's no way to tell whether a chart on the dashboard already carries any filters or not from the indicator. but yes user can read query from dashboard, but it's time consuming to look at one by one. Should we add a new section in the indicator to show original chart filters? @rusackas

Problem 2: when I create the same "name" filter from Dashboard, I see 250 options available, no value is selected in the drop down. then I select "Aaron" as additional filter value(AND WHERE name in Aaron) and click Apply. No data shows. My expected behavior is that the original big number 426K should change(increase) after the number of filter value increases from 7 to 8.
but still, there's no way to tell the charts is being filtered twice unless user click View query from dashboard "..." @villebro @michael-s-molina @kgabryje

1.mov

Problem 3: When I click View chart from Explore, both filters(8 total) appear in the Filter section, which is expected.
What's missing is the yellow warning sign to indicate the second "name in" is carried from the dashboard @kgabryje

Problem 4: Chart is not showing properly in Explore either with 2 separate filters. When i remove the second one and add the same value to the original filter(with 7 selected values), chart shows properly. @villebro

2.mov

*problem 2 and 4 are top priorities among all native filter issues @villebro @kgabryje 🙏
*will convert each sub issue to a separate issue once we open a PR, and tag the new issue.

@junlincc junlincc added #bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P0 Priority item - Critical labels Jun 9, 2021
@junlincc junlincc added P1 Priority item - Major P0 Priority item - Critical and removed P0 Priority item - Critical labels Jun 9, 2021
@junlincc junlincc changed the title [native-filters]dashboard native filter overwriting charts filter(?) / incompatible [native-filters*4]dashboard native filter overwriting charts filter(?) / incompatible Jun 9, 2021
@rusackas
Copy link
Member

rusackas commented Jun 9, 2021

For #1, which is basically a usability issue, I can see one potential solution, though it needs some more thinking. We might be able to add a new category to the filter indicator, which would look kind of like this:
image
... but instead of "Applied Filters" it could display "Inherited Filters".
The catch is that we wouldn't want the filter indicator "pill" to be so darkly/obviously highlighted, since that would be confusing (i.e. the dashboard is not providing the filter... this is just additional context).

@rusackas
Copy link
Member

rusackas commented Jun 9, 2021

For #2, I'm not convinced this is a problem. If I go to explore and filter by the names Aaron, Bob, Dave, I see the accurate number on the dashboard. If I then add a native filter for Bob, I see the number drop. It's an intersection, essentially. If I select Steve in the native filters, the data is null... which is accurate.

@junlincc
Copy link
Member Author

junlincc commented Jun 9, 2021

For #2, I'm not convinced this is a problem. If I go to explore and filter by the names Aaron, Bob, Dave, I see the accurate number on the dashboard. If I then add a native filter for Bob, I see the number drop. It's an intersection, essentially. If I select Steve in the native filters, the data is null... which is accurate.

it's not about number dropping, it's the chart has no data showing at allll when the filter is being overwriten.. @rusackas

@junlincc
Copy link
Member Author

junlincc commented Jun 9, 2021

it could display "Inherited Filters".

That will work, we should use unify the behavior in both Explore and Dashboard, having the same icon and label etc.

@villebro
Copy link
Member

villebro commented Jun 10, 2021

1 and 2: This is expected behavior (the same behavior applies to Filter Box). As Evan said, currently the filter indicator doesn't show filters specified in the chart (this is by design). If we want to change this it's a new feature, and one that will require a fair amount of design and usability research to make sure we don't clutter the dashboard indicators. I agree that having an "inherited filters" category could be a solution, but again, currently users don't expect to see the filter indicator at all if no native filters or filter boxes apply to a chart, making this a breaking change to the current behavior.

@villebro
Copy link
Member

  1. this appears to be a regression. Let's fix it asap.

@villebro
Copy link
Member

  1. This is expected behavior. If the chart has a WHERE name IN ('A', 'B', 'C') and we specify a native filter to emit WHERE name IN ('D'), we don't expect to see any values (the intersection is empty). We could consider adding a grouping id to chart filters, similar to how we do in RLS, but that is a fairly big new feature, so probably shouldn't be covered by the native filters project.

@junlincc
Copy link
Member Author

junlincc commented Jun 10, 2021

1 and 2: This is expected behavior (the same behavior applies to Filter Box). As Evan said, currently the filter indicator doesn't show filters specified in the chart (this is by design). If we want to change this it's a new feature, and one that will require a fair amount of design and usability research to make sure we don't clutter the dashboard indicators. I agree that having an "inherited filters" category could be a solution, but again, currently users don't expect to see the filter indicator at all if no native filters or filter boxes apply to a chart, making this a breaking change to the current behavior.

I understand 1 is current behavior but it's confusing, we can wait until we have more design resource. 2, overwriting filter breaks chart is very problematic. When stacked filters use different columns, we could treat them as AND, but it they use the same column, can we by-default use OR?

@rusackas
Copy link
Member

rusackas commented Jun 10, 2021

For #2, I'm not convinced this is a problem. If I go to explore and filter by the names Aaron, Bob, Dave, I see the accurate number on the dashboard. If I then add a native filter for Bob, I see the number drop. It's an intersection, essentially. If I select Steve in the native filters, the data is null... which is accurate.

it's not about number dropping, it's the chart has no data showing at allll when the filter is being overwriten.. @rusackas
Let me explain/show what I'm seeing, but it seems that the native filter doesn't overwrite the Explore filter, it effectively cascades.

For example, I set up a filter in Explore for the names Sophia, Dawn, and Cindy. 339K results.
Pasted_Image_6_10_21__1_39_AM

In Explore, with no filter, the number is accurate:
Pasted_Image_6_10_21__1_34_AM

If I select/filter on Sophia, who is in the set of Sophia, Dawn, and Cindy, the number shrinks and looks accurate:
Pasted_Image_6_10_21__1_35_AM

If I select/filter on Adam, who is not in the set of Sophia, Dawn, and Cindy, no data is found, which seems reasonable.
Pasted_Image_6_10_21__1_36_AM

This seems reasonable to me, but perhaps I'm misconstruing the intended behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P0 Priority item - Critical P1 Priority item - Major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants