Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.24 #951

Merged
merged 17 commits into from
Sep 14, 2021
Merged

v1.24 #951

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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