IndexPattern class - no longer use getConfig or uiSettingsValues#75717
Conversation
getConfig or uiSettingsValues
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
|
@elasticmachine merge upstream |
ppisljar
left a comment
There was a problem hiding this comment.
code LGTM, but i am wondering if this does have some functional changes ?
before we would use getConfig to read the config value at the time we needed it. now we read the config value once when we create the index pattern instance and reuse it later when using the index pattern. Could this lead to any differences in behaviour where a setting would be changed from the time we create index pattern till we use the method on it that uses the config ?
i am assuming no, since the only way to change the setting is to navigate to management. Navigating from there to anywhere in kibana we will recreate the index pattern instances. We need to make sure we don't put index pattern instances to any global state. If we would need to make index pattern available globally we should share the spec rather than the instance.
maybe this is worth putting into a comment (jsdocs for index pattern class)
This is correct. Yes, its worth documenting. |
…lastic#75717) * remove getConfig and uiSettingsValues from IndexPattern class # Conflicts: # docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._constructor_.md # docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md # src/plugins/data/common/index_patterns/index_patterns/index_pattern.test.ts # src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts # src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts # src/plugins/data/public/public.api.md
Summary
getConfigoruiSettingsValuesdependencies. It now takesshortDotsEnable(boolean) andmetaFields(string[]) as arguments - these were formerly provided byuiSettingsChecklist
Delete any items that are not applicable to this PR.
For maintainers
Dev docs
IndexPattern class no longer uses
getConfigoruiSettingsValuesdependencies. It now takesshortDotsEnable(boolean) andmetaFields(string[]) as arguments - these were formerly provided byuiSettings