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

[Data Plugin] combine autocomplete provider and suggestions provider #54451

Merged
merged 27 commits into from
Jan 17, 2020

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Jan 10, 2020

Closes: #52843

Summary

Currently in src/plugins/data/public we have an autocomplete_provider and suggestions_provider.

  • autocomplete is exposed in the setup contract under data.autocomplete

  • suggestions are exposed in the start contract under getSuggestions

Since these are both thematically related, I we should merge them together into a single autocomplete service in the data plugin

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@alexwizp alexwizp added the WIP Work in progress label Jan 10, 2020
@elastic elastic deleted a comment from kibanamachine Jan 13, 2020
@elastic elastic deleted a comment from kibanamachine Jan 13, 2020
@elasticmachine
Copy link
Contributor

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

@alexwizp alexwizp removed the WIP Work in progress label Jan 13, 2020
@alexwizp alexwizp requested a review from Bargs January 13, 2020 16:53
@alexwizp alexwizp marked this pull request as ready for review January 13, 2020 17:41
@alexwizp alexwizp requested a review from a team as a code owner January 13, 2020 17:41
@alexwizp alexwizp requested a review from a team January 13, 2020 17:41
@alexwizp alexwizp requested review from a team as code owners January 13, 2020 17:41
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and looks good from ML

Copy link
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality looks good. Looking at the code, I focused just on the service itself since others have looked at the app usages and the NP stuff. I like how you've pulled all these separate pieces together, it makes the autocomplete picture easier to understand.

The only thing I would suggest is changing the name of getFieldSuggestions. To me, this name implies it will suggest field names, but in actuality is suggests values. That's especially confusing since we have another function called getFieldSuggestions which actually does provide field names. I would prefer getValueSuggestions.

@lizozom lizozom requested a review from Bargs January 17, 2020 10:09
@alexwizp
Copy link
Contributor Author

@Bargs getFieldSuggestions renamed -> getValueSuggestions

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for making that change 👍

@alexwizp alexwizp merged commit 801302e into elastic:master Jan 17, 2020
alexwizp added a commit to alexwizp/kibana that referenced this pull request Jan 17, 2020
…lastic#54451)

* [Data Plugin] combine autocomplete provider and suggestions provider

Closes: elastic#52843

* [Data Plugin] combine autocomplete provider and suggestions provider - add skeleton for SuggestionsProvider

* autocomplete_provider -> autocomplete

* value_suggestions.ts - change getSuggestions method

* remove suggestions_provider folder

* fix PR comments

* fix PR comments

* fix CI

* fix CI

* getFieldSuggestions -> getValueSuggestions

* update Jest snaphots

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
alexwizp added a commit that referenced this pull request Jan 18, 2020
…54451) (#55224)

* [Data Plugin] combine autocomplete provider and suggestions provider

Closes: #52843

* [Data Plugin] combine autocomplete provider and suggestions provider - add skeleton for SuggestionsProvider

* autocomplete_provider -> autocomplete

* value_suggestions.ts - change getSuggestions method

* remove suggestions_provider folder

* fix PR comments

* fix PR comments

* fix CI

* fix CI

* getFieldSuggestions -> getValueSuggestions

* update Jest snaphots

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 20, 2020
* upstream/master: (83 commits)
  [Reporting] Fix map tiles not loading by using Chrome's Remote Protocol (elastic#55137)
  [Data Plugin] combine autocomplete provider and suggestions provider (elastic#54451)
  resolves elastic#53038 - remove references to specific license levels (elastic#53858)
  highlighting rules should still know about url parts when in sql state (elastic#55200)
  [Metric] convert mocha tests to jest (elastic#54054)
  [skip-ci] Update vector styling docs for 7.6 UI changes and new features (elastic#55087)
  Fix enable API to schedule task after alert is updated (elastic#55095)
  chore(NA): add 7.6 branch to the list of backport branches (elastic#54998)
  Convert tests to jest in vis_type_timeseries/public & common folders (elastic#55023)
  [ML] Accessibility fix for structural markup on table rows (elastic#55075)
  [Mappings editor] include/exclude fields only support custom options (elastic#54949)
  [Vis] Move Timelion Vis to vis_type_timelion (elastic#52069)
  Deprecate `chrome.navlinks.update` and add documentation (elastic#54893)
  [ML] Single Metric Viewer: Fix time bounds with custom strings. (elastic#55045)
  [Vis: Default editor] EUIficate and Reactify the sidebar (elastic#49864)
  [Mappings editor] Fix cannot set boolean value for "null_value" param (elastic#55015)
  [SIEM] Adds support for apm-* to the network map (elastic#54876)
  [Reporting] Define shims of legacy dependencies (elastic#54082)
  Resolver is overflow: hidden to prevent obscured elements from showing up (elastic#55076)
  Upgraded EUI to 18.2.1 (elastic#55090)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:NP Migration release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Data Plugin] combine autocomplete provider and suggestions provider
10 participants