Closed joshdover closed 5 years ago
Pinging @elastic/kibana-platform
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.
ui/registry/chrome_nav_controls
registry to decouple from Angular. This is only used a handful of places so this shouldn't be too bad.kbn-chrome
directive provides a lot of functionality that needs to be removed or copied to plugins:
uiExports.app.main
)
template
that gets injected into the ng-view along with a controller. This entry point would also import any uiExport modules.chrome.setRootTemplate
. Optionally, the app could also call chrome.setRootController
. Some React apps then poll for when the root template has been inserted into the DOM and then grab a DOM element to use to boot their React app.uiExports/chromeNavControls
, require uiExports/hacks
, create global angular module (called "kibana"), call angular.bootstrap(targetDomElement, ['kibana']);
kbn-chrome
directive which either:
ng-view
with the root template if chrome.setRootTemplate
was called; orAPIs 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.
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.
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.
We need to decouple all the functionality that ui/chrome provides via Angular. This includes:
kibana
angular modulekibana
angular moduleIn 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