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

Shim ui/autocomplete_providers into legacy data plugin #44949

Closed
3 tasks
lukeelmers opened this issue Sep 5, 2019 · 2 comments · Fixed by #46138
Closed
3 tasks

Shim ui/autocomplete_providers into legacy data plugin #44949

lukeelmers opened this issue Sep 5, 2019 · 2 comments · Fixed by #46138
Assignees

Comments

@lukeelmers
Copy link
Member

This is something APM & Infra/Logs UI teams will be needing in order to migrate to NP. We had previously discussed locating this in data.query service, but exact location is yet to be determined, pending some design work that @lizozom is doing.

  • Convert index.js -> index.ts
  • Move contents of ui/autocomplete_providers into data plugin (service location TBD, should be discussed with @lizozom), and expose via shim
  • Re-export from ui/autocomplete_providers for backwards compatibility

Related to #44377

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@lizozom
Copy link
Contributor

lizozom commented Sep 15, 2019

IMO, there's no need to migrate the code at all, as this code is just a wrapper.
It can be also moved straight to NP.

These are the steps I would take:

  1. Add the autocomplete_provider types to src/plugins/data/public/types.
  2. Add a map named autocompleteProviders to data plugin, initialized in the constructor.
  3. Add the autocomplete.addProvider method to the setup contract. The input argument language should default to query.
  4. Add the autocomplete.getProvider method to both setup \ start contracts.
  5. Update usages of these methods in code (addAutocompleteProvider is used just once, getAutocompleteProvider is used just a few), getting them from npSetup \ npStart imports.
  6. Make sure to the update the data plugin mock and maybe add some basic tests?

alexwizp added a commit to alexwizp/kibana that referenced this issue Sep 20, 2019
alexwizp added a commit that referenced this issue Sep 24, 2019
* Shim ui/autocomplete_providers into legacy data plugin

Fix: #44949

* Fix PR commnets

* fix CI

* Add comment
alexwizp added a commit to alexwizp/kibana that referenced this issue Sep 24, 2019
* Shim ui/autocomplete_providers into legacy data plugin

Fix: elastic#44949

* Fix PR commnets

* fix CI

* Add comment
alexwizp added a commit that referenced this issue Sep 24, 2019
* Shim ui/autocomplete_providers into legacy data plugin

Fix: #44949

* Fix PR commnets

* fix CI

* Add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants