-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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(explore): chart link is broken without localStorage #21707
fix(explore): chart link is broken without localStorage #21707
Conversation
result.form_data, | ||
dashboardContextFormData, | ||
) | ||
: result.form_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be merged into getFormDataWithDashboardContext
? Basically make the second parameter nullable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather to keep this way because using getFormDataWithDashboardContext
without dashboardContent seems odd.
Codecov Report
@@ Coverage Diff @@
## master #21707 +/- ##
=======================================
Coverage 66.85% 66.85%
=======================================
Files 1799 1799
Lines 68875 68875
Branches 7319 7320 +1
=======================================
Hits 46044 46044
Misses 20944 20944
Partials 1887 1887
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SUMMARY
Addition to #21422 issue
"Edit chart" from dashboard may not work if the dashboard context is not found in localStorage.
It's specially missing
filterBox
metadata due to the lack of exploreFormData mapping in mergeFilterBoxToFormData.This could happen when users either don't have localStorage enabled in there browser (unlikely) or copied the link in the different browser.
This commit fixes this issue by using the original explore formData if dashboardContextFormData is empty.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
cc: @ktmud