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

[Bug] NP apps are always unmounted when back button is pressed #53835

Closed
Dosant opened this issue Dec 30, 2019 · 2 comments · Fixed by #53851
Closed

[Bug] NP apps are always unmounted when back button is pressed #53835

Dosant opened this issue Dec 30, 2019 · 2 comments · Fixed by #53851
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:New Platform Feature:StateManagement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@Dosant
Copy link
Contributor

Dosant commented Dec 30, 2019

Summary

Kibana version: 8.0.0

While digging into new state management utils #53582 I bumped into following issue in an example np app I created. The app uses react-router and has internal routing setup. I noticed that when trying to use a back button, the app always gets completely unmounted and then mounted again. I suspect, that the bug is somewhere inside platform code, where routing between apps is setup.

This causes unexpected component unmounts and internal component state will be lost.

Current behaviour: Pressing back button inside np apps always unmounts the whole app and mounts it again.
Expected behaviour: If after history navigation user stays within the same app, platform shouldn't unmount it and mount again, but should leave control to the application itself.

Also noticed another strange side effect:
If internal app uses hash history, then any change to hash causes the app to unmount and mount again

I reverted my branch #53582 to last Friday and it isn't reproduce. It seems that this behaviour could be caused by:
#52161

Reproduction

Video: https://drive.google.com/open?id=1ZSVKIjWkwCkwLVhOMeAZSxqUv1C_8l2_
To run the same and to see code it's: #53582

@Dosant Dosant added Feature:StateManagement bug Fixes for quality problems that affect the customer experience Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Dec 30, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@Dosant
Copy link
Contributor Author

Dosant commented Dec 30, 2019

Also, similar bug, likely caused by the same reason:
If internal app uses hash history, then any change to hash causes the app to unmount and mount again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:New Platform Feature:StateManagement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants