Lots of UI settings are currently defined in https://github.com/elastic/kibana/blob/dd7531deb4c83a2711b0d4bc4871acea425eb8cf/src/legacy/core_plugins/kibana/ui_setting_defaults.js
These should be moved to their respective owner plugins using the core.uiSettings.register interface in the server part of the plugin.
Here is a list of all settings in there - I added suggestions where to move them but I'm open to discuss this.
@elastic/kibana-platform
defaultRoute 馃憠 coredateFormat 馃憠core (date format is something super central, IMHO we shouldn't split these up but put everything into core)dateFormat:tz 馃憠coredateFormat:scaled 馃憠coredateFormat:dow 馃憠coredateNanosFormat 馃憠coretruncate:maxHeight 馃憠coretheme:darkMode 馃憠corenotifications:banner 馃憠corenotifications:lifetime:banner 馃憠corenotifications:lifetime:error 馃憠corenotifications:lifetime:warning 馃憠corenotifications:lifetime:info 馃憠coreaccessibility:disableAnimations 馃憠corestate:storeInSessionStorage 馃憠coreIssue for platform team (not listing specific settings): https://github.com/elastic/kibana/issues/59755
@elastic/kibana-app-arch
query:queryString:options 馃憠 dataquery:allowLeadingWildcards 馃憠 datasearch:queryLanguage 馃憠 datasort:options 馃憠 datadefaultIndex 馃憠datacourier:ignoreFilterIfFieldNotInIndex 馃憠datacourier:setRequestPreference 馃憠datacourier:customRequestPreference 馃憠datacourier:maxConcurrentShardRequests 馃憠datacourier:batchSearches 馃憠datasearch:includeFrozen 馃憠datahistogram:barTarget 馃憠datahistogram:maxBars 馃憠datavisualize:enableLabs 馃憠visualizationscsv:separator 馃憠sharecsv:quoteValues 馃憠sharehistory:limit 馃憠datashortDots:enable 馃憠dataformat:defaultTypeMap 馃憠dataformat:number:defaultPattern 馃憠dataformat:bytes:defaultPattern 馃憠dataformat:percent:defaultPattern 馃憠dataformat:currency:defaultPattern 馃憠dataformat:number:defaultLocale 馃憠datatimepicker:refreshIntervalDefaults 馃憠datatimepicker:quickRanges 馃憠dataindexPattern:placeholder 馃憠datafilters:pinnedByDefault 馃憠datafilterEditor:suggestValues 馃憠data@elastic/kibana-app
defaultColumns 馃憠discovermetaFields 馃憠discoverdiscover:sampleSize 馃憠discoverdiscover:aggs:terms:size 馃憠discoverdiscover:sort:defaultOrder 馃憠discoverdiscover:searchOnPageLoad 馃憠discoverdoc_table:highlight 馃憠discoverdoc_table:hideTimeColumn 馃憠discoverfields:popularLimit 馃憠discovervisualization:colorMapping 馃憠chartsvisualization:loadingDelay (seems to be unused)visualization:dimmingOpacity 馃憠vis_type_vislibvisualization:heatmap:maxBuckets 馃憠vis_type_vislibsavedObjects:perPage 馃憠saved_objectssavedObjects:listingLimit 馃憠saved_objectsmetrics:max_buckets 馃憠vis_type_timeseriescontext:defaultSize 馃憠discovercontext:step 馃憠discovercontext:tieBreakerFields 馃憠discover@elastic/kibana-gis
visualization:tileMap:maxPrecision 馃憠vis_type_tile_mapvisualization:tileMap:WMSdefaults 馃憠vis_type_tile_mapvisualization:regionmap:showWarnings 馃憠vis_type_region_mapIt would be super cool if someone from each team mentioned here could review the list and give their OK/concerns about the items. When everyone is happy with the allocation, I can create separate issues for each team.
The list that should move to Core mostly makes sense to me, a few notes:
dateNanosFormat 馃憠coredefaultIndex@joshdover For dateNanosFormat that was my reasoning as well. For defaultIndex I figured that if the data plugin is owning index patterns it should also own advanced settings concerned with index patterns. Is it even possible to use it in a meaningful way without the data plugin?
For
defaultIndexI figured that if the data plugin is owning index patterns it should also own advanced settings concerned with index patterns. Is it even possible to use it in a meaningful way without thedataplugin?
I agree, I just wasn't sure if this setting was used by any plugins that aren't using index patterns directly?
Despite its name, defaultIndex will not hold an index(pattern) string, but a saved object id:

So I think you have to work with index patterns to use this setting somehow, but maybe I'm missing a case.
At first glance App Arch list makes sense to me.
Despite its name, defaultIndex will not hold an index(pattern) string, but a saved object id:
Correct, this is confusingly named but it is referring to the ID of the default index pattern, not the pattern string itself.
While we are on the topic of confusing names, I think metrics:max_buckets should have its description updated or be moved to another section of advanced settings. Currently it is under General which is confusing, and there's no indication that this is specific to TSVB other than the word metrics.
@flash1293 does platform need to prioritize https://github.com/elastic/kibana/issues/59755 for 7.8? Is it a hard blocker for any migration work, or just needs to get done before we can delete the legacy kibana plugin?
@joshdover No blocker for us, can happen anytime :)
I don't think it's a blocker for plugin migration. It should be done to make LP deletion possible, so we didn't set a high priority on https://github.com/elastic/kibana/issues/59755
I have a general concern or something we should keep in mind here and I need some clarification on:
Once we move an advanced setting to a specific plugin and you disable that plugin I assume this advanced setting will no longer be registered? Meaning, that if you want to consume an advanced setting that is not defined within your plugin, you must have that other plugin as a dependency and/or handle that that setting might not be present at all?
Are we sure that for those settings not going to core, we're not using them across plugins that might not yet have a dependency on each other?
cc @joshdover @flash1293
Meaning, that if you want to consume an advanced setting that is not defined within your plugin, you must have that other plugin as a dependency and/or handle that that setting might not be present at all?
Yes. That would make clear that settings are part of your public contract, which would prevent accidental breaking changes when you need to update this setting.
Are we sure that for those settings not going to core
The platform team is just not the right owner for all of them. We don't know about use-cases for every setting. When someone wants to update a setting and pings the platform team, we won't be able to verify whether changes are correct and do not affect all the consumers.
we're not using them across plugins that might not yet have a dependency on each other?
It means that either a parameter has several responsibilities or a plugin access value that doesn't belong to it. Even if we have such a problem, we can duplicate a setting in both plugins and add a migration for the current value.
@timroes This is a good point, it should be part of the migration to audit this (I'm 83% sure we don't have that case right now though :) ). We should probably provide guidelines as well how to consume uisettings in a save way.
Looks like it's just a small chunk of the overall list, but wrt the legacy maps settings, no objections from me to move registration to the maps_legacy plugin. To the best of my knowledge, none of those settings should have effects outside of the maps apps.
@elastic/kibana-platform,
What do you think of
state:storeInSessionStorage 馃憠kibana_utils
moving into core ?
Why I think kibana_utils doesn't look like a best place for this now:
kibana_utils is technically not a plugin (yet), so it can't register this setting.url_overflow handling and popup which suggests to enable this option. I believe that code is part of core? state syncing utils from kibana_utils are not pulling this option from uiSettings directly, but each app passes it as param when setting up state syncing const stateSync = createStateSync({useHash: uiSettings.get('state:storeInSessionStorage')})
In theory this condition 猡达笍 could be different for specific use cases.
cc @lukeelmers
What do you think of
state:storeInSessionStorage 馃憠kibana_utils
moving into
core?
Came here to actually say this too 馃槃
With the changes in https://github.com/elastic/kibana/pull/67899, Core will be referencing this setting in the UI. Makes sense to move to Core itself, even if we're not consuming it, it acts as a global option that affects many apps.
EDIT: updated the list, but if anyone objects we can change it again
Platform team is planning to remove the legacy kibana plugin in 7.10. We still need to migrate our settings to Core, but these also need still to be migrated by other teams:
@elastic/kibana-gis
visualization:tileMap:maxPrecisionvisualization:tileMap:WMSdefaultsvisualization:regionmap:showWarnings@elastic/kibana-app-arch
timepicker:timeDefaultsI suspect moving these is not difficult, but we will need to do this soon in the 7.10 development cycle in order to unblock #56205
I have a PR open for the timepicker:timeDefaults setting which was missed: https://github.com/elastic/kibana/pull/73750
As this issue was intended for the discussion of ownership, I will close now - Maps team ( @elastic/kibana-gis ), it seems like you are missing a few migrations.
Map migrations completed in https://github.com/elastic/kibana/pull/75887
Most helpful comment
Came here to actually say this too 馃槃
With the changes in https://github.com/elastic/kibana/pull/67899, Core will be referencing this setting in the UI. Makes sense to move to Core itself, even if we're not consuming it, it acts as a global option that affects many apps.
EDIT: updated the list, but if anyone objects we can change it again