Skip to content

Commit

Permalink
v1.24.0
Browse files Browse the repository at this point in the history
## Version 1.24.0
### Features
- A new formatter was added that prints the list of categories applied to an entity. (#946)
- Added a new localized price range formatter. (#943)

### Enhancements
- Google's text highlighting was added to the "View Details" link on the `document-search` Direct Answer card. Note that
the highlighting is only applied when the user's browser is Chrome. (#945)
- The Open Status translations are no longer hard-coded in `static` JS files. Instead, they are sourced from the Theme's
.PO files. This means they can be overridden in custom .PO files. 

### Bugfixes
- Styling was added to the `prominent-image` and `prominent-video` cards to ensure that images and videos, respectively, 
are the same size. (#941, #950)
  • Loading branch information
tmeyer2115 authored Sep 14, 2021
2 parents 2bc4ff5 + 421e0bb commit c345e23
Show file tree
Hide file tree
Showing 53 changed files with 2,134 additions and 1,508 deletions.
4 changes: 4 additions & 0 deletions cards/card_component.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ BaseCard["{{componentName}}"] = class extends ANSWERS.Component {
* only if such a toggle is present in the DOM.
*/
onMount() {
//polyfill for image styling (object-fit) in ie11
const images = document.querySelectorAll('.HitchhikerProductProminentImage-img');
HitchhikerJS.objectFitImages(images);

const showExcessDetailsToggleEls = this._container.querySelectorAll('.js-HitchhikerCard-detailsToggle');
const excessDetailsEls = this._container.querySelectorAll('.js-HitchhikerCard-detailsText');
if (showExcessDetailsToggleEls && excessDetailsEls) {
Expand Down
6 changes: 3 additions & 3 deletions cards/multilang-product-prominentvideo/template.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="HitchhikerProductProminentVideo {{cardName}}">
<div class="HitchhikerProductProminentVideo-header">
{{> video }}
<div class="HitchhikerProductProminentVideo-body">
{{> title }}
{{> subtitle }}
{{> content }}
</div>
{{> video }}
{{> content }}
</div>

{{#*inline 'title'}}
Expand Down
6 changes: 3 additions & 3 deletions cards/product-prominentvideo/template.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="HitchhikerProductProminentVideo {{cardName}}">
<div class="HitchhikerProductProminentVideo-header">
{{> video }}
<div class="HitchhikerProductProminentVideo-body">
{{> title }}
{{> subtitle }}
{{> content }}
</div>
{{> video }}
{{> content }}
</div>

{{#*inline 'title'}}
Expand Down
2 changes: 1 addition & 1 deletion commands/helpers/utils/jamboconfigutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports.parseJamboConfig = function () {
* @param {string} partialsPath The local path to the set of partials.
*/
exports.addToPartials = function (partialsPath) {
const jamboConfig = parseJamboConfig();
const jamboConfig = exports.parseJamboConfig();
const existingPartials = jamboConfig.dirs.partials;

const shouldAddNewPartialsPath =
Expand Down
3 changes: 2 additions & 1 deletion directanswercards/documentsearch-standard/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ class documentsearch_standardComponent extends BaseDirectAnswerCard['documentsea
} else if (snippet) {
snippetValue = Formatter.highlightField(snippet.value, snippet.matchedSubstrings);
}
const viewDetailsUrl = relatedItemData.website || (relatedItemData.fieldValues && relatedItemData.fieldValues.landingPageUrl);

return {
value: answer.value,
snippet: snippetValue, // Text snippet to include alongside the answer
viewDetailsText: relatedItemData.fieldValues && relatedItemData.fieldValues.name, // Text below the direct answer and snippet
viewDetailsLink: relatedItemData.website || (relatedItemData.fieldValues && relatedItemData.fieldValues.landingPageUrl), // Link for the "view details" text
viewDetailsLink: Formatter.getUrlWithTextHighlight(snippet, viewDetailsUrl), // Link for the "view details" text
viewDetailsEventOptions: this.addDefaultEventOptions({
ctaLabel: 'VIEW_DETAILS',
fieldName: 'snippet'
Expand Down
1 change: 1 addition & 0 deletions layouts/html.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
if (window.name == 'overlay') {
window.isOverlay = true;
}
{{> script/translations}}
{{/babel}}
</script>
{{> layouts/headincludes }}
Expand Down
Loading

0 comments on commit c345e23

Please sign in to comment.