June 2020 Release (v2.9159)

This page summarizes the improvements and bug fixes introduced in the June 2020 Release (initially released as v2.9159.6).

You can get the latest version of this release (v2.9159.13):

  • From GitHub (2.9159.13)
  • From npm (npm install coveo-search-ui@2.9159.13)
  • From the Coveo CDN:
Resource1 Script to include
CSS (minified)

With SRI:

<link rel="stylesheet" href="https://static.cloud.coveo.com/searchui/v2.9159/13/css/CoveoFullSearch.min.css" integrity="sha512-XH+ZqFGwz5ujYXOL608xChoRjeiRbOwQ6bO0ji809yz+Ep9sA1cffJmQmokQGVHmo9VJ1HK3slF8qVanOCYpow==" crossorigin="anonymous" />

Without SRI:

<link rel="stylesheet" href="https://static.cloud.coveo.com/searchui/v2.9159/css/CoveoFullSearch.min.css" />
Framework (lazy loading, minified)

With SRI:2

<script class="coveo-script" src="https://static.cloud.coveo.com/searchui/v2.9159/13/js/CoveoJsSearch.Lazy.min.js" integrity="sha512-aUKKtxZYL14aUTLmsLhbWtFcn7ROMRP1UAHxQbbsqED2iDtUGK6wG12Co4bIFccW/uUtG7L+zaG6vMdcblaE1g==" crossorigin="anonymous"></script>

Without SRI:

<script class="coveo-script" src="https://static.cloud.coveo.com/searchui/v2.9159/js/CoveoJsSearch.Lazy.min.js"></script>
Templates

With SRI:

<script src="https://static.cloud.coveo.com/searchui/v2.9159/13/js/templates/templates.js" integrity="sha512-r+cnkf/lrKvtvu4GejOjM6EWPcj5loNbQZ/XjE6UcWj78sSxQ9v0+Y5KTtfa2px1cCmi2znZEAERtHdVs87GLQ==" crossorigin="anonymous"></script>

Without SRI:

<script src="https://static.cloud.coveo.com/searchui/v2.9159/js/templates/templates.js"></script>

1: For additional resources, see CDN Links.

2: See Subresource Integrity.

Release Highlights

New Component: FacetsMobileMode

Issue number: JSUI-2957

The new FacetsMobileMode component lets you customize the mobile responsive behavior of facets in your search interface.

<div class="CoveoSearchInterface">
  <div class="CoveoFacetsMobileMode"
       data-is-modal="true"></div>
</div>

Animation: Demo of opening mobile facets in a modal

New Facet / DynamicFacet Method: hasSelectedValue

Issue number: JSUI-2964

The Facet and DynamicFacet components now expose a hasSelectedValue method that simplifies the use of the dependsOnCondition option.

For example, with the following configuration, the Book genre facet will only appear when the Book value is selected in the Product type facet:

document.addEventListener("DOMContentLoaded", () => {
  const root = document.getElementById("search");
  Coveo.init(root, {
    book_genre_facet: {
      dependsOn: "@producttype",
      dependsOnCondition: (parentFacet) => {
        return parentFacet.hasSelectedValue("Book");
      }
    }
  });
  // ...
});
<div id="search" class="CoveoSearchInterface">
  <!-- ... -->
  <div class="coveo-facet-column">
    <div class="CoveoDynamicFacet"
         data-title="Product type"
         data-field="@producttype"></div>
    <div id="book_genre_facet"
         class="CoveoDynamicFacet"
         data-title="Book genre"
         data-field="@bookgenre"></div>
  </div>
  <!-- ... -->
</div>

Prior to this release, the dependsOnCondition function would have had to be more complex:

// ...
Coveo.init(root, {
  book_genre_facet: {
    dependsOn: "@producttype",
    dependsOnCondition: (parentFacet) => {
      const id = parentFacet.options.id;
      const selected = parentFacet.queryStateModel.get(`f:${id}`)
      return selected.includes("Book");
    }
  }
});
// ...

For additional explanations and examples, see Define Dependent Facets.

Issue number: JSUI-2735

You can set the enableFacetSearch option to true on a DynamicHierarchicalFacet component to allow your end users to search for hierarchical values in that facet.

<div class="CoveoDynamicHierarchicalFacet"
     data-field="atlgeographicalhierarchy"
     data-title="Geographical Location"
     data-enable-facet-search="true">

Animation: Demo of a DynamicHierarchicalFacet component with facet search enabled

Other Changes

Issue number Bug fix
JSUI-2758 [Omnibox] Fixed issue where no trending query suggestions were displayed after clearing the search box.
JSUI-2942 [Quickview] Fixed issue where the component created a modal box on the document body instead of on the search interface element.
JSUI-2960 Fixed issue where facet dependsOnCondition was verified before external Omnibox filter was cleared.
JSUI-2961 [FacetRange] Fixed issue where the component was not displaying generated ranges in the proper format.
JSUI-2966 Fixed issue where page scrolled back to the top when clearing the last query state in the URL.
JSUI-2971 [Analytics] Fixed issue where manually defined endpoint value that didn’t end with /rest was not automatically corrected.

Additional Changes in Maintenance Versions

v2.9159.8

Issue number Bug fix
JSUI-2995 [FacetsMobileMode] Fixed button styling on iOS Safari.

2.9159.10

Issue number Bug fix
JSUI-3006 [FacetRange] Fixed issue where component was not displaying specified labels for ranges.

2.9159.13

Issue number Bug fix
JSUI-3028 [ResultLink] Fixed issue that caused some click URIs to break.
Recommended Articles