redash
redash copied to clipboard
Fix: Unable to open large Dashboard in Safari browser
What type of PR is this? (check all applicable)
- [x] Bug Fix
Description
Due to a SecurityError, we are unable to open large dashboards in Safari browser.
For more information, please see this issue. https://github.com/getredash/redash/issues/5333
The reason for this is that the value of parametersChanged
is wrong.
The comparison method is not deep equal, so it almost assigns true.
https://github.com/getredash/redash/blob/v10.0.0-beta/client/app/components/Parameters.jsx#L57
This causes updateUrl
runs frequently.
As a result, history.replaceState
runs frequently.
https://github.com/getredash/redash/blob/v10.0.0-beta/client/app/components/Parameters.jsx#L62-L64
How to Reproduce
- Create a parameter query
- Create a Dashboard
- Put about 40 of the queries in the Dashboard and save them.
- Open the Dashboard in Safari and wait for 10 seconds.
Related Tickets & Documents
https://github.com/getredash/redash/issues/5333
Tested this in my environment, fixes the Safari bug for me!
Encountered this bug. @iwakiriK @susodapop any news regarding fix?
@iwakiriK , thanks for the PR! Same here, we've updated a lot of things now that we're Community-driven so - if you're still interested in getting this merged - would you mind rebasing off master to re-run the CI? We should also address the feedback already given.
We're trying to clean up our PR todo list, so if you're not interested, that's fine - we'll close the PR in about a week if we don't hear back. If you're interested in reopening the PR afterwards, we would also very much welcome that.
Rebased this onto master
branch. Sounds like this PR is only a partial fix though, as per @susodapop's comment + screen recording above.
Codecov Report
Merging #5586 (a9e8e68) into master (9751678) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #5586 +/- ##
=======================================
Coverage 60.70% 60.70%
=======================================
Files 154 154
Lines 12624 12624
Branches 1716 1716
=======================================
Hits 7663 7663
Misses 4735 4735
Partials 226 226