Skip to content

Commit

Permalink
MWPW-156978 adding a lana log for gnav search usage (#3673)
Browse files Browse the repository at this point in the history
* Revert "MWPW-140452 - Icon authoring in milo using the federal repo a… (#3357)

Revert "MWPW-140452 - Icon authoring in milo using the federal repo and individual SVG assets (#3259)"

This reverts commit 81a5770.

* [Release] Stage to Main (#3497)

MWPW-165774 [Mobile-GNAV] page is not scrollable in live page (#3495)

* check for new nav when disabling ios scroll

* shortened the check from the previous commit

Co-authored-by: Raghav Sharma <[email protected]>

* adding the log

* updated the log

---------

Co-authored-by: milo-pr-merge[bot] <169241390+milo-pr-merge[bot]@users.noreply.github.com>
Co-authored-by: Okan Sahin <[email protected]>
Co-authored-by: Raghav Sharma <[email protected]>
Co-authored-by: Saloni Jain <[email protected]>
  • Loading branch information
5 people authored Feb 13, 2025
1 parent c2c7a72 commit 153399d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/blocks/global-navigation/features/search/gnav-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
trigger,
closeAllDropdowns,
logErrorFor,
lanaLog,
} from '../../utilities/utilities.js';
import { replaceKeyArray } from '../../../../features/placeholders.js';
import { getConfig } from '../../../../utils/utils.js';
Expand All @@ -30,11 +31,12 @@ class Search {
this.icon = config.icon;
this.trigger = config.trigger;
this.parent = this.trigger.closest('.feds-nav-wrapper');
lanaLog({ message: `Search integrated on URL : ${window.location.href}`, tags: 'gnav-search', errorType: 'info' });
const observer = new MutationObserver(() => {
this.clearSearchForm();
});
observer.observe(this.trigger, { attributeFilter: ['aria-expanded'] });
logErrorFor(this.init.bind(this), 'Search init has failed', 'errorType=error,module=gnav-search');
logErrorFor(this.init.bind(this), 'Search init has failed', 'gnav-search', 'error');
}

async init() {
Expand Down

0 comments on commit 153399d

Please sign in to comment.