Skip to content
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

Rework the SearchHeadlessProvider to be a pass-through. #156

Merged
merged 4 commits into from
Sep 1, 2022

Conversation

tmeyer2115
Copy link
Contributor

@tmeyer2115 tmeyer2115 commented Sep 1, 2022

Per Product's request, the SearchHeadlessProvider is now a mere pass-through to the SearchHeadlessContext.Provider. Users will need to create and initialize a Headless instance themselves. This PR also removed the Client-SDK header for Headless React. Product and I determined that it was not useful to track the Headless React version.

The acquireSessionId utility will be moved to either the Component Library or Headless, TBD. The Jest test that was added ensures the Provider does not touch anything in the Headless instance.

TEST=auto

Ran all unit tests.

Per Product's request, the `SearchHeadlessProvider` is now a mere
pass-through to the `SearchHeadlessContext.Provider`. Users will
need to create and initialize a `Headless` instance themselves.

The `acquireSessionId` utility will be moved to either the Component
Library or Headless, TBD. The Jest test that was added ensures the
`Provider` does not touch anything in the `Headless` instance.

TEST=auto

Ran all unit tests.
@tmeyer2115 tmeyer2115 requested a review from a team as a code owner September 1, 2022 13:50
@coveralls
Copy link

coveralls commented Sep 1, 2022

Coverage Status

Coverage increased (+0.03%) to 94.231% when pulling 52038b1 on dev/rework-headless-provider into 9df8dd9 on develop.

@tmeyer2115 tmeyer2115 merged commit b2f7a58 into develop Sep 1, 2022
@tmeyer2115 tmeyer2115 deleted the dev/rework-headless-provider branch September 1, 2022 16:04
@yen-tt yen-tt mentioned this pull request Sep 7, 2022
yen-tt added a commit that referenced this pull request Sep 8, 2022
## Version 2.0.0

### Breaking Changes
- Upgraded search-headless dependency to V2. This means re-exported interfaces related to static filters and direct answers stems from search-headless V1 have been changed or removed in headless-react V2.
  - for more details, see the breaking changes listed in V2 [release notes](https://github.com/yext/search-headless/releases/tag/v2.0.0) and [documentation](https://github.com/yext/search-headless/blob/main/docs/search-headless.md) of search-headless
- `SearchHeadlessProvider` now takes in a `SearchHeadless` instance instead of a `SearchConfig` object. `SearchHeadlessProvider` will also no longer set vertical key, session tracking, and session id for the `SearchHeadless` instance. Users will need to create and initialize a Headless instance themselves. For more context, this change is made to prevent potential memory leaks, per Redux's recommendation that redux store (i.e. `SearchHeadless` instance) should not be instantiated within a render function. (#156)
- All exports marked as `@deprecated` in previous publish as part of the rebranding process, as well as `subscribeToStateUpdates`, is now removed in V2 (#153  )
  - for more details, the deprecated identifiers are listed in [v1.3 release notes](https://github.com/yext/search-headless-react/releases/tag/v1.3.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants