Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Docs entry: ui/public cleanup 7.7 #55926

Closed
lukeelmers opened this issue Jan 24, 2020 · 3 comments
Closed

Dev Docs entry: ui/public cleanup 7.7 #55926

lukeelmers opened this issue Jan 24, 2020 · 3 comments
Labels
Feature:NP Migration release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0

Comments

@lukeelmers
Copy link
Member

lukeelmers commented Jan 24, 2020

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 directly into your plugin.

ui/agg_types #59605

The ui/agg_types module has been removed in favor of the service provided by the data plugin in the new Kibana platform.

Additionally, aggTypes and AggConfigs have been removed in favor of a types registry and a createAggConfigs function:

// old
import { AggConfigs, aggTypes } from 'ui/agg_types';
const aggs = new AggConfigs(indexPattern, configStates, schemas);
aggTypes.metrics[0]; // countMetricAgg

// new
class MyPlugin {
  start(core, { data }) {
    data.search.aggs.createAggConfigs(indexPattern, configStates, schemas);
    data.search.aggs.types.get('count'); // countMetricAgg
  }
}

// new - static code
import { search } from 'src/plugins/data/public';
const { isValidInterval } = search.aggs;

// new - types
import { BUCKET_TYPES, METRIC_TYPES } from 'src/plugins/data/public';

The above examples are not comprehensive, but represent some of the more common uses of agg_types. For more details, please refer to the interfaces in the source code, as well as the data plugin's public/index file.

ui/time_buckets #58805

The ui/time_buckets module has been removed and is now internal to the data plugin's search & aggregations infrastructure. We are working on an improved set of helper utilities to eventually replace the need for the TimeBuckets class.

In the meantime, if you currently rely on TimeBuckets, please copy the relevant pieces into your plugin code.

ui/filter_manager #59872

The ui/filter_manager module has been removed and now services and UI components are available on the data plugin's query infrastructure.

@lukeelmers lukeelmers added release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Visualizations Visualization editors, elastic-charts and infrastructure Team:AppArch Feature:NP Migration v7.7.0 labels Jan 24, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lukeelmers
Copy link
Member Author

Immediately closing this so the dev tools script can pick up docs changes for 7.7

Please update the issue description with any ui/public cleanup items for 7.7 that come up as we are working on NP migration (but only use this issue for changes that will make it into the release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:NP Migration release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0
Projects
None yet
Development

No branches or pull requests

2 participants