-
Notifications
You must be signed in to change notification settings - Fork 5
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
v1.24 #951
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge master (v1.23.0) into develop
- update package.json to include puppeteer packages, remove percyScript. - update index.js and camera to use puppeteer and its percySnapshot function J=SLAP-1470 TEST=auto
Automate translation process for static translations using jambo translation helper functionality - move translations from static folder to a partial. This include open-status, headers, and prettyPrintBoolean strings. - use the translations partial in html.hbs layout to put translations in window - access window.translations in `stringlocalizer.js` and formatters-internal.js` to pull the appropriate translated string - remove now unused translations js files J=SLAP-1477 TEST=compile & manual launched test site with en and es locales, see that the text in KM page is translated propertly. See that window.hitchhiker_theme_translations in inspector console contains the translated strings
use the defined field `this._locale` instead of `this.locale`. This will cause some changes in percy snapshots launched test site and see that es pages use h24 format and en use h12 format Co-authored-by: Yen Truong <ytruong@yext.com>
Unfortunately a number of jambo's internal helpers are defined on the global namespace. https://github.com/yext/jambo/pull/19/files Then, when custom commands were added to the theme, a number of these helpers were copy pasted from jambo. However, they were slightly modifier to NOT reassign the helpers that were on the global namespace, while still using the global parseJamboConfig() inside addToPartials(). i.e., when you write javascript like the below, WITHOUT using a declaration like let or const ```js myFunction = function() {} ``` what you are doing is creating a GLOBAL variable. Using the var declaration also does this. This bug was found when trying to migrate to typescript, which does not allow for this syntax. J=SLAP-1493 TEST=manual ran the custom card command saw it add to the jambo.json partials list and create a custom card
- Added Formatter.priceRange() function that utilize `locale-currency` and `currency-symbol-map` npm library to retrieve currency symbol based on location's country code (ISO format), and construct the price range accordingly. - exclude `currency-symbol-map` from the node_modules exclusion in webpack babel for production build so it can be transpile to es5 J=SLAP-1552 TEST=manual&auto - added jest test for Formatter.priceRange - add priceRange for a UK location entity. Launched test site and see that it's displayed in £ instead of default $
- update css for product-prominentimage-clickable and product-prominentimage cards to have fixed height of 300px that fill the whole width (maintain its aspect ratio, clipped to fit) - the height is a customizable css variable - since object-fit doesn't work in ie11, a polyfill library (object-fit-images) is used to adjust the image. J=SLAP-1553 TEST=manual - add product entities with different image sizes, launched test site and see that all images are properly sized. tested in IE11, chome, and safari
- add a formatter getCategoryNames that will return a list of category names based on the list of category ids and HH supplied map of id to display name J=SLAP-823 TEST=auto add jest test and see that it passed successfully
- update documentsearch-card to modify a given website/landingpage url from the snippet to tag on a text fragment URI component - use useragent.js from SDK to determine if it's Chrome J=SLAP-1553 TEST=manual search 'who is mario?' and see that the link from direct answer provide proper text highlight from the snippet
- check common-partial scripts, remove extra parenthesis from filterbox - update test: fix fiterbox fixture, add static filters to healthcare vertical page and add a percy snapshot to test them
direct answer may return a snippet with no matchSubstring, add a check for that before constructing url with text highlighting TEST=manual&auto - test a query that return a Direct answer without any matched substrings, see that no error occur and url is still working - add jest test
- update priceRange formatter function to determined the price range string in following order: - use provided country code to determine the currency symbol - if country code is invalid or undefined, use site locale to determine the currency symbol - if all else fails, return the default price range, which is in $ TEST=auto add more cases in jest test, all passed
Move the videos in the video cards to the top so that the videos are aligned By moving the videos to the top of the card, we match the layout of the product image cards. The original video card spec has the video below the title, however this causes alignment issues when the card title overflows onto the next line since the videos are now out of alignment. CSS Subgrid is the proper way to align content across cards, (https://www.smashingmagazine.com/2018/07/css-grid-2/) however currently it's only supported on firefox so we can't go that route yet. For now, we simply move the video to the top of the cards. J=none TEST=manual Test the card locally and confirm the layout looks the same as the product image cards. Add CTAs and subtitles locally and confirm they look good as well
…eme into release/v1.24
yen-tt
approved these changes
Sep 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version 1.24.0
Features
Enhancements
document-search
Direct Answer card. Note thatthe highlighting is only applied when the user's browser is Chrome. (Add google's text highlighting on DA view details link #945)
static
JS files. Instead, they are sourced from the Theme's.PO files. This means they can be overridden in custom .PO files.
Bugfixes
prominent-image
andprominent-video
cards to ensure that images and videos, respectively,are the same size. (uniform product image size #941, Move video to top of video cards #950)