rusackas opened a new pull request #15650:
URL: https://github.com/apache/superset/pull/15650


   ### SUMMARY
   Fixes a bug where some tabs couldn't be deleted due to native filters that 
point to no-longer existing charts within the tab.
   
   This PR fixes the acute issue, but there's room for improvement! Whenever a 
chart is removed, we should
   1) confirm that no filter is scoped to that missing chart any longer.
   2) (optional) if the filter no longer has ANY charts within scope, we could 
ask the user if they want to delete it.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   Before:
   
![before](https://user-images.githubusercontent.com/812905/125387559-5d31b580-e35b-11eb-82a7-eb54af3fa94f.gif)
   
   After:
   
![After](https://user-images.githubusercontent.com/812905/125387575-628f0000-e35b-11eb-9f80-5a17ed4a6c87.gif)
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   To repro the issue (prior to this PR):
   
   1) Make a dashboard
   2) Add tabs
   3) Add a chart to a tab (I just used a table)
   4) Add a native filter scoped to that chart.
   5) (Problem 1) Try to delete the tab containing the chart with the scoped 
filter. You get an ugly error.
   6) Remove the chart with the scoped filter, optionally saving the dash
   7) (Problem 2) Try to delete the tab again. Even with the chart gone, you 
still can't remove the tab.
   
   With this PR, you should be able to remove the tab _with or without_ the 
chart.
   
   ### 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to