Skip to content

Conversation

@richardfogaca
Copy link
Contributor

SUMMARY

Fixes a bug where the "Save and go to dashboard" option becomes disabled after changing a chart's visualization type.

The Problem:
When a user opens a chart from a dashboard and changes its visualization type (e.g., Line Chart → Bar Chart), the dashboard context is lost. The Save modal then shows a placeholder "Select a dashboard OR create a new one" instead of the actual dashboard name, and the "Save & go to dashboard" option becomes disabled.

Root Cause:
The dashboardId field was being dropped during the form data transformation process when switching visualization types. This happened in standardizedFormData.ts where:

  • dashboardId is not a form control, it's just a regular field that stores the dashboard context
  • When getFormDataFromControls() builds the new form data, it only includes fields that have corresponding controls
  • The dashboardId wasn't in the publicControls array (fields that should be preserved across viz changes)
  • Even though public form data was collected, it was being overwritten instead of preserved

The Fix:
Two small changes to superset-frontend/src/explore/controlUtils/standardizedFormData.ts:

  1. Added dashboardId to the publicControls array so it gets collected during transformations
  2. Spread publicFormData after getFormDataFromControls() so the dashboard context is preserved and not overwritten

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE: After changing chart type, Save modal shows "Select a dashboard OR create a new one" and "Save & go to dashboard" is disabled and nothing shows on "Add to dashboard" field
Interactive Pivot Table 2025-11-12 22-38-23 (1)

AFTER: Save modal correctly displays the dashboard name and "Save & go to dashboard" remains enabled and "Add to dashboard" field shows the proper content
Screenshot 2025-11-14 at 16 59 46

TESTING INSTRUCTIONS

  1. Open a dashboard and click into one of its charts to open Explore view
  2. Click Save and verify the dashboard name appears with "Save & go to dashboard" enabled (don't actually save)
  3. Change the chart type to a different visualization (e.g., Line → Bar)
  4. Click Save again
  5. Verify the dashboard name still appears and "Save & go to dashboard" is still enabled

ADDITIONAL INFORMATION

  • Changes UI

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Nov 14, 2025

Code Review Agent Run #5967e5

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 1293d84..1293d84
    • superset-frontend/src/explore/controlUtils/standardizedFormData.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've completed my review and didn't find any issues.

Files scanned
File Path Reviewed
superset-frontend/src/explore/controlUtils/standardizedFormData.ts

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@dosubot dosubot bot added change:frontend Requires changing the frontend explore:control Related to the controls panel of Explore labels Nov 14, 2025
Copy link
Contributor

@EnxDev EnxDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add some tests for this fix?

@richardfogaca
Copy link
Contributor Author

Suggestions applied and tests added, thanks @alexandrusoare @EnxDev

@EnxDev EnxDev added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Nov 18, 2025
@github-actions github-actions bot added 🎪 141edc3 🚦 building Environment 141edc3 status: building 🎪 141edc3 📅 2025-11-18T08-24 Environment 141edc3 created at 2025-11-18T08-24 🎪 141edc3 ⌛ 48h Environment 141edc3 expires after 48h 🎪 141edc3 🤡 EnxDev Environment 141edc3 requested by EnxDev and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Nov 18, 2025
@github-actions
Copy link
Contributor

🎪 Showtime is building environment on GHA for 141edc3

@github-actions github-actions bot added 🎪 141edc3 🚦 deploying Environment 141edc3 status: deploying 🎪 141edc3 🚦 running Environment 141edc3 status: running 🎪 🎯 141edc3 Active environment pointer - 141edc3 is receiving traffic 🎪 141edc3 🌐 52.37.62.176:8080 Environment 141edc3 URL: http://52.37.62.176:8080 (click to visit) and removed 🎪 141edc3 🚦 building Environment 141edc3 status: building 🎪 141edc3 🚦 deploying Environment 141edc3 status: deploying 🎪 141edc3 🚦 running Environment 141edc3 status: running 🎪 🎯 141edc3 Active environment pointer - 141edc3 is receiving traffic labels Nov 18, 2025
@github-actions
Copy link
Contributor

🎪 Showtime deployed environment on GHA for 141edc3

Environment: http://52.37.62.176:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

Copy link
Contributor

@EnxDev EnxDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@EnxDev EnxDev merged commit a9fd600 into apache:master Nov 18, 2025
72 checks passed
@sadpandajoe sadpandajoe added the v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch label Nov 18, 2025
sadpandajoe pushed a commit that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend explore:control Related to the controls panel of Explore size/M v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch 🎪 141edc3 🤡 EnxDev Environment 141edc3 requested by EnxDev 🎪 141edc3 🚦 running Environment 141edc3 status: running 🎪 141edc3 ⌛ 48h Environment 141edc3 expires after 48h 🎪 141edc3 🌐 52.37.62.176:8080 Environment 141edc3 URL: http://52.37.62.176:8080 (click to visit) 🎪 141edc3 📅 2025-11-18T08-24 Environment 141edc3 created at 2025-11-18T08-24

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants