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

[Lens] fix redirect after reload #66328

Merged
merged 8 commits into from
May 14, 2020

Conversation

ThomThomson
Copy link
Contributor

@ThomThomson ThomThomson commented May 12, 2020

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 #63443

Checklist

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 IE11

For maintainers

@ThomThomson ThomThomson requested a review from a team May 12, 2020 22:47
@ThomThomson ThomThomson added Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.8.0 labels May 12, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

const originatingApp = urlParams.embeddableOriginatingApp;
const originatingAppFromUrl = urlParams.embeddableOriginatingApp;
if (urlParams.embeddableOriginatingApp) {
setTimeout(() => {
Copy link
Contributor

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?

Copy link
Contributor Author

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!

@ThomThomson ThomThomson added v7.9.0 and removed v7.8.0 labels May 13, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@flash1293 flash1293 left a 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

@ThomThomson ThomThomson merged commit 28623ad into elastic:master May 14, 2020
ThomThomson added a commit to ThomThomson/kibana that referenced this pull request May 14, 2020
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
ThomThomson added a commit that referenced this pull request May 14, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.8.0 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Redirect after reload breaks Dashboard
4 participants