Skip to content

Dev Docs entry: ui/public & angular cleanup 7.6 #43511

@lukeelmers

Description

@lukeelmers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:NP MigrationTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//release_note:plugin_api_changesContains a Plugin API changes section for the breaking plugin API changes section.v7.6.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions