Skip to content
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

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

Closed
ThomThomson opened this issue Dec 9, 2020 · 1 comment · Fixed by #85688
Closed

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

ThomThomson opened this issue Dec 9, 2020 · 1 comment · Fixed by #85688
Assignees
Labels
Feature:Dashboard Dashboard related features Project:TimeToVisualize Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@ThomThomson
Copy link
Contributor

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.

@ThomThomson ThomThomson added Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Project:TimeToVisualize labels Dec 9, 2020
@ThomThomson ThomThomson self-assigned this Dec 9, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Project:TimeToVisualize Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants