You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you create a dashboard (or use an example dash) with top-level tabs, and you try to drag a chart to another tab, the chart goes INTO the tab bar, which doesn't work at all. It seems to work fine with tab sets that are IN the dashboard.
How to reproduce the bug
Open the example sales dash
Go into edit mode
Drag any chart onto one of the tabs you're not on
Hilarity ensues
Screenshots/recordings
May-09-2024.16-52-01.mp4
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
I have searched Superset docs and Slack and didn't find a solution to my problem.
I have searched the GitHub issue tracker and didn't find a similar bug report.
I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
The text was updated successfully, but these errors were encountered:
To address the issue where dragging a chart onto a top-level tab in Apache Superset's dashboard edit mode incorrectly creates a new tab, you'll need to modify the logic that handles drop actions. This involves adjusting the newEntitiesFromDrop function within superset-frontend/src/dashboard/util/newEntitiesFromDrop.js to ensure that when a chart is dropped onto a top-level tab, it is added to the tab's content rather than creating a new, broken tab.
Here's a concise approach to fix this:
Conditionally Handle Drops on Top-Level Tabs: Implement a condition in the newEntitiesFromDrop function to check if the drop target is a top-level tab. If so, the logic should be tailored to add the dropped chart directly to the tab's content.
Adjust the Logic for Adding to Tabs: Modify the function to prevent it from creating a new tab when a chart is dropped onto a top-level tab. Instead, ensure the chart is added as a child of the tab's content.
Ensure Correct Update of Children: Make sure the nextDropChildren array is correctly updated to reflect the addition of the new chart to the selected tab's content, maintaining the intended layout and functionality.
Thorough Testing: After making these changes, it's crucial to test the drag-and-drop functionality in various scenarios to ensure the dashboard behaves as expected without introducing new issues.
This solution requires familiarity with the Superset codebase and JavaScript. If you're not comfortable making these changes, consider reaching out to a developer with experience in Superset development.
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
Bug description
Well this is weird...
If you create a dashboard (or use an example dash) with top-level tabs, and you try to drag a chart to another tab, the chart goes INTO the tab bar, which doesn't work at all. It seems to work fine with tab sets that are IN the dashboard.
How to reproduce the bug
Screenshots/recordings
May-09-2024.16-52-01.mp4
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: