elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.72k stars 8.14k forks source link

Allow the mounted dev tool to prompt a confirm message before leaving #54432

Open flash1293 opened 4 years ago

flash1293 commented 4 years ago

https://github.com/elastic/kibana/pull/54221 adds the functionality to mounted apps to prompt a confirm message before getting unmounted. As the dev tools API currently re-uses the mount callback interface of applications (https://github.com/elastic/kibana/blob/master/src/plugins/dev_tools/public/plugin.ts#L66), dev tools will also have access to a onAppLeave method in the params of the mount function.

In the PR linked above this is solved by implementing the method as a no-op which is confusing because people could accidentally use it. I see two options to resolve this:

What do you think, @elastic/es-ui team?

jloleysens commented 4 years ago

@flash1293 Thanks for raising this!

I can definitely see this being useful for Console once we are saving text remote. Future work enabled by: https://github.com/elastic/kibana/pull/52402

In that case we can check if we are saving (or haven't been able to save) and prompt the user before leaving Console.

elasticmachine commented 5 days ago

Pinging @elastic/kibana-management (Team:Kibana Management)