-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
This issue is just there to create a single dev docs entry in the API changes blog post, for any of the ui/public directory removals, so not every removal PR pops up as it's own section in the blog post.
Dev Docs
ui/public cleanup
Removed / moved modules
In preparation for Kibana's upcoming new platform, we are in the process of migrating away from the ui/public directory. Over time, the contents of this directory will be either deprecated or housed inside a parent plugin. If your plugin imports the listed items from the following ui/public modules, you will need to either update your import statements as indicated below, so that you are pulling these modules from their new locations, or copy the relevant code into your plugin.
ui/state_management #51835, #52172, #52280, #53582
The hashUrl and unhashUrl functions no longer rely on states being provided as an argument, therefore getUnhashableStates/getUnhashableStatesProvider have been removed.
// old
import {
hashUrl,
unhashUrl,
getUnhashableStatesProvider, // deprecated
} from 'ui/state_management/state_hashing';
const getUnhashableStates = Private(getUnhashableStatesProvider);
unhashUrl(window.location.href, getUnhashableStates());
hashUrl([new AppState(), globalState], myRedirectUrl);
// new
import { hashUrl, unhashUrl } from '../../plugins/kibana_utils/public'
hashUrl(window.location.href);
unhashUrl(myRedirectUrl);HashedItemStore was also moved to the kibana_utils plugin.
// old
import { HashedItemStoreSingleton } from 'ui/state_management/state_storage'
// new
import { hashedItemStore } from '../../plugins/kibana_utils/public'New state syncing utilities (AppState & GlobalState replacement in NP)
Created new state syncing utilities for syncing state between state containers and different type of state storage (e.g. query params in URL or session storage).
Example app: examples/state_containers_examples
This should become a replacement for AppState and GlobalState in NP.
ui/public/utils cleanup
base_objectandfind_by_paramutilities have been removed [ui/public/utils] Delete unused base_object & find_by_param #52500decode_geo_hashandzoom_to_precisionutilities have been moved 👉ui/vis/map[ui/public/utils] Move items into ui/vis #52615rangeutility has beed moved 👉ui/vis/editors/default[ui/public/utils] Move items into ui/vis #52615cidr_mask,date_range,geo_utils,ip_range,ordinal_suffixutilities have been moved 👉ui/agg_types[ui/public/utils] Move items into agg_types #52744case_conversion[ui/public/utils] Copy rarely used items to where they are consumed #53819keysToSnakeCaseShallowmoved 👉src/legacy/server/status/libkeysToCamelCaseShallowmoved 👉src/legacy/core_plugins/kibana/public/management
collection[ui/public/utils] Copy rarely used items to where they are consumed #53819organizeBy moved 👉src/legacy/ui/public/indexed_array`pushAllwas removed
diff_object moved 👉ui/state_management` [ui/public/utils] Copy rarely used items to where they are consumed #53819functionwas removed [ui/public/utils] Copy rarely used items to where they are consumed #53819key_mapmoved 👉ui/directives[ui/public/utils] Copy rarely used items to where they are consumed #53819mathmoved 👉ui/vis[ui/public/utils] Copy rarely used items to where they are consumed #53819numericmoved 👉src/legacy/core_plugins/kibana/public/management[ui/public/utils] Copy rarely used items to where they are consumed #53819parse_intervalmoved 👉src/legacy/core_plugins/data/common[ui/public/utils] Copy rarely used items to where they are consumed #53819sort_prefix_firstmoved 👉x-pack/legacy/plugins/kuery_autocomplete[ui/public/utils] Copy rarely used items to where they are consumed #53819supportsmoved 👉src/legacy/core_plugins/tile_map/public[ui/public/utils] Copy rarely used items to where they are consumed #53819