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

v1.0.0 #306

Merged
merged 3 commits into from
Sep 8, 2022
Merged

v1.0.0 #306

merged 3 commits into from
Sep 8, 2022

Conversation

yen-tt
Copy link
Contributor

@yen-tt yen-tt commented Sep 8, 2022

Library Overview

This library provides a set of React Components to integrate Yext Search onto your site. These Components are easily incorporated into a new or existing React application. They are powered by an instance of Search Headless, provided to them via the SearchHeadlessProvider:

import { SearchHeadlessProvider, provideHeadless } from '@yext/search-headless-react';
import { SearchBar, UniversalResults } from '@yext/search-ui-react';

const config = {
  apiKey: '<apiKey>',
  experienceKey: '<experienceKey>',
  locale: 'en',
  experienceVersion: 'PRODUCTION',
}
const searcher = provideHeadless(config);

function App() {
  return (
    <SearchHeadlessProvider searcher={searcher}>
      <SearchBar />
      <UniversalResults />
    </SearchHeadlessProvider>
  );
}

export default App;

Using this Headless instance, Components perform actions such as setting a filter or executing a search. Component State is also connected to the relevant portions of Headless State.

Included Components

The following Components are made available by the library:

To explore these Components individually, you can access our Component Sandbox.

Using the Library

If you are using NPM 7+, you can install the components with the following command:

npm install @yext/search-ui-react

The @yext/search-headless-react peer dependency will be automatically installed.

If you are using NPM 6 or Yarn, you can install the library and its peer dependencies with this command:

npx install-peerdeps @yext/search-ui-react

The command will work with Yarn so long as NPM 6+ is installed on the machine.

Tailwind

The library uses Tailwind to provide minimal, out-of-the-box styling of the Components.

To use the Component Library's Styling without adding Tailwind to your project, add the following import:

import '@yext/search-ui-react/bundle.css'

If you have Tailwind already, you can add our styles to your tailwind.config.js:

const { ComponentsContentPath } = require('@yext/search-ui-react');
module.exports = {
  content: [ ComponentsContentPath ],
  // ... the rest of your tailwind config
};

@yen-tt yen-tt requested a review from a team as a code owner September 8, 2022 21:12
oshi97
oshi97 previously approved these changes Sep 8, 2022
Copy link
Contributor

@oshi97 oshi97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@nmanu1 nmanu1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the list of components in the description is missing Pagination

@coveralls
Copy link

coveralls commented Sep 8, 2022

Coverage Status

Coverage remained the same at 85.454% when pulling 5c6cae6 on release/v1.0.0 into e37168f on main.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

Current unit coverage is 88.5823754789272%
Current visual coverage is 77.43315508021391%
Current combined coverage is 89.11877394636015%

package.json Outdated Show resolved Hide resolved
@yen-tt
Copy link
Contributor Author

yen-tt commented Sep 8, 2022

looks like the list of components in the description is missing Pagination

added!

Copy link
Contributor

@nmanu1 nmanu1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@yen-tt yen-tt merged commit 7a139fb into main Sep 8, 2022
yen-tt added a commit that referenced this pull request Sep 28, 2022
## Library Overview
This library provides a set of React Components to integrate Yext Search onto your site. These Components are easily incorporated into a new or existing React application. They are powered by an instance of [Search Headless](https://github.com/yext/search-headless), provided to them via the `SearchHeadlessProvider`: 

```tsx
import { SearchHeadlessProvider, provideHeadless } from '@yext/search-headless-react';
import { SearchBar, UniversalResults } from '@yext/search-ui-react';

const config = {
  apiKey: '<apiKey>',
  experienceKey: '<experienceKey>',
  locale: 'en',
  experienceVersion: 'PRODUCTION',
}
const searcher = provideHeadless(config);

function App() {
  return (
    <SearchHeadlessProvider searcher={searcher}>
      <SearchBar />
      <UniversalResults />
    </SearchHeadlessProvider>
  );
}

export default App;
```

Using this Headless instance, Components perform actions such as setting a filter or executing a search. Component `State` is also connected to the relevant portions of Headless `State`. 

### Included Components 

The following Components are made available by the library:
- [Search Bar](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.searchbar.md)
- [Universal Results](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.universalresults.md)
- [Vertical Results](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.verticalresults.md)
- [Direct Answer](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.directanswer.md)
- [Filter Search](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.filtersearch.md)
- [Standard Facets](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.standardfacets.md)
- [Static Filters](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.staticfilters.md)
- [Spell Check](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.spellcheck.md)
- [Alternative Verticals](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.alternativeverticals.md)
- [Applied Filters](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.appliedfilters.md)
- [Hierarchical Facets](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.hierarchicalfacets.md)
- [Location Bias](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.locationbias.md)
- [Numerical Facets](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.numericalfacets.md)
- [Results Count](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.resultscount.md)
- [Pagination](https://github.com/yext/search-ui-react/blob/main/docs/search-ui-react.pagination.md)

To explore these Components individually, you can access our [Component Sandbox](https://storybook.hitchhikers.yext.com). 

## Using the Library

If you are using NPM 7+, you can install the components with the following command:

```bash
npm install @yext/search-ui-react
```
The @yext/search-headless-react peer dependency will be automatically installed.

If you are using NPM 6 or Yarn, you can install the library and its peer dependencies with this command:
```bash
npx install-peerdeps @yext/search-ui-react
```
The command will work with Yarn so long as NPM 6+ is installed on the machine.

### Tailwind

The library uses Tailwind to provide minimal, out-of-the-box styling of the Components. 

To use the Component Library's Styling without adding Tailwind to your project, add the following import: 

```tsx
import '@yext/search-ui-react/bundle.css'
```

If you have Tailwind already, you can add our styles to your `tailwind.config.js`:

```tsx
const { ComponentsContentPath } = require('@yext/search-ui-react');
module.exports = {
  content: [ ComponentsContentPath ],
  // ... the rest of your tailwind config
};
```
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