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.3 #37007

Closed
lukeelmers opened this issue May 23, 2019 · 3 comments
Closed

Dev Docs entry: ui/public cleanup 7.3 #37007

lukeelmers opened this issue May 23, 2019 · 3 comments
Labels
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.3.0

Comments

@lukeelmers
Copy link
Member

lukeelmers commented May 23, 2019

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

Relocated 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 from any of the following ui/public modules, you will need to update your import statements as indicated below, so that you are pulling these modules from their new locations.

ui/filter_bar/query_filter #37311

// deprecated
import { FilterBarQueryFilterProvider } from 'ui/filter_bar/query_filter';
const queryFilter = Private(FilterBarQueryFilterProvider);
queryFilter.addFilters(...);

// new location
import { FilterBarQueryFilterProvider } from 'ui/filter_manager/query_filter';
const queryFilter = Private(FilterBarQueryFilterProvider);
queryFilter.addFilters(...);

In addition, the following methods have been deprecated:

  • invertFilter
    • Change the filter's negate attribute instead and use addFilters to apply the change.
  • toggleFilter
    • Change the filter's disabled attribute instead and use addFilters to apply the change.
  • pinFilter
    • Use FilterManager.setFiltersStore to toggle filters between global & app state and use addFilters to apply the change.
  • pinAll
  • toggleAll
  • invertAll

ui/filter_manager/filter_manager #37311

// deprecated
import { FilterManagerProvider } from 'ui/filter_manager';
const filterManager = Private(FilterManagerProvider);

// new location
import { getFilterGenerator } from 'ui/filter_manager';
const filterGen = getFilterGenerator(queryFilter);

ui/apply_filters #36778

// deprecated
import 'ui/apply_filters';

// new location
import { data } from 'plugins/data/setup';
data.filter.loadLegacyDirectives();
...
<apply-filters-popover ...

// new location - react
import { data } from 'plugins/data/setup';
const { ApplyFiltersPopover } = data.filter.ui;
...
<ApplyFiltersPopover />

ui/utils/brush_event #35625

// deprecated
import { onBrushEvent } from 'ui/utils/brush_event';

// new location
import { onBrushEvent } from 'ui/vis/vis_filters/brush_event';

ui/management #39168

In the Management app, IndexPatternCreationConfigRegistry registry has been replaced with the addIndexPatternType function.

// deprecated
import { IndexPatternCreationConfigRegistry } from 'ui/management/index_pattern_creation';
IndexPatternCreationConfigRegistry.register(() => MyIndexPatternCreationConfig);

// new location
import { addIndexPatternType } from 'ui/management/index_pattern_creation';
addIndexPatternType(MyIndexPatternCreationConfig);

Angular Removal

Removed unused Angular items

In the process of removing Angular from the Kibana core, the following unused items have been deleted or relocated. If you have used any of those in your plugin and want to keep using them, please copy over the source from the previous Kibana version directly into your plugin code.

Directives

  • formDirective, ui/fancy_forms (via #39977)
  • modal, ui/angular-bootstrap (via #39976)
  • ngFormDirective, ui/fancy_forms (via #39977)
  • ngModelDirective, ui/fancy_forms (via #39977)
  • tableInfo, ui/table_info (via #39978)
  • toolBarPagerButtons, ui/pager_control (via #39975)
  • toolBarPagerText, ui/pager_control (via #39975)
  • paginated_selectable_list (via #39976)

Factories

  • $transition, ui/angular-bootstrap (via #39976)
  • pagerFactory, ui/pager (via #39975)
@lukeelmers lukeelmers added :AppArch Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v7.3.0 labels May 23, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@lukeelmers
Copy link
Member Author

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

Please update the issue description with any ui/public cleanup items for 7.3 (but only use this issue for changes that will make it into 7.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.3.0
Projects
None yet
Development

No branches or pull requests

2 participants