Closed snide closed 5 years ago
.kuiTestbed
selector with some comments)@cchaos :
We also need to remove any .LESS file references to removed files in here: https://github.com/elastic/kibana/blob/95edbcdfbf6d3358bd50d6802859966639c29c46/src/dev/precommit_hook/casing_check_config.js#L106
Closing this issue. Outside of some hanger on issues, it's complete and would be better served by smaller, clean up issues.
This will be a meta issue for tracking conversion of Kibana's 307 Less files to Sass.
Primary goals
Why are we doing this?
Staged approach
Because of the size of the changes we should consider staging this out. I could see us doing the following...
After the above is done
Patterns we'll want to follow during conversion
These are simple examples, not meant to be full code methodologies and pathing scenarios.
File organization
Kibana is made up of three major parts: The inherited EUI components, the global Kibana global blob, and individual Kibana plugins.
Kibana global blob would look like this
Then Kibana's core global scope includes/inherits EUI and builds beyond it with it's own global mixins and components in a single css blob. Anything in this file would be considered usable UI for all of Kibana. We'll have better control over the load order and be able to run proper trash tests as we remove code over time.
Plugins would be separated into their own css files (as shown earlier) and loaded only within their plugin scope.
Plugins
Kibana is mostly made up of plugins. We should aim to move all styling to match the below structure.
Sass
Then in the files themseslves
Sections to convert
For an example conversion, along with some tips please look at https://github.com/elastic/kibana/pull/20995
Xpack plugins
Kibana OSS
Kibana core + Bootstrap
Kibana core work is blocked by https://github.com/elastic/kibana/issues/20859
Kibana core is essentially everything in src/ui/ (which is a lot of files)
KUI
KUI (aka
ui_framework
) should be audited for unused components. Existing, in use ones should import the EUI global scope so that it matches EUI theming as much as possible.