-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kibana UI componentization #9708
Comments
Please loop in the Discovery team if/when you start to think about timepicker, search bar, and filter bar. These are areas we're actively working in. |
Meeting notesStuff to do right now
Stuff to keep in mind
|
Do we have concrete recommendations for how to achieve this in Angular? If not, this is probably something we should experiment with outside of regular work first. Otherwise that statement is going to be interpreted in a lot of different ways and we'll end up with inconsistent components. |
Some of that should be encapsulated as part of #9049, but setting out specific guidelines for components is a good idea. For example, keeping things as stateless as possible, keep things small, passing around handler functions, etc. All good stuff to define and outline somewhere, maybe as a "component styleguide", or as a set of guidelines in the UI Framework. |
Closing this in favor of its spiritual successor: #15282 |
Overview
We'll also build UI systems, e.g. sidebars, header / top nav, timepicker, search bar, modals, alerts / notifications.
To see where our UI Framework is headed in the long-term, check out:
Roadmap
Componentization and the UI Framework
What's componentization?
Componentization is the process of breaking apart bespoke user interfaces into generalized UI components.
How do we use components?
Components will live in the UI Framework, but they'll be available to anyone working in the Kibana codebase.
Engineers will refer to the UI Framework documentation, find the components they need, and use them to develop user interfaces in Kibana.
The componentization process
The process of componentization will consist of a few overlapping phases.
CSS-only components
At first, the UI Framework will only contain CSS components.
React components
Eventually the primary mechanism for consuming the UI Framework will be through its React components:
Who can add components?
Anybody can! Just open a PR like you normally would. Feel free to enlist the help of the Design team when defining and building the component. CJ is the steward of the UI Framework, so he can guide you through the process. Refer to the UI Framework README.
End goal
The end goal is to completely componentize our UI, i.e. the UI Framework will drive Kibana's UI.
Once our UI is completely componentized, Kibana's UI will appear and behave more consistently, and it will be easier to apply UI improvements in a global manner:
Immediate steps for componentization
Migrate all CSS to use components in the UI Framework
We already have several new components in the UI Framework (in CSS form). These include ToolBar, Button, Form, and Table components. Wherever possible, each functional team should migrate parts of the UI under its purview to these new components.
Fire up the documentation by running
npm run uiFramework:start
and visitinglocalhost:8080
. Find the components you need and copy/paste the code examples to get started.For reference, here are some related PRs and Issues:
Designing React components
Refer to #9933 for concrete examples of how to write Angular directives as components.React components can be composed by treating each component as a dumb container into which other components can be injected. Composable components offer several benefits:
We can make components more composable by embracing a few concepts:
UI systems
There are several global UI systems which we also want to build. Each of these is a major initiative. In no particular order:
The text was updated successfully, but these errors were encountered: