-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(headless): migrate searchbox submit event for search case (#…
…3463) * migrate searchBox/submit https://coveord.atlassian.net/browse/KIT-2933 * revert optional legacy analytics https://coveord.atlassian.net/browse/KIT-2933 * insight case not using the right interface.. https://coveord.atlassian.net/browse/KIT-2933 * beter interfaces https://coveord.atlassian.net/browse/KIT-2933 * never use coreSearchBox https://coveord.atlassian.net/browse/KIT-2933 * fix test https://coveord.atlassian.net/browse/KIT-2933 * refactor(headless): migrate searchboxAsYouType event (#3472) refactor(headless): migrate searchboxAsYouType https://coveord.atlassian.net/browse/KIT-2942
- Loading branch information
1 parent
19eb84a
commit e68025b
Showing
8 changed files
with
128 additions
and
21 deletions.
There are no files selected for viewing
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
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
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
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
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
12 changes: 12 additions & 0 deletions
12
packages/headless/src/features/query/query-analytics-actions.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
import {SearchAnalyticsProvider} from '../../api/analytics/search-analytics'; | ||
import { | ||
makeAnalyticsAction, | ||
LegacySearchAction, | ||
} from '../analytics/analytics-utils'; | ||
import {SearchPageEvents} from '../analytics/search-action-cause'; | ||
import {SearchAction} from '../search/search-actions'; | ||
|
||
//TODO: KIT-2859 | ||
export const logSearchboxSubmit = (): LegacySearchAction => | ||
makeAnalyticsAction('analytics/searchbox/submit', (client) => | ||
client.makeSearchboxSubmit() | ||
); | ||
|
||
export const searchboxSubmit = (): SearchAction => { | ||
return { | ||
actionCause: SearchPageEvents.searchboxSubmit, | ||
getEventExtraPayload: (state) => | ||
new SearchAnalyticsProvider(() => state).getBaseMetadata(), | ||
}; | ||
}; |
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
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