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

feat: add headless react util defineSearchEngine #3107

Merged
merged 100 commits into from
Sep 8, 2023

Conversation

mrrajamanickam-coveo
Copy link
Contributor

@mrrajamanickam-coveo mrrajamanickam-coveo commented Aug 14, 2023

Adds React util to define search engine that provides context provider, hooks to hydrate engine and controllers.

TODO

  • Add more unit tests
    • Fix issues testing with error boundary
  • Add e2e tests
  • Fix error useSyncExternalStore can only be used in client components
  • Fix build error after latest merge with master

https://coveord.atlassian.net/browse/KIT-2606
https://coveord.atlassian.net/browse/KIT-2692

@github-actions
Copy link

github-actions bot commented Aug 14, 2023

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 2 package(s) with unknown licenses.
See the Details below.

License Issues

package-lock.json

PackageVersionLicenseIssue Type
packages/headless-react0.0.0NullUnknown License

packages/samples/headless-ssr/package.json

PackageVersionLicenseIssue Type
@coveo/headless-react0.0.0NullUnknown License
Allowed Licenses: 0BSD, Apache-2.0, Apache-2.0 AND MIT, Apache-2.0 AND BSD-3-Clause AND Python-2.0, Beerware, BlueOak-1.0.0, BSD-1-Clause, BSD-2-Clause, BSD-2-Clause-Patent, BSD-2-Clause-Views, BSD-2-Clause AND MIT, BSD-3-Clause, BSD-3-Clause-Attribution, BSD-3-Clause-Clear, BSL-1.0, CC-BY-3.0, CC-BY-4.0, CC0-1.0, CNRI-Python, curl, HPND, IBM-pibs, ImageMagick, ISC, JSON, MIT, MIT-0, MIT AND ISC, MIT AND Python-2.0, MIT-advertising, mpi-permissive, NCSA, ODC-By-1.0, PDDL-1.0, Plexus, PostgreSQL, PSF-2.0, Python-2.0, Python-2.0.1, SAX-PD, Unlicense, UPL-1.0, W3C, Wsuipa, WTFPL, X11, X11-distribute-modifications-variant, Xerox, Zlib, ZPL-2.1

Scanned Manifest Files

package-lock.json
packages/headless-react/package.json
packages/samples/headless-react/package.json
packages/samples/headless-ssr/package.json

@github-actions
Copy link

github-actions bot commented Aug 14, 2023

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 182.1 182.1 0
commerce 262.6 262.6 0
search 345.4 345.4 0
insight 299 299 0
product-listing 287.7 287.7 0
product-recommendation 156.3 156.3 0
recommendation 192.9 192.9 0
ssr 207.5 207.5 0

@mrrajamanickam-coveo
Copy link
Contributor Author

mrrajamanickam-coveo commented Aug 28, 2023

Working on fixing test failures in CI (that passed locally) ...

 FAIL  src/search-engine.test.tsx
  ● Test suite failed to run

    src/search-engine.test.tsx:93:23 - error TS2339: Property 'toHaveLength' does not exist on type 'ArrayLikeMatchers<HTMLElement>'.

    93       expect(results).toHaveLength(numResults);
                             ~~~~~~~~~~~~
 11 passing (31s)
  1 failing

  1) react Headless SSR utils
       should pass the web-vitals audits:
     Error: cy.vitals() - A threshold has been crossed.

ttfb web-vital is 21.70000000001164, and is over the 20 threshold. Fail.
      at Context.eval (webpack://@coveo/headless-ssr-samples/../../../node_modules/cypress-web-vitals/src/reportResults.js:83:0)

@btaillon-coveo btaillon-coveo enabled auto-merge (squash) September 7, 2023 20:09
@btaillon-coveo btaillon-coveo merged commit 1d63e43 into master Sep 8, 2023
2 checks passed
@btaillon-coveo btaillon-coveo deleted the KIT-2606_headless_react_utils branch September 8, 2023 15:16
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