• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yext / search-ui-react / 21011576253

14 Jan 2026 10:06PM UTC coverage: 85.297% (+0.009%) from 85.288%
21011576253

push

github

web-flow
chore: add linting configuration and hook (#610)

* add linter; update all files with correct linting

* add husky config for pre-commit validation

* rerun npm i in test site

* Update snapshots

* Update snapshots

* Update snapshots

* fix dropdown item widths; don't scroll through dropdown items on tab

* Update snapshots

* fix test for dropdown tab behavior change

* update storybook test to not use tab to cycle through dropdown

* Update snapshots

* minor style nit

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

998 of 1383 branches covered (72.16%)

Branch coverage included in aggregate %.

81 of 89 new or added lines in 24 files covered. (91.01%)

8 existing lines in 1 file now uncovered.

2245 of 2419 relevant lines covered (92.81%)

149.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/src/components/AnalyticsProvider.tsx
1
import React, { PropsWithChildren } from 'react';
5✔
2
import { AnalyticsContext } from '../hooks/useAnalytics';
5✔
3
import { CloudRegion, Environment } from '@yext/search-core';
4
import { SearchAnalyticsEventServiceImpl } from '../models/SearchAnalyticsEventServiceImpl';
5✔
5

6
/**
7
 * A higher-order component which provides analytics for its children.
8
 *
9
 * @public
10
 *
11
 * @param props - The configuration for the analytics service
12
 * @returns A React element that provides analytics context
13
 */
14
export function AnalyticsProvider(props: PropsWithChildren<SearchAnalyticsConfig>): React.JSX.Element {
5✔
NEW
15
  const { children, ...searchAnalyticsConfig } = props;
×
16
  const analyticsReporter =
NEW
17
      new SearchAnalyticsEventServiceImpl(searchAnalyticsConfig);
×
18

19
  return (
×
20
    <AnalyticsContext.Provider value={ analyticsReporter }>
21
      {children}
22
    </AnalyticsContext.Provider>
23
  );
24
}
25

26
/**
27
 * An interface representing the configuration for search analytics reporting.
28
 *
29
 * @public
30
 */
31
export interface SearchAnalyticsConfig {
32
  /** The apiKey of the App with Events SDK access. */
33
  apiKey: string,
34
  /** The Yext environment to send requests to. Defaults to 'PRODUCTION'. */
35
  environment?: Environment,
36
  /** The region to send requests to. Defaults to 'US'. */
37
  cloudRegion?: CloudRegion,
38
  /** Whether to enable session tracking for analytics events. */
39
  sessionTrackingEnabled?: boolean
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc