elastic / kibana

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

[new-platform] Decouple ui/chrome from angular #34091

Closed joshdover closed 5 years ago

joshdover commented 5 years ago

We need to decouple all the functionality that ui/chrome provides via Angular. This includes:

In addition, we need to remove the angular bootstrapping code from chrome and into each application plugin. This will enable applications that do not require angular to completely decouple themselves from it once the new platform provides an Application Service for loading apps (#18843).

This issue will be fleshed out further and broken down as I dive into ui/chrome to identify the major pieces that need to be removed and how that will need to be coordinated across the project.

There are also a few non-angular APIs still provided by the legacy chrome that need to moved over to the new platform (#20696). This may or may not be coupled to this effort.

Execution Plan

elasticmachine commented 5 years ago

Pinging @elastic/kibana-platform

joshdover commented 5 years ago

Categories of Angular things in ui/chrome

Here I've done a deep dive into all the things that ui/chrome does. I'm sharing this to help clarify what's going on with others. In a follow up, I'll start to put together a plan of how we tackle this.

I'll try to keep this up to date as I learn more, but you can also follow along here.

Static config

Global angular setup/configuration

UI

Bootstrapping

Entry point flow

chrome.dangerouslyGetActiveInjector

Shimmed APIs

APIs that are powered by Core, but exposed to the legacy platform through ui/chrome need to be removed by refactoring legacy plugins to import them from ui/new_platform.

This is non-critical for getting rid of Angular, but is needed to get rid of this module completely.

joshdover commented 5 years ago

For many of the static values provided via .value('settingName'), we will need a config service in the client-side new platform so that Angular apps that need it can import them from somewhere.

joshdover commented 5 years ago

Most of this has been completed and there's a lot of overlap now with this and the plans in https://github.com/elastic/kibana/issues/18843. Closing.