You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "marshallbrekka (via GitHub)" <gi...@apache.org> on 2023/01/28 19:41:54 UTC

[GitHub] [superset] marshallbrekka opened a new issue, #22898: Close/remove button is broken for metrics on chart page

marshallbrekka opened a new issue, #22898:
URL: https://github.com/apache/superset/issues/22898

   The click handler for the button to remove a metric on the chart page is throwing an exception, breaking the ability to remove metrics from a chart.
   
   ```
   Uncaught TypeError: Cannot read properties of undefined (reading 'stopPropagation')
       at yt.onRemoveMetric (AdhocMetricOption.jsx:51:7)
       at onClick (index.tsx:313:11)
       at Object.l (react-dom.production.min.js:14:84)
       at p (react-dom.production.min.js:14:238)
       at react-dom.production.min.js:14:292
       at b (react-dom.production.min.js:15:72)
       at ot (react-dom.production.min.js:52:146)
       at rt (react-dom.production.min.js:51:255)
       at it (react-dom.production.min.js:52:334)
       at ft (react-dom.production.min.js:56:10)
   ```
   
   #### How to reproduce the bug
   
   1. Go to any chart editing page
   2. Click on the "x" on the left side of a metric that is already added to the chart
   4. Check the browsers dev tools/console for the exception
   
   ### Expected results
   
   Metric should be removed from the list
   
   ### Actual results
   
   The metric remains on the chart
   
   #### Screenshots
   <img width="327" alt="Screen Shot 2023-01-28 at 11 31 10 AM" src="https://user-images.githubusercontent.com/436140/215287501-348ee84c-a3d6-4988-b7d0-e696a9514e27.png">
   
   <img width="752" alt="Screen Shot 2023-01-28 at 11 38 12 AM" src="https://user-images.githubusercontent.com/436140/215287516-5ff21bb5-e51a-45f7-a61c-dba23903c655.png">
   
   
   
   ### Environment
   
   (please complete the following information):
   
   
   - browser type and version: Chrome 108
   - superset version: [docker image sha256:ce10634ba3193607cebf8628c4441bffd8a5cee8791b1394e5c5b16046a77ebf](https://hub.docker.com/layers/apache/superset/latest/images/sha256-ce10634ba3193607cebf8628c4441bffd8a5cee8791b1394e5c5b16046a77)
   
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   The [onRemoveMetric](https://github.com/apache/superset/blob/cddc361adc483ed605857a2eb39c5efffa089076/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricOption.jsx#L50-L53) handler expects to be passed the error object
   I believe [this is the PR](https://github.com/apache/superset/pull/22707/files) that introduced the bug, as it changed how the `onRemove` handler is invoked, [no-longer passing the error object](https://github.com/apache/superset/blob/1fe4a71f5be10f182277b6008d212c7f40ced2e4/superset-frontend/src/explore/components/controls/OptionControls/index.tsx#L311-L314)
   
   
   


-- 
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.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] idkm commented on issue #22898: Close/remove button is broken for metrics on chart page

Posted by "idkm (via GitHub)" <gi...@apache.org>.
idkm commented on issue #22898:
URL: https://github.com/apache/superset/issues/22898#issuecomment-1411212632

   Hello Team,
   I have the same error, can you tell me when to expect a fix?


-- 
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] michael-s-molina closed issue #22898: Close/remove button is broken for metrics on chart page

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #22898: Close/remove button is broken for metrics on chart page
URL: https://github.com/apache/superset/issues/22898


-- 
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] idkm commented on issue #22898: Close/remove button is broken for metrics on chart page

Posted by "idkm (via GitHub)" <gi...@apache.org>.
idkm commented on issue #22898:
URL: https://github.com/apache/superset/issues/22898#issuecomment-1412629935

   Thank you Team, now it works as expected. 


-- 
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 issue #22898: Close/remove button is broken for metrics on chart page

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #22898:
URL: https://github.com/apache/superset/issues/22898#issuecomment-1409069709

   Thanks for the report! Pinging @michael-s-molina in regards to his linked PR, and also pinging @kgabryje as a person who often deals with this sort of control input issue, for good measure. Hopefully, we can not just fix this, but also add some tests here to harden this. 


-- 
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] michael-s-molina commented on issue #22898: Close/remove button is broken for metrics on chart page

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #22898:
URL: https://github.com/apache/superset/issues/22898#issuecomment-1412084361

   Thanks for reporting this @marshallbrekka. I linked a PR to fix this bug.


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