Open Dosant opened 3 years ago
Initially I've started extracting KbnPageTemplate
into a package addressing any issues that would come up in the processing. https://github.com/elastic/kibana/pull/114129. When I was almost finished I decided to hold off realizing that this might not be the best candidate for a package:
I think instead of moving this to a package, we should leave this in a plugin for now and just wrap it into Lazy wrapper to reduce initial bundle size.
jfyi @cchaos
I will extract some simpler component from kibana_react
and will merge any tooling change we did in https://github.com/elastic/kibana/pull/114129 and this will be a good example of moving UI code from plugin to a package
I created https://github.com/elastic/kibana/issues/115595 to track the work of moving split_panel
into console
. We'll work on this for 8.1.
exit_full_screen_button is also used in maps. Updating table to reflect this
part of https://github.com/elastic/kibana/issues/112832
kibana_react
is under 100Kb https://github.com/elastic/kibana/issues/95865 π We still have a lot of room for improvement. We also would like to use this opportunity to declutterkibana_react
as during new platform migration it became a "shared" place to put stuff to share, but the plugin is "owned" by app-services team.The main goal is to reduce initial bundle size, these are the strategies we have:
Lazy
wrapper, export only aLazy
wrapper. Downside is that consumer code doesn't control lazy loading process. exampleLazy
wrapper approach for widely used components example2 and 3 allows us to revisit code ownership of some of those components. It would make more sense if for some of those app-services won't be pinged.
Focusing only on those that are still inside the initial bundle, even though it would make sense to revise some of the components that are already code splitter with the
Lazy
wrapper approach:page_template
url_template_editor
CodeEditor
tablie_list_view
page_template
field_button
field_icon
validated_range
overview_page
exit_full_screen_button
toolbar_button
lens
(used only there)split_panel
console
(used only there)Also we have
assets/
folder. Assets are used from different plugins by static URL which is unsafe. I think we should copy those assets where they are used and preferrequire()
usage instead of static URL, so that build system could check if they are present. cc @elastic/eui-design @elastic/kibana-operations