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
馃憠 core
dateFormat
馃憠core
(date format is something super central, IMHO we shouldn't split these up but put everything into core)dateFormat:tz
馃憠core
dateFormat:scaled
馃憠core
dateFormat:dow
馃憠core
dateNanosFormat
馃憠core
truncate:maxHeight
馃憠core
theme:darkMode
馃憠core
notifications:banner
馃憠core
notifications:lifetime:banner
馃憠core
notifications:lifetime:error
馃憠core
notifications:lifetime:warning
馃憠core
notifications:lifetime:info
馃憠core
accessibility:disableAnimations
馃憠core
state:storeInSessionStorage
馃憠core
Issue for platform team (not listing specific settings): https://github.com/elastic/kibana/issues/59755
@elastic/kibana-app-arch
query:queryString:options
馃憠 data
query:allowLeadingWildcards
馃憠 data
search:queryLanguage
馃憠 data
sort:options
馃憠 data
defaultIndex
馃憠data
courier:ignoreFilterIfFieldNotInIndex
馃憠data
courier:setRequestPreference
馃憠data
courier:customRequestPreference
馃憠data
courier:maxConcurrentShardRequests
馃憠data
courier:batchSearches
馃憠data
search:includeFrozen
馃憠data
histogram:barTarget
馃憠data
histogram:maxBars
馃憠data
visualize:enableLabs
馃憠visualizations
csv:separator
馃憠share
csv:quoteValues
馃憠share
history:limit
馃憠data
shortDots:enable
馃憠data
format:defaultTypeMap
馃憠data
format:number:defaultPattern
馃憠data
format:bytes:defaultPattern
馃憠data
format:percent:defaultPattern
馃憠data
format:currency:defaultPattern
馃憠data
format:number:defaultLocale
馃憠data
timepicker:refreshIntervalDefaults
馃憠data
timepicker:quickRanges
馃憠data
indexPattern:placeholder
馃憠data
filters:pinnedByDefault
馃憠data
filterEditor:suggestValues
馃憠data
@elastic/kibana-app
defaultColumns
馃憠discover
metaFields
馃憠discover
discover:sampleSize
馃憠discover
discover:aggs:terms:size
馃憠discover
discover:sort:defaultOrder
馃憠discover
discover:searchOnPageLoad
馃憠discover
doc_table:highlight
馃憠discover
doc_table:hideTimeColumn
馃憠discover
fields:popularLimit
馃憠discover
visualization:colorMapping
馃憠charts
visualization:loadingDelay
(seems to be unused)visualization:dimmingOpacity
馃憠vis_type_vislib
visualization:heatmap:maxBuckets
馃憠vis_type_vislib
savedObjects:perPage
馃憠saved_objects
savedObjects:listingLimit
馃憠saved_objects
metrics:max_buckets
馃憠vis_type_timeseries
context:defaultSize
馃憠discover
context:step
馃憠discover
context:tieBreakerFields
馃憠discover
@elastic/kibana-gis
visualization:tileMap:maxPrecision
馃憠vis_type_tile_map
visualization:tileMap:WMSdefaults
馃憠vis_type_tile_map
visualization:regionmap:showWarnings
馃憠vis_type_region_map
It 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
馃憠core
defaultIndex
@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
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 thedata
plugin?
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:maxPrecision
visualization:tileMap:WMSdefaults
visualization:regionmap:showWarnings
@elastic/kibana-app-arch
timepicker:timeDefaults
I 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