-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Adding new visualization when session storage enabled #73353
[fix] Adding new visualization when session storage enabled #73353
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
Tested in Chrome and Firefox, adding and editing Lens and Visualize panels works fine with session storage enabled.
Once #65614 is closed, and angular routing is removed from dashboard, the location state should no longer be cleared.
Are you sure about that? We are using hash history outside of Angular as well for the state syncing, it probably has the same issue of losing the incoming state.
One reason more to switch away from hash routing completely soon in the near future :)
A cursory look into lens and the deangularized visualize suggested that they didn't suffer from the same problem, but I've done a bit more digging, and it looks like you're right @flash1293. This shows the problem showing up in visualize: Longer term, is the goal to move towards browser history? Is there an issue set up to track this? If not, I am wondering if we should consider session storage as a more stable alternative for the state transfer service. |
@ThomThomson There is a toplevel issue here: #67470 |
💔 Build Failed
Failed CI StepsTest FailuresKibana Pipeline / x-pack-intake-agent / X-Pack Jest Tests.x-pack/plugins/uptime/public/components/common/charts/__tests__.PingHistogram component renders the component without errorsStandard Out
Stack Trace
Build metricspage load bundle size
History
To update your PR or re-run it, just comment with: |
Summary
Closes #73013
The above issue was caused by the conflict between
browserHistory
andhashHistory
, where subscribing tohashHistory
clears thehistory.location.state
. The following code sandbox illustrates the problem.When store in session storage is enabled, the location state is cleared prior to the creation of the dashboard container, which resulted in no embeddable being added.
Once #65614 is closed, and angular routing is removed from dashboard, the location state should no longer be cleared.Once we have switched away from using hash routing #67470, this issue should be resolved.
In the meantime, this workaround loads the
incomingEmbeddable
much earlier in thedashboard_app_controller
's constructor.For maintainers