kibana/x-pack/plugins/custom_branding
Clint Andrew Hall 1c99f40f2c
[chore] Make plugin dependencies explicit; point out lifecycle inconsistencies (#173297)
> Changes identified using the script from
https://github.com/elastic/kibana/pull/171483

## Summary

The script from https://github.com/elastic/kibana/pull/171483 can
identify inconsistencies and untyped dependencies in Kibana plugins.
This PR fixes the obvious:

- `notifications` - move `actions` and `licensing` to `optionalPlugins`.
- `serverless` - move `kibanaReact` to `requiredBundles`.
- `serverlessObservability` - delete dead code and `kibanaReact`
dependency.
- `reporting` - move `esUiShared` and `embeddable` plugins to
`requiredBundles`.
- `uiActions` - remove `dataViews` dependency, (only a type is being
used).
- `urlDrilldowns` - move `uiActions` to `requiredBundles`.
- Type all plugins using the `Setup` and `Start` generics on the core
`Plugin` interface.
- Consistently name them.
- The exports needed to be named their original names; this will be
addressed in follow up work, (to avoid pinging teams)
- Add a `_` to unused parameters.

## Remaining Issues

### `licensing` and `licensingApiGuard`

Both of these plugins introduce side-effects, rather than dependent
logic. These need to be refactored to be consumed instead.

<img width="735" alt="Screenshot 2023-12-13 at 10 08 00 AM"
src="57916ffd-299d-4ca8-b796-dea2d06dca4a">
<img width="740" alt="Screenshot 2023-12-13 at 10 08 08 AM"
src="a2af254f-adec-4bf9-869a-8acf34c0c9b4">

## Resolved issues

### `reporting`

~~The `reporting` plugin requires `embeddable` and `esUiShared`, but
it's unclear if these still apply, or if they are required for
side-effects. Perhaps @tsullivan can help clarify?~~

Both are being used for static code. Moving to `requiredBundles`, and
need to follow-up to create packages.

<img width="800" alt="Screenshot 2023-12-13 at 10 08 23 AM"
src="7629fb92-d28e-43de-bfeb-97410cff424e">

### `uiActions`

~~The `uiActions` plugin requires `dataViews`. We need to determine if
this is a side-effect dependency, or a direct dependency, and remove or
refactor as necessary.~~

It's only using a type. Removing the dependency entirely,
(`requiredBundles` requires actual code be used).

<img width="622" alt="Screenshot 2023-12-13 at 10 08 33 AM"
src="39916f05-dafc-4f42-b5d8-1abcb1267b5b">

### urlDrilldown

~~The `urlDrilldown` plugin requires `uiActions`. We need to determine
if this is a side-effect dependency, or a direct dependency, and remove
or refactor as necessary.~~

Static code usage-- moving to `requiredBundles`.

<img width="732" alt="Screenshot 2023-12-13 at 10 13 13 AM"
src="af32f939-f866-483d-8dd0-aab962397dbb">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-12-18 16:44:15 -05:00
..
common
public [chore] Make plugin dependencies explicit; point out lifecycle inconsistencies (#173297) 2023-12-18 16:44:15 -05:00
server [chore] Make plugin dependencies explicit; point out lifecycle inconsistencies (#173297) 2023-12-18 16:44:15 -05:00
architecture_diagram.png [Custom Branding] Update text (#151631) 2023-03-10 09:45:06 +01:00
kibana.jsonc [Custom Branding] Add custom branding settings to Global settings (#150080) 2023-02-16 08:13:42 +01:00
README.md [Custom Branding] Update text (#151631) 2023-03-10 09:45:06 +01:00
tsconfig.json [Custom Branding] Add custom branding settings to Global settings (#150080) 2023-02-16 08:13:42 +01:00

customBranding

This is a plugin to configure custom branding. Plugin server-side only. Plugin has three main functions:

  1. To check license (custom branding is available for enterprise licenses and above)
  2. To register itself with a custom branding service
  3. To register UI settings

Properties that can be configured through custom branding are:

  1. Custom logo (replaces the default Elastic logo in the chrome header and on the login page)
  2. Customized text (replaces the elastic logo in the the chrome header)
  3. Page title
  4. Favicons - PNG and SVG

Development

For detailed architectural overview, see image: architecture_diagram

See the kibana contributing guide for instructions setting up your development environment.