elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.13k forks source link

Plugins should be aware of UiSettings values change #83084

Open mshustov opened 3 years ago

mshustov commented 3 years ago

In https://github.com/elastic/kibana/pull/82860 we had a case when a plugin wanted to perform a custom logic on value change.

User can adjust UiSettings in different ways:

We want to make sure that we cover all of the causes.

There are several different options:

elasticmachine commented 3 years ago

Pinging @elastic/kibana-platform (Team:Platform)

afharo commented 2 years ago

This is blocking the removal of this deprecated API: https://github.com/elastic/kibana/blob/8ee78d393e9c6bc07afc60bb73570a4b8a5d263f/src/core/types/ui_settings.ts#L81-L89

TinaHeiligers commented 1 year ago

Plugins should absolutely be aware of any changes to the settings that the plugin consumes. That being said, we could guarantee change awareness if a plugin were only allowed to consume a setting that it, itself, registers.

Unfortunately, this is not the case at the moment but I believe it will become more critical in situations where we cannot know before hand which, if any, plugins are not enabled in a particular offering.

pgayvallet commented 1 year ago

Note that if we do implement such a feature, depending on what we're planning to use it for, we may have to make it work for multi-instance Kibana (e.g instance1 update a setting -> instance2 need to somehow be aware of it)

elasticmachine commented 1 year ago

Pinging @elastic/appex-sharedux (Team:SharedUX)