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 2022/04/28 22:21:21 UTC

[GitHub] [superset] diegomedina248 opened a new pull request, #19889: fix: Fix auto-reversion of label/title in the Metrics popover

diegomedina248 opened a new pull request, #19889:
URL: https://github.com/apache/superset/pull/19889

   ### SUMMARY
   When editing a metric in the Explore, the title label that's automatically set when using the Custom SQL mode gets reset if you hover over it/change tabs/interact with the popover.
   
   The reason is because the component is always being rerender, and in that case, the metric get's a new id and the label state is lost.
   
   This PR caches the metric component so that it only rerenders when needed.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before:
   
   https://user-images.githubusercontent.com/17252075/165856997-4b41bc4b-271e-45d9-9f1c-0b255aad68fc.mov
   
   After:
   
   https://user-images.githubusercontent.com/17252075/165857046-6dfae7b9-25bc-4393-bb75-6e0e1d478a4e.mov
   
   ### TESTING INSTRUCTIONS
   1. Select any chart to Explore
   2. Drag a new metric/edit an existing one
   3. Go to Custom SQL mode
   4. Enter any custom SQL
   
   Ensure the title changes to match the sql entered.
   Ensure hovering the title doesn't reset it.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] github-actions[bot] commented on pull request #19889: fix: Fix auto-reversion of label/title in the Metrics popover

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #19889:
URL: https://github.com/apache/superset/pull/19889#issuecomment-1119250886

   Ephemeral environment shutdown and build artifacts deleted.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] github-actions[bot] commented on pull request #19889: fix: Fix auto-reversion of label/title in the Metrics popover

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #19889:
URL: https://github.com/apache/superset/pull/19889#issuecomment-1117882669

   @rusackas Ephemeral environment spinning up at http://18.236.70.234:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] rusackas merged pull request #19889: fix: Fix auto-reversion of label/title in the Metrics popover

Posted by GitBox <gi...@apache.org>.
rusackas merged PR #19889:
URL: https://github.com/apache/superset/pull/19889


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 #19889: fix: Fix auto-reversion of label/title in the Metrics popover

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/19889?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 [#19889](https://codecov.io/gh/apache/superset/pull/19889?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2ec8bfd) into [master](https://codecov.io/gh/apache/superset/commit/d5ea537b0eb3e102677d63811b99cf2c4b31a3ab?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d5ea537) will **increase** coverage by `0.06%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 2ec8bfd differs from pull request most recent head c3e4e5d. Consider uploading reports for the commit c3e4e5d to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19889      +/-   ##
   ==========================================
   + Coverage   66.46%   66.53%   +0.06%     
   ==========================================
     Files        1714     1714              
     Lines       65031    65033       +2     
     Branches     6716     6717       +1     
   ==========================================
   + Hits        43224    43269      +45     
   + Misses      20100    20057      -43     
     Partials     1707     1707              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.27% <100.00%> (+0.02%)` | :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/19889?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...hart-echarts/src/MixedTimeseries/transformProps.ts](https://codecov.io/gh/apache/superset/pull/19889/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvTWl4ZWRUaW1lc2VyaWVzL3RyYW5zZm9ybVByb3BzLnRz) | `0.00% <ø> (ø)` | |
   | [...gin-chart-echarts/src/Timeseries/transformProps.ts](https://codecov.io/gh/apache/superset/pull/19889/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy90cmFuc2Zvcm1Qcm9wcy50cw==) | `57.89% <ø> (ø)` | |
   | [...lugin-chart-echarts/src/Timeseries/transformers.ts](https://codecov.io/gh/apache/superset/pull/19889/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy90cmFuc2Zvcm1lcnMudHM=) | `51.63% <100.00%> (+0.39%)` | :arrow_up: |
   | [...controls/DndColumnSelectControl/DndSelectLabel.tsx](https://codecov.io/gh/apache/superset/pull/19889/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZFNlbGVjdExhYmVsLnRzeA==) | `75.00% <100.00%> (+2.27%)` | :arrow_up: |
   | [...c/views/CRUD/data/database/DatabaseModal/index.tsx](https://codecov.io/gh/apache/superset/pull/19889/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL2luZGV4LnRzeA==) | `32.51% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/19889/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=) | `89.33% <0.00%> (+0.23%)` | :arrow_up: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/19889/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==) | `90.04% <0.00%> (+1.01%)` | :arrow_up: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/19889/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==) | `88.70% <0.00%> (+4.72%)` | :arrow_up: |
   | [...rols/MetricControl/AdhocMetricEditPopoverTitle.jsx](https://codecov.io/gh/apache/superset/pull/19889/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljRWRpdFBvcG92ZXJUaXRsZS5qc3g=) | `72.00% <0.00%> (+12.00%)` | :arrow_up: |
   | [...ntrols/MetricControl/AdhocMetricPopoverTrigger.tsx](https://codecov.io/gh/apache/superset/pull/19889/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljUG9wb3ZlclRyaWdnZXIudHN4) | `83.78% <0.00%> (+13.51%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19889?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/19889?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 [d5ea537...c3e4e5d](https://codecov.io/gh/apache/superset/pull/19889?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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] rusackas commented on pull request #19889: fix: Fix auto-reversion of label/title in the Metrics popover

Posted by GitBox <gi...@apache.org>.
rusackas commented on PR #19889:
URL: https://github.com/apache/superset/pull/19889#issuecomment-1117879360

   /testenv up


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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