Skip to content

Commit 77336e1

Browse files
github-actions[bot]anguyen-yext2Fondryextmkouzel-yextchrissnyder2337
authored
Merge main (v1.12.1) into develop (#603)
* Support trusted publishing with OIDC (#558) * Bump search-headless-react version (to be published as v1.10.0) (#561) which includes change that supports facetAllowlist query parameter for vertical searches * release: v1.10.0-beta.0 * release: v1.10.0 * drop node 16 from github workflows (#567) * drop node 16 from github workflows We are dropping node 16 support, and have removed it from the related slapshot reusable workflows already. This PR drops it from the github workflows for this repo J=none TEST=none * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * v1.10.1 (#569) * v1.10.1 (#565) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: upgrade playwright version to avoid vuln This PR ups the playwright version used to avoid a vuln J=VULN-40423 TEST=compile * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * remove version upgrade workflow * remove version change * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * release: v1.10.1 * Move map to search location when there are no results (v1.10.2) (#570) J=WAT-5112 TEST=manual --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * release: v1.10.2 * Fix orphaned ARIA references when collapsible=false (#579) Fix originally made in #576 by @chrissnyder2337 When collapsible={false}, FilterGroup now renders a plain div instead of CollapsibleSection, preventing orphaned aria-labelledby references that point to non-existent toggle button IDs. This fix improves WCAG 2.1 accessibility compliance (1.3.1 Info and Relationships; 4.1.2 Name, Role, Value) by ensuring screen readers only encounter properly labeled regions. --------- Co-authored-by: Claude <noreply@anthropic.com> * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: Chris Snyder <chris@chrissnyder.org> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * release: v1.10.3 * release: v1.10.3-beta.0 * release: v1.10.3 * chore: update search bar components to improve accessibility (v1.10.4) (#584) * update search bar components to improve accessibility * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * update tests * Update snapshots * Update snapshots * Update snapshots * add required aria attributes to pass WCAG * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * update storybook styling for dropdown items * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * chore: update generate license config (#586) * update generate license config * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * try using test branch of workflow * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * fix typo * Update snapshots * add generate_license_version param to yml * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * Update snapshots * Update snapshots * Update snapshots * update text in jsonlint-lines-primitives override * Update snapshots * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * remove extra dashed line * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Update snapshots * Update snapshots * point to v1 workflow branch after update in that repo * Update snapshots * Update snapshots * capitalization typo from prev PR * Update snapshots * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * release: v1.10.4 * feat: upgrade to React 19; add backwards compatibility test-site script (v1.11.0) (#589) * upgrade to React 19; add backwards compatibility test-site script * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * try updating run-tests.yml * codex: try fixing old react errors * update storybook command from p -> port * update types and fiddle with Mapbox pin code to pass storybook tests * wrap various tasts with act() to cut down on log warns * try to update storybook config to get tests to pass * Update snapshots * Update snapshots * Update snapshots * Update snapshots * rerun npm i in test site * slight code cleanup * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * nits * Update snapshots * Update snapshots * update kill command in visual coverage * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * release: v1.11.0 * fix: handle mapbox padding race condition (v1.11.1) (#592) * add logic to only fit bounds when padding fits in canvas * release: v1.11.1 * fix: upgrade storybook version (#595) A vulnerability exists in storybook 8.5.0 that bundles the .env file in the static output during the storybook build. This vulnerability is fixed in version 8.6.15. J=VULN-40848 TEST=auto --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * feat: support autocomplete limits (v1.12.0) (#597) * support autocomplete limits * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * release: v1.12.0 * hotfix: some symbol layers not showing up (v1.12.1) (#601) Layers that don't have name properties do not need to be localized (e.g. highway numbers). Localizing them was overriding their properties, which caused them to not show up on the map. J= WAT-5275 TEST=manual verified on test-site that road shields and route markers now show up, and place names are still localized as expected. * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * Update snapshots * add parenthesis to make conditions clearer * Update snapshots * Update snapshots * Update snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * release: v1.12.1 --------- Co-authored-by: anguyen-yext2 <143001514+anguyen-yext2@users.noreply.github.com> Co-authored-by: anguyen-yext2 <anguyen@yext.com> Co-authored-by: Fondryext <160865254+Fondryext@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Maxfield Kouzel <mkouzel@yext.com> Co-authored-by: Chris Snyder <chris@chrissnyder.org> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Kyle Gerner <49618240+k-gerner@users.noreply.github.com> Co-authored-by: Kyle Gerner <kgerner@yext.com>
1 parent a3c88bb commit 77336e1

4 files changed

Lines changed: 21 additions & 5 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@yext/search-ui-react",
3-
"version": "1.12.0",
3+
"version": "1.12.1",
44
"description": "A library of React Components for powering Yext Search integrations",
55
"author": "watson@yext.com",
66
"license": "BSD-3-Clause",

src/components/MapboxMap.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,29 @@ export function MapboxMap<T>({
229229
// keep track of the previous value of mapboxOptions across renders
230230
const prevMapboxOptions = useRef(mapboxOptions);
231231

232+
/**
233+
* Localizes Mapbox label text to a specific locale.
234+
*
235+
* Updates symbol layers that are place names such that labels prefer `name_<lang>`
236+
* (e.g. `name_fr`) and fall back to `name` when unavailable.
237+
*
238+
* Note:
239+
* - Symbol layers that are place names would have `text-field` properties that includes 'name', which are localized.
240+
* - Other symbol layers (e.g. road shields, transit, icons) are left unchanged.
241+
*/
232242
const localizeMap = useCallback(() => {
233243
const mapbox = map.current;
234244
if (!mapbox || !locale) return;
235245

236246
const localizeLabels = () => {
237247
mapbox.getStyle().layers.forEach(layer => {
238-
if (layer.type === "symbol" && layer.layout?.["text-field"]) {
248+
if (layer.type !== "symbol") {
249+
return;
250+
}
251+
const textField = layer.layout?.["text-field"];
252+
if (typeof textField === "string"
253+
? textField.includes("name")
254+
: (Array.isArray(textField) && JSON.stringify(textField).includes("name"))) {
239255
mapbox.setLayoutProperty(
240256
layer.id,
241257
"text-field",

test-site/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)