superset icon indicating copy to clipboard operation
superset copied to clipboard

Unable to Delete Tabs

Open benleibert opened this issue 7 years ago • 13 comments

Make sure these boxes are checked 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.

Superset version

0.28.0

Expected results

Deleting a tab via Superset's UI should work.

Actual results

Attempting to delete a tab results in disappearance of the the parent dashboard along with JavaScript errors. Navigating to the dashboard via a second browser window reveals that the dashboard remains intact but, unfortunately, includes the tab intended for deletion. There therefore appears to be no way to delete a tab.

The behavior seems to occur regardless of the tab's relative position to any others, whether or not it contains nested UI elements.

Steps to reproduce

The following steps have been followed using the latest versions of both Chrome and Firefox.

  1. Navigate to a dashboard which contains tabs.
  2. Click "Edit Dashboard."
  3. Click on the title of a tab and then click the trash icon which appears near it.
  4. Click "Delete" within the subsequent modal.
  5. Observe that the dashboard disappears. (To an end user, this is pretty alarming. It seems as though they've inadvertently deleted the entire dashboard rather than a single tab.)
  6. Note that, as shown in the screenshot below, JavaScript errors are logged to the console.

2019-01-07_11-40-19

benleibert avatar Jan 07 '19 19:01 benleibert

I could not reproduce this on master...

mistercrunch avatar Jan 07 '19 21:01 mistercrunch

@benleibert Try clean up site data, like local storage. maybe some help

zhaoyongjie avatar Jan 08 '19 14:01 zhaoyongjie

Hi @mistercrunch and @zhaoyongjie. Thank you very much for trying to reproduce it and for the guidance. Unfortunately, I've tried clearing cached data to no avail. I can reproduce the issue consistently and would be glad to share my screen to let you explore in real-time if you think it may be helpful.

benleibert avatar Jan 08 '19 17:01 benleibert

Can you reproduce it on master or 0.29.0rc7?

mistercrunch avatar Jan 08 '19 20:01 mistercrunch

BTW clearing the local storage should lead to loosing all tabs / state for SQL Lab

mistercrunch avatar Jan 08 '19 20:01 mistercrunch

Thank you for the heads-up, @mistercrunch. Although it may take me some time to setup an alternate instance (such as master or 0.29.0rc7) with which to test, I'd certainly be glad to do so when able.

benleibert avatar Jan 08 '19 21:01 benleibert

I remember this bug as we also ran into it, I believe it was fixed in master a month ago or so.

villebro avatar Jan 09 '19 20:01 villebro

hi @benleibert this js error reminds me one thing: is your dashboard saved correctly? Superset serialize dashboard layout data as a big json and saved with dashboard's metadata, you can see it from dashboard/show/_id_. can you check if Position JSON section is a valid json blob?

graceguo-supercat avatar Jan 09 '19 22:01 graceguo-supercat

Thank you very much @villebro - that's good to know!

Thank you as well, @graceguo-supercat, for your guidance. I checked the "Position JSON" and found it to be well formatted.

benleibert avatar Jan 09 '19 23:01 benleibert

On a very semi-related note, @mistercrunch, do you happen to have a rough idea of when the team is likely to release next? Our users can definitely live with the extra tab. Issue 6491 is painful for them, though, and I'm hesitant to use a release-candidate for production.

(Of course, no pressure, and thank you for such an awesome project! : )

benleibert avatar Jan 10 '19 03:01 benleibert

I dug around our slack and was able to find a reference to the PR (not sure why I wasn't able to find it using github's search..): #6393

villebro avatar Jan 10 '19 07:01 villebro

Awesome! Thank you @villebro for the reference and @graceguo-supercat for the fix!

benleibert avatar Jan 10 '19 07:01 benleibert

😄I knew i have seen this error before.

graceguo-supercat avatar Jan 11 '19 19:01 graceguo-supercat