[Discuss][Time to Visualize] Browser / Hash History Conflict #85493
Labels
Feature:Dashboard
Dashboard related features
Project:TimeToVisualize
Team:Presentation
Presentation Team for Dashboard, Input Controls, and Canvas
Problem
In many Kibana apps, two types of histories are used. See #65968 and #67470 for more details. This is normally not a problem, but it causes a number of major issues with the
EmbeddableStateTransfer
service by interfering with thelocation.state
which is used there to transfer state between applications.You can see a demo here
In short, any change to the hash history causes the history state to return to undefined. This has caused a lot of issues for TIme to Visualize:
Lost OriginatingApp on Page Reload
it's the reason the
originatingApp
is lost on page reload in Lens and Visualize #77561 (comment) see point (2.2 & 2.3).Deangularize & New Save Modal Incompatibility
The most recent issue this has caused is a conflict between the Deangularize PR #82909 and the Add To Dashboard from Save Modal PR #83140. The routing changes in the Deangularize PR mean that the incoming Embeddable from the save modal is already cleared before it can be added to the Dashboard.
Solution
Previously, the favoured solution was to wait for the apps to move to Browser history which would solve this problem. With this second issue cropping up, I would now be more in favour of switching the implementation of
EmbeddableStateTransfer
to usesessionStorage
instead of thelocation.state
. This should be a fairly straightforward change and should fix all of the issues without changing the API of the service.The text was updated successfully, but these errors were encountered: