Releases: elastic/search-ui
Releases · elastic/search-ui
v0.8.0
0.8.0 (May 2, 2019)
- Configurable
ResultsPerPage
component options (@m-sureshraj in #224) - Connector-less usage (@JasonStoltz in #225)
- Swapped autocomplete and autosuggest ordering in Autocomplete (@JasonStoltz in #222)
- Added cursor pointer to facet checkbox on hover (@JasonStoltz in #221)
- Containers no longer hide themselves by default before first search (@byronhulcher in #203)
- Fix warning message about importing browserHistory (@byronhulcher in #215)
Breaking Changes
- Connector-less usage introduces breaking changes for the Connector layer. This would impact anyone who has
implemented any sort of Connector directly (#225). The following interface methods have been renamed:click
->onResultClick
autocompleteClick
->onAutocompleteResultClick
search
->onSearch
autocomplete
->onAutocomplete
- The ordering of "autocompleteResults" and "autocompleteSuggestions" has been swapped in the default view of
Autocomplete
. If you are using the default view these will be visibly different (#222). - Some components will no longer automatically hide themselves until search results are rendered (#203). This means
you may need to manually hide them using thewasSearched
property from state in order to maintain this behavior.
This affects the following components:PagingInfo
Sorting
ResultsPerPage
v0.7.0
v0.6.1
- Fixed
autocompleteView
prop inSearchBox
v0.6.0
Changes:
- Added autocomplete support to Search UI #113
- The SearchBox component now has many additional configuration options available for using Autocomplete.
- Autocomplete queries can now be configured much like the main search query via configuration on the SearchDriver / SearchProvider.
SearchBox
view now uses Downshift library #135- The
Result
view component signature changed in order to accept primarily just a singleresult
#82 - Query configuration options were moved out of the main configuration in SearchDriver / SearchProvider and are now nested under a
searchQuery
field. Described in Autocomplete Spec: #113, commit 902b431 searchQuery
configuration allows adding static request state configuration to search queries, likefilters
, etc., which are always applied to queries regardless of the current application state. Describe in Autocomplete spec: #113, commit: 121616c- Fixed a number of issues that were occurring when using custom views: #160
- Added a debug option to SearchDriver #169
- Fixed unmount / history issues when using client side routing: #174 #177 #178
Breaking Changes:
- The
SearchBox.js
component inreact-search-ui-views
- This component now uses the Downshift (https://github.com/downshift-js/downshift) library in order to support autocomplete. Since the markup has changed, it is possible that styles that target specific html structures or classes may no longer be valid. onChange
prop in theSearchBox.js
component inreact-search-ui-views
is a function that now accepts a string value, it no longer accepts a browser event.- The signature for
renderResults
in theResult.js
component has changed. Instead of receiving the propsurl
,title
, andfields
, it simply receives aresult
prop. - Likewise, the
Result.js
component inreact-search-ui-views
component has changed, it now accepts a singleresult
prop, and noturl
,title
, andfields
. - Query configuration should no longer be passed directly to a
SearchDriver
orSearchProvider
, they should be nested under a property called "searchQuery". This affects the following properties:- facets
- disjunctiveFacets
- disjunctiveFacetsAnalyticsTags
- conditionalFacets
- search_fields
- result_fields
v0.5.3
v0.5.2 included an unintentional breaking change. This change was reverted as it was meant for v0.6.x, not v0.5.x: a65b056.
Dependencies were fixed in @elastic/react-search-ui to use fixed dependencies on other search-ui packages of the same version. That way, if you install @elastic/[email protected], you won't get @elastic/[email protected], which is not compatible.
v0.5.2
WARNING: This release includes major breaking changes. Do not use this version.
Moved Driver init to CDM in SearchProvider to fix SSR errors
v0.5.1
Fixed regereratorRuntime error
v0.5.0
Breaking changes:
results
model has changed. If you are accessing these directly from state, you will need to update your code. The data complete data model can be seen
here: https://github.com/elastic/search-ui/tree/8ddad47165d17c768a024a134059f215f9096365/packages/react-search-ui/src/types.
Before:
// Results were contained in wrapper objects.
ResultList {
rawResults: [], // List of raw `results` from JSON response
rawInfo: { // Object wrapping the raw `meta` property from JSON response
meta: {}
},
results: [ResultItem], // List of `results` wrapped in `ResultItem` type
info: { // Currently the same as `rawInfo`
meta: {}
}
}
ResultItem {
getRaw(fieldName), // Returns the HTML-unsafe raw value for a field, if it exists
getSnippet(fieldName) // Returns the HTML-safe snippet value for a field, if it exists
}
After:
// Results are now just an array of raw response result items
ex.
[{
title: {
raw: "War and Peace",
snippet: "War and <em>Peace</em>"
}
}]
filters
model has changed. If you are accessing filters directly from state, you will need to update your code. The data model can be seen
here: https://github.com/elastic/search-ui/tree/8ddad47165d17c768a024a134059f215f9096365/packages/react-search-ui/src/types.
Before:
[
{
"states": [
"California"
]
},
{
"acres": [
{
"to": 1000,
"from": 0,
"name": "Small"
}
]
}
]
After:
[
{
"field": "states",
"values": [
"California"
],
"type": "all"
},
{
"field": "acres",
"values": [
{
"to": 1000,
"from": 0,
"name": "Small"
}
],
"type": "all"
}
]
- Connectors have a completely different interface. They now accept state
directly and return state, rather than App Search syntax. If you had
created a custom connector, you will need to rework your solution. More details
on this are documented in the "Creating your own Connector" section of
the README. This will only affect you if you've created a custom connector. - Facet component views have been renamed:
- SingleRangeSelectFacet > SingleSelectFacet
- MultiValueFacet > MultiCheckboxFacet
- SingleValueLinksFacet > SingleLinksFacet