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.4 #39907

Closed
lukeelmers opened this issue Jun 28, 2019 · 2 comments
Closed

Dev Docs entry: ui/public cleanup 7.4 #39907

lukeelmers opened this issue Jun 28, 2019 · 2 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.4.0

Comments

@lukeelmers
Copy link
Member

lukeelmers commented Jun 28, 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/index_patterns #42994

// deprecated
import * from 'ui/index_patterns/**/*';

// new location (stateful code)
import { setup as data } from '../../core_plugins/data/public';
const {
  FieldList,
  flattenHitWrapper,
  formatHitProvider,
  IndexPatternSelect,
} = data.indexPatterns;

// new location (static code)
import {
  CONTAINS_SPACES,
  getFromSavedObject,
  getRoutes,
  isFilterable,
  IndexPatternsProvider,
  validateIndexPattern,
  ILLEGAL_CHARACTERS,
  INDEX_PATTERN_ILLEGAL_CHARACTERS,
  INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE,
  IndexPatternAlreadyExists,
  IndexPatternMissingIndices,
  NoDefaultIndexPattern,
  NoDefinedIndexPatterns,
} from '../../core_plugins/data/public';

// new location (types)
import {
  Field,
  FieldType,
  IndexPattern,
  IndexPatterns,
  StaticIndexPattern,
} from '../../core_plugins/data/public';

ui/vis #43730

// deprecated
import {
  VisProvider,
  Vis,
  VisParams,
  VisState,
} from 'ui/vis';
import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { VisTypesRegistry, VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { defaultFeedbackMessage } from 'ui/vis/default_feedback_message';
import { Status } from 'ui/vis/update_status';
import { VisualizationController, VisType } from 'ui/vis/vis_types/vis_type';
import { VisFiltersProvider, createFilter } from 'ui/vis/vis_filters';

// new location (stateful code)
import { setup as visualizations } from '../core_plugins/visualizations/public/legacy';
const { VisProvider, VisTypesRegistryProvider } = visualizations.types;
const { VisFactoryProvider } = visualizations.types.__LEGACY;
const { VisFiltersProvider, createFilter } = visualizations.filters;

// new location (static code)
import { DefaultEditorSize, defaultFeedbackMessage, visFactory } from '../core_plugins/visualizations/public';

// new location (types)
import {
  Vis,
  VisParams,
  VisProvider,
  VisState,
  VisType,
  VisTypesRegistry,
  VisualizationController,
  Status,
} from '../core_plugins/visualizations/public';

Angular Cleanup

Removed / moved Angular items

In the process of removing Angular from the Kibana core, the following 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, or import them from their new location indicated below. Please note that these will be deprecated over the lifetime of 7.x.

Directives
bind decorator moved into directives folder #41638

// Old
import 'ui/bind';

// New
import 'ui/directives/bind';
$scope.$bind(local, attr);

debounce service moved into directives folder #41638

// Old
import { DebounceProvider } from 'ui/debounce';

// New
import { DebounceProvider } from 'ui/directives/debounce';

listen rootScope function moved into directives folder #41638

// Old
import 'ui/directives/listen';

// New
import 'ui/listen';
$scope.$listen(obj, 'event', handler);

renderDirective directive moved into directives folder #41638

// Old
import 'ui/render_directive';

// New
import 'ui/directives/render_directive';
 <render-directive ... >

watchMulti rootScope function moved into directives folder #41638

// Old
import 'ui/directives/watch_multi';

// New
import 'ui/watch_multi';
$scope.$watchMulti(eventNames, eventHandler); 
@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 v7.4.0 labels Jun 28, 2019
@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.4

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

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.4.0
Projects
None yet
Development

No branches or pull requests

2 participants