-
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
[Lens] fix redirect after reload #66328
[Lens] fix redirect after reload #66328
Conversation
… from the url when the app starts and tracked as part of the state
Pinging @elastic/kibana-app (Team:KibanaApp) |
const originatingApp = urlParams.embeddableOriginatingApp; | ||
const originatingAppFromUrl = urlParams.embeddableOriginatingApp; | ||
if (urlParams.embeddableOriginatingApp) { | ||
setTimeout(() => { |
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.
Why do we need to get async here?
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.
This used to be needed due to the url change and the render method creating an infinite loop. This is no longer necessary, so it's been removed!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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 firefox and works fine, after a reload Lens doesn't attempt to redirect back to the dashboard - without redirect it still works fine. Discussed the approach offline and it is a good approach as a temporary workaround (will ultimately replaced by using state
of the history). LGTM
Changed the way the lens app tracks originatingApp. It is now removed from the url when the app starts and is tracked as part of the state
Summary
The 'originatingApp' param persisting after a refresh in 7.8 caused a serious issue when redirecting back to dashboard.
Fixes #66304
Note
This is a temporary fix. Soon all of the navigation behavior via query params between dashboard, lens, and visualize will be removed and replaced with
application.navigateTo(appId, state)
in a follow up PR for 7.x after #63443Checklist
Delete any items that are not applicable to this PR.
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibility- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser- [ ] This was checked for cross-browser compatibility, including a check against IE11For maintainers