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

merged 17 commits into from
Sep 14, 2021

Conversation

tmeyer2115
Copy link
Collaborator

Version 1.24.0

Features

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. (Add google's text highlighting on DA view details link #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

cea2aj and others added 17 commits August 24, 2021 18:46
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
### Bug Fixes
- Corrected a typo that was causing hours information to be improperly localized in our formatters. (#936)
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 8.61% when pulling 421e0bb on release/v1.24 into 2bc4ff5 on master.

@tmeyer2115 tmeyer2115 merged commit c345e23 into master Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants