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/03/18 10:24:48 UTC

[GitHub] [superset] simcha90 opened a new pull request #13688: fix(native-filters): fix removing native filter

simcha90 opened a new pull request #13688:
URL: https://github.com/apache/superset/pull/13688


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Fix next flow:
   1. Have one native filter
   2. Add new native filter
   3. Choose values for second one
   4. Remove it
   
   Actual: Charts not updated after second filter was removed
   Expected: Charts should be updated after second filter was removed
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### 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:
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 #13688: fix(native-filters): fix removing native filter

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13688:
URL: https://github.com/apache/superset/pull/13688#issuecomment-801995587


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13688?src=pr&el=h1) Report
   > Merging [#13688](https://codecov.io/gh/apache/superset/pull/13688?src=pr&el=desc) (5ac87bb) into [master](https://codecov.io/gh/apache/superset/commit/adc247b7e4fade7ef0d68cb07df5e3aa6bf9a677?el=desc) (adc247b) will **decrease** coverage by `4.43%`.
   > The diff coverage is `92.06%`.
   
   > :exclamation: Current head 5ac87bb differs from pull request most recent head 52389ef. Consider uploading reports for the commit 52389ef to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13688/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13688?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13688      +/-   ##
   ==========================================
   - Coverage   77.40%   72.96%   -4.44%     
   ==========================================
     Files         924      614     -310     
     Lines       46863    22039   -24824     
     Branches     5657     5867     +210     
   ==========================================
   - Hits        36272    16081   -20191     
   + Misses      10455     5822    -4633     
     Partials      136      136              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.47% <73.21%> (-0.12%)` | :arrow_down: |
   | hive | `?` | |
   | javascript | `63.17% <49.20%> (+0.01%)` | :arrow_up: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `?` | |
   | sqlite | `?` | |
   
   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/13688?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...et-frontend/src/dashboard/actions/nativeFilters.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL25hdGl2ZUZpbHRlcnMudHM=) | `60.00% <ø> (-4.11%)` | :arrow_down: |
   | [superset-frontend/src/dataMask/actions.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL2FjdGlvbnMudHM=) | `75.00% <ø> (ø)` | |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...nd/src/filters/components/Select/transformProps.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHJhbnNmb3JtUHJvcHMudHM=) | `81.81% <71.42%> (-3.90%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `80.95% <75.00%> (+1.46%)` | :arrow_up: |
   | [...d/components/nativeFilters/FilterBar/FilterBar.tsx](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlckJhci50c3g=) | `92.42% <100.00%> (+0.55%)` | :arrow_up: |
   | [superset-frontend/src/dataMask/reducer.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL3JlZHVjZXIudHM=) | `100.00% <100.00%> (ø)` | |
   | [...ontend/src/filters/components/Select/buildQuery.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvYnVpbGRRdWVyeS50cw==) | `77.77% <100.00%> (+20.63%)` | :arrow_up: |
   | [superset-frontend/src/filters/utils.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvdXRpbHMudHM=) | `95.23% <100.00%> (+6.34%)` | :arrow_up: |
   | [superset-frontend/src/utils/common.js](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2NvbW1vbi5qcw==) | `87.71% <100.00%> (+0.44%)` | :arrow_up: |
   | ... and [323 more](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13688?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/13688?src=pr&el=footer). Last update [adc247b...52389ef](https://codecov.io/gh/apache/superset/pull/13688?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] villebro merged pull request #13688: fix(native-filters): fix removing native filter

Posted by GitBox <gi...@apache.org>.
villebro merged pull request #13688:
URL: https://github.com/apache/superset/pull/13688


   


-- 
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 #13688: fix(native-filters): fix removing native filter

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #13688:
URL: https://github.com/apache/superset/pull/13688#discussion_r596859328



##########
File path: superset-frontend/src/dataMask/reducer.ts
##########
@@ -28,13 +28,11 @@ import {
   UpdateDataMask,
 } from './actions';
 
-export function getInitialMask(id: string): MaskWithId {
-  return {
-    id,
-    extraFormData: {},
-    currentState: {},
-  };
-}
+export const getInitialMask = (id: string): MaskWithId => ({
+  id,
+  extraFormData: {},
+  currentState: {},
+});

Review comment:
       Is there a reason we're changing this to an arrow function? Personally I prefer to keep exported functions as vanilla functions vs arrows.




----------------------------------------------------------------
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 #13688: fix(native-filters): fix removing native filter

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #13688:
URL: https://github.com/apache/superset/pull/13688#issuecomment-801995587


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13688?src=pr&el=h1) Report
   > Merging [#13688](https://codecov.io/gh/apache/superset/pull/13688?src=pr&el=desc) (53061bf) into [master](https://codecov.io/gh/apache/superset/commit/adc247b7e4fade7ef0d68cb07df5e3aa6bf9a677?el=desc) (adc247b) will **decrease** coverage by `4.49%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 53061bf differs from pull request most recent head 52389ef. Consider uploading reports for the commit 52389ef to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13688/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13688?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13688      +/-   ##
   ==========================================
   - Coverage   77.40%   72.90%   -4.50%     
   ==========================================
     Files         924      612     -312     
     Lines       46863    21851   -25012     
     Branches     5657     5707      +50     
   ==========================================
   - Hits        36272    15931   -20341     
   + Misses      10455     5783    -4672     
   - Partials      136      137       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.58% <100.00%> (-0.01%)` | :arrow_down: |
   | hive | `?` | |
   | javascript | `63.15% <42.85%> (+<0.01%)` | :arrow_up: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `?` | |
   | python | `?` | |
   | sqlite | `?` | |
   
   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/13688?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...et-frontend/src/dashboard/actions/nativeFilters.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL25hdGl2ZUZpbHRlcnMudHM=) | `60.00% <ø> (-4.11%)` | :arrow_down: |
   | [superset-frontend/src/dataMask/actions.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL2FjdGlvbnMudHM=) | `75.00% <ø> (ø)` | |
   | [...d/components/nativeFilters/FilterBar/FilterBar.tsx](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlckJhci50c3g=) | `92.42% <100.00%> (+0.55%)` | :arrow_up: |
   | [superset-frontend/src/dataMask/reducer.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL3JlZHVjZXIudHM=) | `100.00% <100.00%> (ø)` | |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset-frontend/src/filters/utils.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvdXRpbHMudHM=) | `50.94% <0.00%> (-37.95%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `52.30% <0.00%> (-27.18%)` | :arrow_down: |
   | [superset-frontend/src/utils/common.js](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2NvbW1vbi5qcw==) | `65.88% <0.00%> (-21.40%)` | :arrow_down: |
   | [...nd/src/filters/components/Select/transformProps.ts](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHJhbnNmb3JtUHJvcHMudHM=) | `75.00% <0.00%> (-10.72%)` | :arrow_down: |
   | ... and [314 more](https://codecov.io/gh/apache/superset/pull/13688/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13688?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/13688?src=pr&el=footer). Last update [adc247b...52389ef](https://codecov.io/gh/apache/superset/pull/13688?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] simcha90 commented on a change in pull request #13688: fix(native-filters): fix removing native filter

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13688:
URL: https://github.com/apache/superset/pull/13688#discussion_r596930885



##########
File path: superset-frontend/src/dataMask/reducer.ts
##########
@@ -28,13 +28,11 @@ import {
   UpdateDataMask,
 } from './actions';
 
-export function getInitialMask(id: string): MaskWithId {
-  return {
-    id,
-    extraFormData: {},
-    currentState: {},
-  };
-}
+export const getInitialMask = (id: string): MaskWithId => ({
+  id,
+  extraFormData: {},
+  currentState: {},
+});

Review comment:
       I just preferred to use arrow functions to save order of functions declarations, but it's not critical, I can revert it
   




----------------------------------------------------------------
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