Releases: yext/answers-search-ui
Version 1.4.0
Version 1.4.0
Version 1.4.0 contains numerous new functionality, as well as a styling refresh on the UniversalResults, Pagination, and Facets/FilterBox/FilterOptions components. To clarify things, breaking styling changes have been separated into the Styling Updates section.
Changes
-
In Universal Results, you can now directly set the url for the "View More" link, and whether to display a "View More" link at all.
-
Added analytics on middle-click for links and CTAs.
-
Added ANSWERS.setGeolocation(lat, lng), which allows you to set custom values for latitude and longitude.
-
Pagination now accepts
maxVisiblePagesDesktop
andmaxVisiblePagesMobile
config options, which speicfy the maximum number of visible pages on both desktop and mobile. -
Pagination now accepts an
onPaginate(newPageNumber, oldPageNumber, totalPages)
callback, which is called when the page is changed. By default this scrolls the user to the top of the page. -
Pagination's
showFirst
andshowLast
config options have also been deprecated in favor ofshowFirstAndLastButton
. -
Maps now accept
onPinMouseOver(mapMarker)
andonPinMouseOut(mapMarker)
callbacks for map pins. These operate similarly toonPinClick(mapMarker)
. -
FilterBox/FilterOptions can now filter by distance. This can be used by setting the new
optionType
config to'RADIUS_FILTER'
. -
Facets now accept a
searchable
config option. When true, a search bar will be rendered per facets group, which can be used to search through the available facets. -
We now support click analytics for RTF links. The
target
html attribute can be set inANSWERS.formatRichText(rtfFieldValue, eventOptionsFieldName, target)
. -
VerticalResults now displays static and facet applied filters, in addition to NLP filters, in the applied filters bar. Filters can be hidden on a per fieldId basis using the new
appliedFilters.hiddenFields
config option. -
VerticalResults now accepts an
appliedFilters.removable
config option to true will render static and facet filters as removable tags, which when clicked will remove the filter and trigger a new search. -
VerticalResults no longer flashes while in the
'search-loading'
state. Now, while a search is loading, the last search's results will still display on the screen. -
DirectAnswers now allows you to specify a custom component, through the
defaultCard
config option.
Fixes
-
FilterBox's
onChange
,resetFilters
,resetFiltersLabel
,resetFilter
, andresetFilterLabel
config options were not working. These have been fixed. -
FilterBox will now respect a child filter's specific configuration over its own.
-
FilterSearch and GeoLocationFilter no longer cause a malformed query to be sent on page refresh in certain scenarios.
Styling Updates
-
In UniversalResults, the "View More" link was moved from the upper right of the section to the very bottom. If you were setting this to
display: none
, that will still work as expected. Other custom styling may look slightly out of place. -
In UniversalResults, a chevron icon (essentially the
>
symbol) was added to the right of the "View More" link. If you were creating a chevron icon with a::after
css pseudo-class with something like:&-viewAllLink { @include chevron-after('chevron.svg'); }
you may experience a double icon, which can be easily fixed by removing the above css.
-
In UniversalResults, the default color for the title bar icon was changed to var(--yxt-color-brand-primary). If you would like the previous styling, you can add the following to your stylesheet.
.yxt-Results-titleIconWrapper { color: inherit; }
-
To accommodate cases when the VerticalResults header spans multiple lines, .yxt-ResultsHeader's padding-top was changed from 8px to 4px, padding-bottom was changed to 0px, and padding was added to its child elements instead. If you weren't setting custom spacing here, you won't notice any changes. Hiding .yxt-Results-filters with
display: none
will still work as expected. -
Pagination page button icons have been given a new hover state and icon.
-
Pagination's current active page is now given an id (
#active-page
), and through this a highlighted background color. This can be reset with..yxt-Pagination #active-page { background-color: inherit; }
-
Facets/FilterBox/FilterOptions styling has been updated, notably, instead of the built-in browser checkbox, we now use
::before
and::after
styling on the.yxt-FilterOptions-optionLabel
class.
v1.3.2
Version 1.3.2
Changes
- The SDK's version is now computed automatically, instead of being hard-coded in constants.js.
Fixes
- The behavior of
Answers.init
changed when theAnswers Status
check was added to it. Specifically, the SDK's initialization became asynchronous. Prior to this change, invokinginit
would immediately initialize the internals of the library. The AEB is dependent on this synchronous behavior. By fixing the status check to block onlyonReady
, this patch ensures the desired, synchronous behavior. - Fixed incorrect margin styling for SDK cards.
- Corrected minor styling for the AccordionCard.
- Added a needed null check in the AccordionCard's Handlebars template.
v1.2.2
Version 1.2.2
Fixes
- The behavior of
Answers.init
changed when theAnswers Status
check was added to it. Specifically, the SDK's initialization became asynchronous. Prior to this change, invokinginit
would immediately initialize the internals of the library. The AEB is dependent on this synchronous behavior. By fixing the status check to block onlyonReady
, this patch ensures the desired, synchronous behavior.
v1.3.1
v1.2.1
v1.3.0
Version 1.3.0
Changes
- Added geolocationOptions and geolocationTimeoutAlert config to the SearchBar, GeolocationFilter, and LocationBias components. These options let the user configure the HTML5 Geolocation API used to determine a user's location, as well as whether to display an alert when this fails or timeouts (by default no alert is shown).
v1.1.2
v1.2.0
Version 1.2.0
Changes
- Added a kill-switch to the SDK. The kill-switch checks the experience's Answers Status page. If the status is "disabled", the user-supplied onReady will not be called.
- CSS variables are now used for many of the common style attributes. This allows a user to easily override colors, spacing, etc.
- The top-level noResults configuration has been deprecated. Such configuration should now be passed directly to the affected components.
v1.1.1
Version 1.1.1
Fixes
- Corrected confusing wording in the README and added missing documentation.
- Fixed the border colors used for Applied Filters.
- Pagination icons are now centered vertically.
v1.1.0
Version 1.1.0
Changes
- Added a new configuration option, useForm, to the SearchBar. This allows the user to specify if the query submission context should use a form. For backwards compatibility, this parameter is true by default.
- Added the BSD-3 license file.
Fixes
- Assorted corrections and updates to the SDK's README.
- Fixed the bug causing the LocationBias component's accuracy text to always be 'Device'.