Skip to content

Releases: elastic/search-ui

v1.3.0

13 Dec 19:56
Compare
Choose a tag to compare

Version 1.3.0 is mainly a bugfix release.

Bugfixes

Enhancements

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

26 Sep 16:42
Compare
Choose a tag to compare

Version 1.2.0 adds a few helpful new features.

Features

Maintenance

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

Screenshot 2019-09-26 12 39 50

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

28 Aug 11:44
Compare
Choose a tag to compare

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

Internal

v1.0.0

16 Jul 11:42
Compare
Choose a tag to compare

1.0.0 (July 16, 2019)

Breaking changes

  • The renderResult prop of Results component has been renamed to resultView to be consistent with other components that accept render functions via view prop. If you used the renderResult prop before, rename it to resultView. (#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 own max-height and overflow: 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-opinionated border/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)
  • 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.
    • 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.
    • 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

09 Jul 13:06
Compare
Choose a tag to compare

0.12.1 (July 3, 2019)

v0.12.0

01 Jul 20:35
Compare
Choose a tag to compare

0.12.0 (July 1, 2019)

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

27 Jun 18:52
Compare
Choose a tag to compare

0.11.0 (June 27, 2019)

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

17 Jun 16:59
Compare
Choose a tag to compare

v0.9.3

10 Jun 17:24
Compare
Choose a tag to compare

v0.9.1

05 Jun 21:15
Compare
Choose a tag to compare

0.9.1 (June 5, 2019)

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 the WithSearch 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 with setState, that the components
    no longer update. See this guide for more information: https://reactjs.org/docs/optimizing-performance.html#examples.
  • SearchConsumer was renamed to WithSearch and now requires a mapContextToProps parameter.

Before:

<SearchConsumer>
  {({ searchTerm, setSearchTerm, results }) => {
    ...
  }}
</SearchConsumer>

After:

<WithSearch
    mapContextToProps={({ searchTerm, setSearchTerm, results }) => ({
      searchTerm,
      setSearchTerm,
      results
    })}
  >
  {({ searchTerm, setSearchTerm, results }) => {
    ...
  }}
</WithSearch>