-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Motivation
Currently, after saving a dashboard as a new one, users remain on the original dashboard, which creates confusion about whether the save operation succeeded and requires manual navigation to find the newly created dashboard.
Current Behavior
After using the "Save as" feature to create a new dashboard, the user remains on the original dashboard. The URL does not change, and there is no automatic navigation to the newly created dashboard, even though the save operation completes successfully and shows a success toast message.
Reproduction Steps:
- Navigate to the Dashboards list page
- Open any existing dashboard
- Click on the three-dot menu in the dashboard header
- Select "Save as" from the dropdown menu
- Enter a new name for the dashboard in the modal
- Click the "Save" button
- Observe: A success toast appears indicating the dashboard was saved, but the URL remains unchanged and you are still viewing the original dashboard instead of the newly created one
Expected Behavior
After successfully saving a dashboard using "Save as", the application should automatically navigate the user to the newly created dashboard. The URL should update to reflect the new dashboard's ID, and the user should see the new dashboard loaded in the browser.
Acceptance Criteria:
- After clicking "Save" in the "Save as" dialog, the browser navigates to the new dashboard URL
- The URL updates to
/superset/dashboard/{new_dashboard_id}/where{new_dashboard_id}is the ID of the newly created dashboard - The newly created dashboard is loaded and displayed to the user
- Existing tests continue to pass and new test coverage is added for this navigation behavior
- The "Save" and "Save as overwrite" operations continue to work as before without unwanted navigation
Steps To Test
- Navigate to the Dashboards page and open an existing dashboard
- Click the three-dot menu and select "Save as"
- Enter a new name and click "Save"
- Verify that the URL changes to show the new dashboard ID (e.g.,
/superset/dashboard/123/changes to/superset/dashboard/456/) - Verify that the new dashboard is loaded and displayed
- Run the test suite for dashboard actions:
npm test -- dashboardState.test.js - Verify all tests pass, including any new tests for the navigation behavior
- Test that regular "Save" operations (overwrite) still work correctly without unexpected navigation
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx