Skip to content

Move EUI chart theme into elastic-charts #865

@markov00

Description

@markov00

Is your feature request related to a problem? Please describe.
The elastic-charts theme, used in Kibana, is currently developed and published as part of the EUI library.
We ship elastic-charts with a default theme that is not intended to be used inside Kibana.

Describe the solution you'd like

I believe that shipping elastic-charts with the EUI good default theme could be a better option for the following reasons:

  • a consumer doesn't need to import the EUI library at all to have a good looking chart (ok Kibana already ship with that, but other products/app can have the same result without importing another library just for small theme object). Having a self-contained good looking library seems to be a cleaner approach than a split work between two libraries.
  • if we need to publish a breaking change on the Theme API, we need to sync the dependency upgrade in Kibana with the upgrade of EUI (we first have to upgrade EUI with the new API, fix breaking changes here, then merge the EUI upgrade at the same time with an Elastic-Charts upgrade): the last time we did that it took weeks to have that merged because both libraries bring in various changes and need to be notified/fixed by both teams

The drawback I can identify are:

  • The design team, when need to update/change the current theme setup, has to work on a different repo
  • We need to sync, where and when needed: colors, font, and other stylistic configurations

I'd like to open a discussion on that to understand if there are other drawbacks I haven't considered yet and if that change can be considered applicable by the EUI team.

Describe alternatives you've considered

In Kibana we have a set of utilities to pick up the right theme to use depending on the color mode (dark/light), but this is not used on every chart in Kibana and for sure not used for charts outside Kibana (if any).

Another option is to automatically extract a copy of the themes from the EUI package and expose them as part of the compiled sources of elastic-charts. This involves some scripting but can leave the EUI team the flexibility to work from their own repo.

cc @cchaos @chandlerprall

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussTo be discussedenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions