You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/04/09 09:39:35 UTC
[GitHub] [superset] kgabryje opened a new pull request #14046: fix: Make chart emitting cross-filter exclude itself from filtering
kgabryje opened a new pull request #14046:
URL: https://github.com/apache/superset/pull/14046
### SUMMARY
When a chart emits cross-filter, the filter is applied to the chart-emitter. The result is that the user cannot add another value to that filter, because every value other than the current filter had been filtered out. This PR prevents the chart from applying a filter to itself, by adding it's ID to `excluded` array.
To test, enable the flag `DASHBOARD_CROSS_FILTERS`, go to USA Birth Names dashboard (from sample data), enable cross filtering for pie chart and try to emit a cross filter.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
https://user-images.githubusercontent.com/15073128/114161279-2b5a1e80-9928-11eb-9c1d-451519753e20.mov
After:
https://user-images.githubusercontent.com/15073128/114161311-33b25980-9928-11eb-907e-9cfd14c32eca.mov
CC: @villebro @junlincc
### 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
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] 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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] villebro commented on a change in pull request #14046: fix: Make chart emitting cross-filter exclude itself from filtering
Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #14046:
URL: https://github.com/apache/superset/pull/14046#discussion_r610512899
##########
File path: superset-frontend/src/dashboard/util/activeAllDashboardFilters.ts
##########
@@ -92,7 +92,7 @@ export const getAllActiveFilters = ({
const scope = nativeFilters?.[filterId]?.scope ??
chartConfiguration?.[filterId]?.crossFilters?.scope ?? {
rootPath: [DASHBOARD_ROOT_ID],
- excluded: [],
+ excluded: [filterId],
Review comment:
Is there risk that `chartConfiguration[filterId].crossFilters.scope.excluded == []`, in which case the filter won't exclude itself?
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #14046: fix: Make chart emitting cross-filter exclude itself from filtering
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #14046:
URL: https://github.com/apache/superset/pull/14046#issuecomment-816570859
# [Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=h1) Report
> Merging [#14046](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=desc) (2bf8a5f) into [master](https://codecov.io/gh/apache/superset/commit/a3b41e2bac554a097015cf73e950ca1fc5e43b6e?el=desc) (a3b41e2) will **decrease** coverage by `1.05%`.
> The diff coverage is `n/a`.
> :exclamation: Current head 2bf8a5f differs from pull request most recent head b929cb6. Consider uploading reports for the commit b929cb6 to get more accurate results
[](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #14046 +/- ##
==========================================
- Coverage 79.12% 78.07% -1.06%
==========================================
Files 938 938
Lines 47523 47522 -1
Branches 5940 5940
==========================================
- Hits 37604 37101 -503
- Misses 9793 10280 +487
- Partials 126 141 +15
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `49.01% <ø> (-7.05%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...nd/src/dashboard/util/activeAllDashboardFilters.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2FjdGl2ZUFsbERhc2hib2FyZEZpbHRlcnMudHM=) | `100.00% <ø> (ø)` | |
| [...ponents/Select/WindowedSelect/WindowedMenuList.tsx](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L1dpbmRvd2VkU2VsZWN0L1dpbmRvd2VkTWVudUxpc3QudHN4) | `10.71% <0.00%> (-85.72%)` | :arrow_down: |
| [...nd/src/filters/components/Select/transformProps.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHJhbnNmb3JtUHJvcHMudHM=) | `0.00% <0.00%> (-81.82%)` | :arrow_down: |
| [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `0.00% <0.00%> (-80.96%)` | :arrow_down: |
| [...ontend/src/filters/components/Select/buildQuery.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvYnVpbGRRdWVyeS50cw==) | `0.00% <0.00%> (-77.78%)` | :arrow_down: |
| [superset-frontend/src/filters/components/common.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9jb21tb24udHM=) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [superset-frontend/src/dataMask/reducer.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL3JlZHVjZXIudHM=) | `44.00% <0.00%> (-56.00%)` | :arrow_down: |
| [superset-frontend/src/dataMask/actions.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL2FjdGlvbnMudHM=) | `33.33% <0.00%> (-46.67%)` | :arrow_down: |
| [...-frontend/src/explore/reducers/saveModalReducer.js](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvc2F2ZU1vZGFsUmVkdWNlci5qcw==) | `26.66% <0.00%> (-46.67%)` | :arrow_down: |
| [...mponents/nativeFilters/FiltersConfigModal/utils.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL3V0aWxzLnRz) | `34.24% <0.00%> (-46.58%)` | :arrow_down: |
| ... and [59 more](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=footer). Last update [a3b41e2...b929cb6](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #14046: fix: Make chart emitting cross-filter exclude itself from filtering
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14046:
URL: https://github.com/apache/superset/pull/14046#issuecomment-816570859
# [Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=h1) Report
> Merging [#14046](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=desc) (2bf8a5f) into [master](https://codecov.io/gh/apache/superset/commit/a3b41e2bac554a097015cf73e950ca1fc5e43b6e?el=desc) (a3b41e2) will **not change** coverage.
> The diff coverage is `n/a`.
> :exclamation: Current head 2bf8a5f differs from pull request most recent head b929cb6. Consider uploading reports for the commit b929cb6 to get more accurate results
[](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #14046 +/- ##
=======================================
Coverage 79.12% 79.12%
=======================================
Files 938 938
Lines 47523 47523
Branches 5940 5940
=======================================
Hits 37604 37604
Misses 9793 9793
Partials 126 126
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `56.05% <ø> (ø)` | |
| javascript | `68.86% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...nd/src/dashboard/util/activeAllDashboardFilters.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2FjdGl2ZUFsbERhc2hib2FyZEZpbHRlcnMudHM=) | `100.00% <ø> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=footer). Last update [a3b41e2...b929cb6](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] amitmiran137 merged pull request #14046: fix: Make chart emitting cross-filter exclude itself from filtering
Posted by GitBox <gi...@apache.org>.
amitmiran137 merged pull request #14046:
URL: https://github.com/apache/superset/pull/14046
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on a change in pull request #14046: fix: Make chart emitting cross-filter exclude itself from filtering
Posted by GitBox <gi...@apache.org>.
kgabryje commented on a change in pull request #14046:
URL: https://github.com/apache/superset/pull/14046#discussion_r610652696
##########
File path: superset-frontend/src/dashboard/util/activeAllDashboardFilters.ts
##########
@@ -92,7 +92,7 @@ export const getAllActiveFilters = ({
const scope = nativeFilters?.[filterId]?.scope ??
chartConfiguration?.[filterId]?.crossFilters?.scope ?? {
rootPath: [DASHBOARD_ROOT_ID],
- excluded: [],
+ excluded: [filterId],
Review comment:
I haven't encountered such case. It's either an empty object or an array with a chart ID.
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #14046: fix: Make chart emitting cross-filter exclude itself from filtering
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #14046:
URL: https://github.com/apache/superset/pull/14046#issuecomment-816570859
# [Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=h1) Report
> Merging [#14046](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=desc) (2bf8a5f) into [master](https://codecov.io/gh/apache/superset/commit/a3b41e2bac554a097015cf73e950ca1fc5e43b6e?el=desc) (a3b41e2) will **not change** coverage.
> The diff coverage is `n/a`.
> :exclamation: Current head 2bf8a5f differs from pull request most recent head b929cb6. Consider uploading reports for the commit b929cb6 to get more accurate results
[](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #14046 +/- ##
=======================================
Coverage 79.12% 79.12%
=======================================
Files 938 938
Lines 47523 47523
Branches 5940 5940
=======================================
Hits 37604 37604
Misses 9793 9793
Partials 126 126
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `56.05% <ø> (ø)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...nd/src/dashboard/util/activeAllDashboardFilters.ts](https://codecov.io/gh/apache/superset/pull/14046/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2FjdGl2ZUFsbERhc2hib2FyZEZpbHRlcnMudHM=) | `100.00% <ø> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=footer). Last update [a3b41e2...b929cb6](https://codecov.io/gh/apache/superset/pull/14046?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org