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/06/04 11:59:09 UTC

[GitHub] [superset] kgabryje opened a new pull request #14984: fix(native-filters): Fix "undefined" error after editing a filter

kgabryje opened a new pull request #14984:
URL: https://github.com/apache/superset/pull/14984


   ### SUMMARY
   We calculate `chartsInScope` and `tabsInScope` of native filters on first render and recalculate them only when filter's scope or dashboard's layout changes. When user edited a filter without changing it's scope, `chartsInScope` and `tabsInScope` were being set to undefined, which was causing an caused an error described in https://github.com/apache/superset/issues/14975#event-4842446546.
   This PR fixes it by merging edited filter into the old filter rather than overriding it. Since the edited filter object has exactly the same fields as the old filter except `chartsInScope` and `tabsInScope`, what really happens is that we override the old filter and add `chartsInScope` and `tabsInScope` fields.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: See linked issue
   After:
   https://user-images.githubusercontent.com/15073128/120797636-97c65800-c53c-11eb-96ac-8c34f35bb801.mov
   
   ### TESTING INSTRUCTIONS
   0. Enable `DASHBOARD_NATIVE_FILTERS` feature flag
   1. Add a native filter
   2. Click on the filter and verify that tabs and charts in scope get highlighted
   3. Edit the filter without changing it's scope
   4. Verify that charts and tabs still get highlighted when you focus on the filter
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: https://github.com/apache/superset/issues/14975#event-4842446546
   - [ ] 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
   
   CC: @junlincc @villebro 


-- 
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 merged pull request #14984: fix(native-filters): Fix "undefined" error after editing a filter

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


   


-- 
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 #14984: fix(native-filters): Fix "undefined" error after editing a filter

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/14984?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#14984](https://codecov.io/gh/apache/superset/pull/14984?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9884e86) into [master](https://codecov.io/gh/apache/superset/commit/61a438a0cd6992e7e1fdc32e20062c6a2c8627e2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (61a438a) will **increase** coverage by `0.08%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 9884e86 differs from pull request most recent head ef2f0e2. Consider uploading reports for the commit ef2f0e2 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/14984/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/14984?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #14984      +/-   ##
   ==========================================
   + Coverage   77.53%   77.62%   +0.08%     
   ==========================================
     Files         965      965              
     Lines       49504    49509       +5     
     Branches     6259     6260       +1     
   ==========================================
   + Hits        38384    38430      +46     
   + Misses      10920    10879      -41     
     Partials      200      200              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `72.49% <100.00%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/14984?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rontend/src/filters/components/Range/buildQuery.ts](https://codecov.io/gh/apache/superset/pull/14984/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9SYW5nZS9idWlsZFF1ZXJ5LnRz) | `40.00% <ø> (ø)` | |
   | [...ontend/src/filters/components/Select/buildQuery.ts](https://codecov.io/gh/apache/superset/pull/14984/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvYnVpbGRRdWVyeS50cw==) | `100.00% <ø> (ø)` | |
   | [...et-frontend/src/dashboard/actions/nativeFilters.ts](https://codecov.io/gh/apache/superset/pull/14984/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL25hdGl2ZUZpbHRlcnMudHM=) | `82.69% <100.00%> (+1.84%)` | :arrow_up: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/14984/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `90.00% <0.00%> (+0.26%)` | :arrow_up: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/14984/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `89.81% <0.00%> (+1.42%)` | :arrow_up: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/14984/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `90.31% <0.00%> (+5.89%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/14984?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/14984?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [61a438a...ef2f0e2](https://codecov.io/gh/apache/superset/pull/14984?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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