Create a pre wired version of SearchBar#46702
Merged
lizozom merged 26 commits intoelastic:masterfrom Oct 2, 2019
Merged
Conversation
added 7 commits
September 26, 2019 14:31
Pass storage and autocomplete to createSearchBar method Add appName and autocomplete to IDataPluginServices QueryBarInput to consume autocomplete and appName from context QueryBarTopRow to consume appName from context Remove appName from SearchBar Added AutocompletePublicPluginSetup and AutocompletePublicPluginStart types
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
added 4 commits
September 26, 2019 19:08
Contributor
|
Pinging @elastic/kibana-app-arch |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
💔 Build Failed |
Contributor
|
@Bargs you might also be interested in this PR |
added 4 commits
September 29, 2019 13:11
Contributor
💔 Build Failed |
Contributor
Author
|
retest |
streamich
approved these changes
Sep 30, 2019
src/legacy/core_plugins/data/public/query/query_bar/components/query_bar_input.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/data/public/query/query_bar/components/query_bar_input.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/data/public/query/query_bar/components/query_bar_input.tsx
Show resolved
Hide resolved
src/legacy/core_plugins/data/public/search/search_bar/components/bind_search_bar.tsx
Show resolved
Hide resolved
TinaHeiligers
approved these changes
Sep 30, 2019
Contributor
TinaHeiligers
left a comment
There was a problem hiding this comment.
Looks ok to me once ci passes
added 3 commits
October 2, 2019 10:20
Contributor
💚 Build Succeeded |
flash1293
approved these changes
Oct 2, 2019
Contributor
flash1293
left a comment
There was a problem hiding this comment.
Graph changes look good to me
Contributor
💚 Build Succeeded |
lizozom
pushed a commit
to lizozom/kibana
that referenced
this pull request
Oct 2, 2019
* Bind search bar * create prewired data components * Pass NP data plugin to shim plugin, to access autocomplete Pass storage and autocomplete to createSearchBar method Add appName and autocomplete to IDataPluginServices QueryBarInput to consume autocomplete and appName from context QueryBarTopRow to consume appName from context Remove appName from SearchBar Added AutocompletePublicPluginSetup and AutocompletePublicPluginStart types * Use KibanaContextProvider in vis editor and graph * Use KibanaContextProvider in maps * Use prewirted SearchBar in TopNavMenu * Use KibanaContextProbider in Lens * Fix appName usage in query bar input * fixed query bar top row appName * update tests * fixed bind search bar bug * mock SearchBar * Removed unnecessary mocks * Delete unused mock * Fixed exporting of data plugin types * Updated maps snapshot * Fixed some TS issues * Fixed jest tests * Context adjustments in TSVB * componentWillMount * Code review fixes * Pass dataTestSubj to query bar input * Graph data
lizozom
pushed a commit
that referenced
this pull request
Oct 2, 2019
* Bind search bar * create prewired data components * Pass NP data plugin to shim plugin, to access autocomplete Pass storage and autocomplete to createSearchBar method Add appName and autocomplete to IDataPluginServices QueryBarInput to consume autocomplete and appName from context QueryBarTopRow to consume appName from context Remove appName from SearchBar Added AutocompletePublicPluginSetup and AutocompletePublicPluginStart types * Use KibanaContextProvider in vis editor and graph * Use KibanaContextProvider in maps * Use prewirted SearchBar in TopNavMenu * Use KibanaContextProbider in Lens * Fix appName usage in query bar input * fixed query bar top row appName * update tests * fixed bind search bar bug * mock SearchBar * Removed unnecessary mocks * Delete unused mock * Fixed exporting of data plugin types * Updated maps snapshot * Fixed some TS issues * Fixed jest tests * Context adjustments in TSVB * componentWillMount * Code review fixes * Pass dataTestSubj to query bar input * Graph data
Contributor
|
@lizozom can you please add a DevDocs section? |
Contributor
💔 Build Failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autocompleteuitoDataStartto host stateful componentscreateSearchBarfunction to create a statefulSearchBarSearchBarInjectedDepsandSearchBarOwnPropsforcreateSearchBardatashim tests to have a single function wrapping elements in Context.npStartdependency fromQueryBarInputby usingautocompleteprovided byKibanaContextProvider@alexwizpomitfromrenderas it wasn't adding any attributes.SearchBarinTopNavMenuand remove injected state fromkbn_top_nav.KibanaContextProvidertovis_type_timeseries,vis/editors,graph,mapsandlensChecklist
Dev Docs
In order to use any of our stateful components, you are going to have to wrap your application on the topmost level with a
KibanaContextProvider:Assuming new platform syntax:
Then, inside a react component, you may use our stateful component, that requires less input and confuguration:
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers