Releases: elastic/search-ui
v1.3.0
Version 1.3.0 is mainly a bugfix release.
Bugfixes
- Replace debounce-fn in DebounceManager to facilitate IE11 compatibility (@AndrewTziAnChan in #442)
- Fix: Facets will break if a document includes an empty string (@JasonStoltz in #424)
- Support rehydrating search state from URL when more than 20 filters are applied (@johanarnor in #420)
- Fix SS console warning when no tags (@JasonStoltz in #416)
- Fix pagination locale (@yakhinvadim in #408)
Enhancements
- Documented and enhanced the debug flag (@JasonStoltz in #418)
- Changed sandbox to load search results on load (@JasonStoltz in #417)
- Pass down downshift props to
InputView
(@FokkeZB in #402) - Create SECURITY.txt (@ThomasTail in #398)
For a full list of issues, see the 1.3 milestone:
https://github.com/elastic/search-ui/issues?utf8=%E2%9C%93&q=milestone%3A1.3+is%3Aclosed+
v1.2.0
Version 1.2.0 adds a few helpful new features.
Features
- Added support for an initial search on load (@andersosthus in #392)
- Added batch actions and the new "shouldClearFilters" option (@JasonStoltz in #391)
- Added BooleanFacet component (@Jfelix61 and @brianearwood in #383)
Maintenance
- Updated to the latest App Search API client (@JasonStoltz in #384)
Details
Initial Search
You can now enable alwaysSearchOnInitialLoad to performance a search when the page loads without a user having to submit the search form:
<SearchProvider
config={{
alwaysSearchOnInitialLoad: true
}}
>
Batch actions and shouldClearFilters
option
Batch actions allow you to call multiple actions in a row without incurring multiple API requests:
setSearchTerm("park");
addFilter("states", "Alaska", "any");
addFilter("states", "California", "any");
As part of this change, we've also added support for a shouldClearFilters
flag, which lets you decide whether or not changing the current search term should clear out the current filter selections. The default previously was to always clear filters when the search term changes.
addFilter("states", "Alaska", "any");
addFilter("states", "California", "any");
setSearchTerm("park", { shouldClearFilters: false });
<SearchBoxContainer
shouldClearFilters={false}
/>
Both of these features are helpful in a case where you have a search form with a submit button. Typically in search experiences, filters are applied immediately upon selection. But in the case of something like an "Advanced Search" form, filters are all applied at once only when a submit button is pressed. Being able to batch all actions at once on form submit makes this possible in Search UI.
See #391 for more detail.
BooleanFacet
The BooleanFacet
is a new view for Facet
components to be used when you have simple boolean toggles. Imagine data fields on a restaurant search app... "Good for children", "Allows pets", "Open for dinner", etc.
v1.1.0
v1.1.0 release introduces basic mobile styles and adds some accessibility and UI improvements.
Features
- Add basic/MVP mobile UX for layout sidebar (@constancecchen in #344)
- Add accessible screen reader live region and notifications (@constancecchen in #359)
- Modify the way empty string searches are displayed in the Pagination Info (@Kacppian in #360)
- Make search input placeholder more universal (@Jfelix61 in #374)
- Make all components and containers pass ...rest props to their children (@Jfelix61 in #368)
Bug fixes
- Fix endpointBase not taken into account in AppSearchAPIConnector (@Jfelix61 in #375)
Maintenance
- Update documentation (@JasonStoltz in #343, #356, #362, #363, #364; @constancecchen in #351, #361, @yakhinvadim in #350, #357)
- Update dependencies (@JasonStoltz in #349)
Internal
- Bake in subfolder installs into
npm install
(@constancecchen in #353) - Fix for PagingInfo showing a higher end than possible (@constancecchen in #354)
- Fix non-working mockSearchResponse in SearchDriver test (@constancecchen in #358)
- Update licensing (@JasonStoltz in #373)
- Remove changelog and package-lock.json (@yakhinvadim in #379)
v1.0.0
1.0.0 (July 16, 2019)
- [a11y] Make the “+ More” action for showing more filters keyboard accessible (@constancecchen in #311)
- Rename render result to result view (@yakhinvadim in #312)
- Fix issue where paging info would show a higher end than possible (@constancecchen in #318)
- Fix ResultsPerPage vertical alignment on mobile (@constancecchen in #336)
- Remove max-height+scrolling on Result card body (@constancecchen in #335)
- Facet CSS cleanup (@constancecchen in #324)
- Fix misc. Edge cross-browser styling issues (@constancechen in #341)
- Removed babel polyfill (@JasonStoltz in #340)
Breaking changes
-
The
renderResult
prop ofResults
component has been renamed toresultView
to be consistent with other components that accept render functions viaview
prop. If you used therenderResult
prop before, rename it toresultView
. (#312) -
Result
component no longer cut off/scroll content past 300px height, and now expand to display all their content. If you were previously relying on this scroll behavior, please re-add your ownmax-height
andoverflow: auto
CSS to.sui-result__details
(#335) -
MultiCheckboxFacet
markup changes:- Filter groups with multiple checkboxes now use the more semantic and accessible
<fieldset>
/<legend>
markup, which provides more context clues for screen readers. This does come with some browser-opinionatedborder
/margin
/padding
defaults, which users with completely custom CSS may now need to override. (#319) - For filter checkbox groups, the “+ More” action now uses the more semantic and accessible
<button>
tag, which allows keyboard and screen reader users to interact with the action. This does come with some browser-opinionated default styling, which users with completely custom CSS may now need to override. (#311)
- Filter groups with multiple checkboxes now use the more semantic and accessible
-
Facet
CSS class changes: (#324)MultiCheckboxFacet
:- The
.sui-multi-checkbox-facet
class is now located where.sui-multi-checkbox-facet__options-list
used to be..sui-multi-checkbox-facet__options-list
has been removed .sui-multi-checkbox-facet__view-more
has been renamed to.sui-facet-view-more
- The
. sui-multi-checkbox-facet__label
class has been removed for redundancy. You can use the generic.sui-facet__title
to target all filter labels at once.
- The
SingleSelectFacet
&SingleLinksFacet
:- The
.sui-search-facet
class has been removed for redundancy. You can use the generic.sui-facet
class to target all filter facet groups at once. - The
.sui-search-facet__label
class has been removed for redundancy. You can use the generic.sui-facet__title
to target all filter labels at once.
- The
SingleLinksFacet
:- Several class names have been renamed for specificity:
.sui-facet__list
has been renamed to.sui-single-option-facet
.sui-facet__selected
has been renamed to.sui-single-option-facet__selected
.sui-facet__remove
has been reamed to.sui-single-option-facet__remove
.sui-facet__item
has been renamed to.sui-single-option-facet__item
.sui-facet__link
has been renamed to.sui-single-option-facet__link
v0.12.1
0.12.1 (July 3, 2019)
- Fixed a CSS bug (@JasonStoltz in #301)
- Apply passed className prop to Layout component (@constancecchen in #310)
v0.12.0
0.12.0 (July 1, 2019)
- Removed Roboto font (@JasonStoltz in #296)
Breaking Changes
The Roboto font is no longer used by this library. We default to system fonts
instead. We do this to minimize the size, number of dependencies, and overall
surface area for this library. When you get this latest version, you may
see a visual difference due to the font changes.
v0.11.0
0.11.0 (June 27, 2019)
- Fixed issue with state not updating (@JasonStoltz in #291)
_meta
field is now returned in results for App Search Connector (@JasonStoltz in #277)- Added a inputView option to SearchBox component (@JasonStoltz in #273)
- Loosened the "Result" object schema (@JasonStoltz in #271)
- Removed "additionalOptions" from connectors and replaced with before* hooks (@JasonStoltz in #270)
Breaking Changes
There is only 1 in this release. The additionalOptions
option was removed from SiteSearchAPIConnector
, and AppSearchAPIConnector
.
They were replaced with 3 separate hooks:
beforeAutocompleteSuggestionsCall
beforeAutocompleteResultsCall
beforeSearchCall
Please check the ADVANCED.md
guide for more information. Generally speaking, the new API
signature looks like the following:
// Example of using beforeSearchCall to append an additional option on an API request
const connector = new AppSearchAPIConnector({
searchKey: "search-xxxxxxxxxxxxxxxxxxxx",
engineName: "search-data",
hostIdentifier: "host-xxxxxx",
beforeSearchCall: (existingSearchOptions, next) =>
next({
...existingSearchOptions,
group: { field: "title" }
})
});
v0.10.0
- Cursor fix on autocomplete (@zumwalt in #259)
- Added Geo Facet filter support (@JasonStoltz in #260)
- Fixed layout issue in Results css (@JasonStoltz in #266)
- Fixed core-js error (@JasonStoltz in #267)
v0.9.3
- Fixed withSearch CDM (@JasonStoltz in #257)
v0.9.1
0.9.1 (June 5, 2019)
- Updated Facet component to support quick search filter options (@m-sureshraj in #248)
- Performance fixes (@JasonStoltz in #249)
Breaking Changes
The performance fixes PR introduced significant changes to the Search UI API.
-
Search UI now has a peer dependency on react 16.8, bumped from 16.6.
-
SearchProvider
no longer accepts a function as a child. This will affect
EVERY Search UI implementation. If you were previously accessing State or Actions
in that render prop, you will now need to instead use theWithSearch
component.ex.
Before:
<SearchProvider config={config}> {({ searchTerm, setSearchTerm, results }) => { ... }} </SearchProvider>
After:
<SearchProvider config={config}> <WithSearch mapContextToProps={({ searchTerm, setSearchTerm, results }) => ({ searchTerm, setSearchTerm, results })} > {({ searchTerm, setSearchTerm, results }) => { ... }} </WithSearch> </SearchProvider>
-
The API for
withSearch
has changed. You now must specify which actions and state you need in a
mapContextToProps function.
Before:
export default withSearch(ResultsContainer);
After:
export default withSearch(({ results }) => ({ results }))(ResultsContainer);
- All components in this library, and components created with
withSearch
are now
"Pure Components". It is possible that if you were mutating state incorrectly withsetState
, that the components
no longer update. See this guide for more information: https://reactjs.org/docs/optimizing-performance.html#examples. SearchConsumer
was renamed toWithSearch
and now requires amapContextToProps
parameter.
Before:
<SearchConsumer>
{({ searchTerm, setSearchTerm, results }) => {
...
}}
</SearchConsumer>
After:
<WithSearch
mapContextToProps={({ searchTerm, setSearchTerm, results }) => ({
searchTerm,
setSearchTerm,
results
})}
>
{({ searchTerm, setSearchTerm, results }) => {
...
}}
</WithSearch>