-
Notifications
You must be signed in to change notification settings - Fork 11
Localize the Mapbox map based on the search locale #524
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
Conversation
J=WAT-4874 TEST=manual spun up test-site with 'es' locale, saw map labels in Spanish.
Current unit coverage is 91.44981412639405% |
Verified map is localized when locale is set to valid ones like 'en', 'en_US', 'ja', 'ja_JP', 'fr_FR', 'zh_Hans_CN', etc Verified map is in English when locale is invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I know you had talked about adding tests for the locales though, so if you add those I'll re-approve.
Separately, let's make sure the develop
branch gets all the changes from the main branch here 🙂
* Version 1.8.0 This PR adds Generative Direct Answers (GDA) and GDA analytics. Full merge thread can be found below - many of the changes were already in main and were just merged into the develop branch while developing. * add generativeDirectAnswer support (#441) J=CLIP-1226 TEST=auto,manual added unit and visual regression test, ran and saw tests passed added GDA to test-site App and verified that the appropriate gda content shows up and the UI looks as expected * Added storybook stories for generative direct answer component (#442) J=CLIP-1226 TEST=manual ran `npm run storybook` * update search-headless-react dependencies version to 2.5.0-beta.3 (#443) New version has `queryDurationMillis` as an optional field of VerticalResults J=CLIP-1226 TEST=auto,manual ran `npm run test` temporarily added GDA to ProductsPage in test site and verified that the appropriate gda content shows up after a vertical search. * support clickable citation card with link (#444) J=CLIP-1332 TEST=auto,manual ran `npm run test` and test manually on test-site * GDA: citations component override (#451) Changes: - Added `CitationsContainer` prop to `<GenerativeDirectAnswer>` to allow custom components to be passed in - Updated test cases and test-site with new component passed through J=CLIP-1369 TEST=manual|auto Ran `npm run build`, `npm run test`, and `npm run wcag` and did manual testing on test-site * Check for search id before executing GDA (#454) J=CLIP-1461 TEST=auto,manual ran `npm run test` and tested manually on test-site to verified gda is executed as expected * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * increment versions * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * decrement package * Function Vertical Support via search-core/headless upgrade (#459) This change upgrades the version for search-core and search-headless to catch the changes which add support for function verticals. It also adds a function vertical page to the test-site for easier testing. An image of that page is attached. J=WAT-3474 TEST=auto,manual Tested via test-site, saw responses returned were upper cased as expected by the plugin, and the source was FUNCTION_VERTICAL. <img width="1603" alt="Screenshot 2024-08-29 at 4 03 26 PM" src="https://github.com/user-attachments/assets/14e939eb-0ac3-493f-be83-44fdf9350358"> * do not display GDA citations without name field (#468) J=CLIP-1565 TEST=auto,manual added and ran jest test verfied locally using test-site that divider and citations section are not displayed without minimum citation data * Fix hook issues caused by citations rendering (#469) TEST=manual function as before on test-site. Verified it doesn't cause error in ALPHA * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * try remaking package locks * use develop package locks * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Automated update to repo's documentation from github action * remake package locks * Add analytics event for Generative Direct Answer card (#486) * Add analytics event for Generative Direct Answer card J=WAT-4600,WAT-4604 TEST=auto,manual added unit test tested manually on test-site: - clicked on a citation and saw the citation click event logged in snowflake - hardcoded a link in the gda text, clicked on the link, saw cta click event logged in snowflake --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * try copying package lock * Upgrade versions to non-beta * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check --------- Co-authored-by: sahilvaidya <41973320+sahilvaidya@users.noreply.github.com> Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com> Co-authored-by: Yen Truong <36055303+yen-tt@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Add optional ariaLabel prop to FilterSearch to set aria-label on input * Automated update to repo's documentation from github action * Update version to 1.8.1 * Fix test build errors * Add esbuild to dev deps to force upgrade * try installing playwright before run test for react 16 * seemed to work with react 16, try for other versions * bump version * Automated update to repo's documentation from github action * add playwright install to wcag action * Add iframeWindow and allowUpdates props to MapboxMap. Also add zoom buttons * remove console.log * missed a couple calls to the mapboxInstance * update coverage workflow to install playwright * update snapshot workflow with playwright * Update snapshots * synchoronize mapbox gl version in test site and src * v1.8.3: Add debouncing to filter search and autocomplete (#511) This adds debouncing to the autocomplete and filter search calls. Currently, this is set to 200ms. This means that we will not fire autocomplete or filter search requests until 200ms has elapsed since the last keystroke, in order to save on unnecessary queries while the user is still actively typing. This number was chosen based on the average typing speed being roughly 4-5 characters per second. * Deduplicate generative answer sources (#514) If an entity is present in search results more than once (e.g. returned by two different verticals) and is cited by the GDA, it appeared in the sources more than one. This change dedups the search results while determining the sources to prevent this. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Import `@tailwindcss/typography` for markdown styling. (#516) J=TECHOPS-14112 TEST=manual verified that bulleted list and numbered list are now being rendered on test-site as expected. * Support interactive mapbox pins (#518) J=WAT-4849 TEST=manual pnpm pack this change along with a visual-editor change, point my starter branch to my packed versions and confirmed it working in platform * v1.8.7 Improve MapboxMap zoom, render, and styling functionality (#520) - call .resize() when a change is detected to the mapContainer when in an iframe. Previously, the map could render before the container, and it would not be sized correctly - trigger the onDrag function when the user zooms on the map. Typically this function is used to update the map bounds, which meant we previously did not do this when changing the zoom, which caused the wrong map area to be searched. - Add an optional pinColor property. This provides an easy way to set the color of the Mapbox pins when the implementation is not using a custom PinComponent or renderPin function. Commits: * various MapboxMap updates * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Replace pinColor with markerOptionsOverride (#522) This allows user to specify options other than the pin color as well. Updated test-site to specify a pin color and a pin size based on pin selection, and confirmed it work * Localize the Mapbox map based on the search locale (#524) J=WAT-4874 TEST=manual,auto Added jest test Spun up test-site, verified map is localized when locale is set to valid ones like 'en', 'en_US', 'ja', 'ja_JP', 'fr_FR', 'zh_Hans_CN', etc. Verified map is in English when locale is invalid. * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: Fondryext <160865254+Fondryext@users.noreply.github.com> Co-authored-by: sahilvaidya <41973320+sahilvaidya@users.noreply.github.com> Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com> Co-authored-by: Yen Truong <36055303+yen-tt@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tharunya Potla <tpotla@yext.com> Co-authored-by: Kyle Gerner <49618240+k-gerner@users.noreply.github.com> Co-authored-by: Kyle Gerner <kgerner@yext.com> Co-authored-by: mkouzel-yext <mkouzel@yext.com> Co-authored-by: anguyen-yext2 <anguyen@yext.com>
* Version 1.8.0 This PR adds Generative Direct Answers (GDA) and GDA analytics. Full merge thread can be found below - many of the changes were already in main and were just merged into the develop branch while developing. * add generativeDirectAnswer support (#441) J=CLIP-1226 TEST=auto,manual added unit and visual regression test, ran and saw tests passed added GDA to test-site App and verified that the appropriate gda content shows up and the UI looks as expected * Added storybook stories for generative direct answer component (#442) J=CLIP-1226 TEST=manual ran `npm run storybook` * update search-headless-react dependencies version to 2.5.0-beta.3 (#443) New version has `queryDurationMillis` as an optional field of VerticalResults J=CLIP-1226 TEST=auto,manual ran `npm run test` temporarily added GDA to ProductsPage in test site and verified that the appropriate gda content shows up after a vertical search. * support clickable citation card with link (#444) J=CLIP-1332 TEST=auto,manual ran `npm run test` and test manually on test-site * GDA: citations component override (#451) Changes: - Added `CitationsContainer` prop to `<GenerativeDirectAnswer>` to allow custom components to be passed in - Updated test cases and test-site with new component passed through J=CLIP-1369 TEST=manual|auto Ran `npm run build`, `npm run test`, and `npm run wcag` and did manual testing on test-site * Check for search id before executing GDA (#454) J=CLIP-1461 TEST=auto,manual ran `npm run test` and tested manually on test-site to verified gda is executed as expected * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * increment versions * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * decrement package * Function Vertical Support via search-core/headless upgrade (#459) This change upgrades the version for search-core and search-headless to catch the changes which add support for function verticals. It also adds a function vertical page to the test-site for easier testing. An image of that page is attached. J=WAT-3474 TEST=auto,manual Tested via test-site, saw responses returned were upper cased as expected by the plugin, and the source was FUNCTION_VERTICAL. <img width="1603" alt="Screenshot 2024-08-29 at 4 03 26 PM" src="https://github.com/user-attachments/assets/14e939eb-0ac3-493f-be83-44fdf9350358"> * do not display GDA citations without name field (#468) J=CLIP-1565 TEST=auto,manual added and ran jest test verfied locally using test-site that divider and citations section are not displayed without minimum citation data * Fix hook issues caused by citations rendering (#469) TEST=manual function as before on test-site. Verified it doesn't cause error in ALPHA * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * try remaking package locks * use develop package locks * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Automated update to repo's documentation from github action * remake package locks * Add analytics event for Generative Direct Answer card (#486) * Add analytics event for Generative Direct Answer card J=WAT-4600,WAT-4604 TEST=auto,manual added unit test tested manually on test-site: - clicked on a citation and saw the citation click event logged in snowflake - hardcoded a link in the gda text, clicked on the link, saw cta click event logged in snowflake --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * try copying package lock * Upgrade versions to non-beta * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check --------- Co-authored-by: sahilvaidya <41973320+sahilvaidya@users.noreply.github.com> Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com> Co-authored-by: Yen Truong <36055303+yen-tt@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Add optional ariaLabel prop to FilterSearch to set aria-label on input * Automated update to repo's documentation from github action * Update version to 1.8.1 * Fix test build errors * Add esbuild to dev deps to force upgrade * try installing playwright before run test for react 16 * seemed to work with react 16, try for other versions * bump version * Automated update to repo's documentation from github action * add playwright install to wcag action * Add iframeWindow and allowUpdates props to MapboxMap. Also add zoom buttons * remove console.log * missed a couple calls to the mapboxInstance * update coverage workflow to install playwright * update snapshot workflow with playwright * Update snapshots * synchoronize mapbox gl version in test site and src * v1.8.3: Add debouncing to filter search and autocomplete (#511) This adds debouncing to the autocomplete and filter search calls. Currently, this is set to 200ms. This means that we will not fire autocomplete or filter search requests until 200ms has elapsed since the last keystroke, in order to save on unnecessary queries while the user is still actively typing. This number was chosen based on the average typing speed being roughly 4-5 characters per second. * Deduplicate generative answer sources (#514) If an entity is present in search results more than once (e.g. returned by two different verticals) and is cited by the GDA, it appeared in the sources more than one. This change dedups the search results while determining the sources to prevent this. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Import `@tailwindcss/typography` for markdown styling. (#516) J=TECHOPS-14112 TEST=manual verified that bulleted list and numbered list are now being rendered on test-site as expected. * Support interactive mapbox pins (#518) J=WAT-4849 TEST=manual pnpm pack this change along with a visual-editor change, point my starter branch to my packed versions and confirmed it working in platform * v1.8.7 Improve MapboxMap zoom, render, and styling functionality (#520) - call .resize() when a change is detected to the mapContainer when in an iframe. Previously, the map could render before the container, and it would not be sized correctly - trigger the onDrag function when the user zooms on the map. Typically this function is used to update the map bounds, which meant we previously did not do this when changing the zoom, which caused the wrong map area to be searched. - Add an optional pinColor property. This provides an easy way to set the color of the Mapbox pins when the implementation is not using a custom PinComponent or renderPin function. Commits: * various MapboxMap updates * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Replace pinColor with markerOptionsOverride (#522) This allows user to specify options other than the pin color as well. Updated test-site to specify a pin color and a pin size based on pin selection, and confirmed it work * Localize the Mapbox map based on the search locale (#524) J=WAT-4874 TEST=manual,auto Added jest test Spun up test-site, verified map is localized when locale is set to valid ones like 'en', 'en_US', 'ja', 'ja_JP', 'fr_FR', 'zh_Hans_CN', etc. Verified map is in English when locale is invalid. * add 'DRIVING_DIRECTIONS', 'VIEW_WEBSITE', 'TAP_TO_CALL' to CardCtaEventType (#527) TEST=manual tested in VLE and saw analytics events with the expected payload in network tab and snowflake --------- Co-authored-by: Fondryext <160865254+Fondryext@users.noreply.github.com> Co-authored-by: sahilvaidya <41973320+sahilvaidya@users.noreply.github.com> Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com> Co-authored-by: Yen Truong <36055303+yen-tt@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tharunya Potla <tpotla@yext.com> Co-authored-by: Kyle Gerner <49618240+k-gerner@users.noreply.github.com> Co-authored-by: Kyle Gerner <kgerner@yext.com> Co-authored-by: mkouzel-yext <mkouzel@yext.com> Co-authored-by: anguyen-yext2 <anguyen@yext.com>
J=WAT-4874
TEST=manual
spun up test-site with 'es' locale, saw map labels in Spanish.
