[Core] Clarity regarding bundling and loading of different plugins and their styles #138102
Labels
bug
Fixes for quality problems that affect the customer experience
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Team:Operations
Team label for Operations Team
It is a UI issue so only kibana version matter.
Kibana version: <=8.4
Describe the bug:
While working on a bug I observed that styles of each plugin is loaded when the user visits that plugin (i.e. when that plugin is loaded) and not all at once. It creates inconsistent Dev and user experience.
For example, styles of observability will be applied to the app when a user visits any page within Observability and same goes for the the security.
Because of this, when doing the development, it becomes difficult to know if styles from any other plugin are conflicting with our own. Please see aforementioned bug as a use case here:
Please checkout related PR : #138091
Steps to reproduce:
This bug is reproducible today in kibana but we will soon be moving fix for the same. I guess it could still be repoduced in https://kibana.siem.estc.dev/ for some time. I will also add the recording here so that once the bug is fixed, we have a record.
Observability --> Alerts
Expected behavior:
There can 2 expected behaviours:
Styles from plugins are loaded together so that development can be done with predictable UI interactions. But I am not sure if it is possible since, we are not bundling
css
separately ( I guess. Please correct me if I am wrong).Styles from one plugin is loaded and when user visits other plugin, styles from that plugin are also loaded and styles from all other plugins are purged so that there is not issue.
Screenshots (if relevant):
Please find the recording below:
observability
plugin css but it is impacting security solution flyout and error occurs only when I have already visied Observability plugin ( since it is loaded lazily)kibana/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/styles.scss
Lines 6 to 10 in bd2361d
Screen.Recording.2022-08-04.at.13.59.02.mov
Observations
This happens because
Alerts (Security)
&Alerts (Observability)
have conflicting styles and issue only occurs if a user has visited both of the pages.It seems to me that we inject styles directly into js and do not generate separate css bundles. Please correct me if I am wrong. I think this will make it harder to load css all at once for complete application.
The text was updated successfully, but these errors were encountered: