-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix add to dashboard after saving (with unit tests) #9072
base: main
Are you sure you want to change the base?
Fix add to dashboard after saving (with unit tests) #9072
Conversation
Signed-off-by: Nick Steinbaugh <[email protected]>
Signed-off-by: Tony Lee <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9072 +/- ##
=======================================
Coverage 60.85% 60.85%
=======================================
Files 3808 3808
Lines 91159 91164 +5
Branches 14393 14394 +1
=======================================
+ Hits 55478 55482 +4
Misses 32139 32139
- Partials 3542 3543 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Tony Lee <[email protected]>
Signed-off-by: Tony Lee <[email protected]>
Signed-off-by: Tony Lee <[email protected]>
@ananzh @abbyhu2000 This PR should be ready for review. I am seeing some test failure and security check failure. Please advise how to proceed from here. Thank you for your help!! |
Description
When creating a new visualization from a dashboard, and saving it with the "Add to Dashboards after saving" toggle checked, adding the newly saved visualization to the dashboard can fail. This is easily reproducible when
storeInSessionStorage
is enabled.The way it is supposed to work is that the
scopedHistory
receives the ID of the newly create visualization in the current location state, and the dashboard container uses that to add the visualization. However, when the dashboard application state is created, it can update the URL at startup, which causes the location state to be lost. This fix preserves the currentscopedHistory
location state across that URL update.original PR:
Issues Resolved
fixes:
Screenshot
N/A
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration