Skip to content

[Discuss][Time to Visualize] Browser / Hash History Conflict #85493

@ThomThomson

Description

@ThomThomson

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 the location.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 use sessionStorage instead of the location.state. This should be a fairly straightforward change and should fix all of the issues without changing the API of the service.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions