Skip to content

Commit

Permalink
Version Packages (#801)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
sajari-ci and github-actions[bot] committed May 24, 2022
1 parent 0e0e471 commit 9c10497
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 43 deletions.
39 changes: 0 additions & 39 deletions .changeset/nasty-turtles-provide.md

This file was deleted.

38 changes: 38 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Change Log

## 1.16.0

### Minor Changes

- [`0e0e4712`](https://github.com/sajari/sdk-react/commit/0e0e4712c0d5097476eb71fd562f077783d1b36e) [#794](https://github.com/sajari/sdk-react/pull/794) Thanks [@zlatanpham](https://github.com/zlatanpham)! - **Motivation**: It’s super useful to have the search UI state synchronizing with the browser URL and we had the functionality internally developed in the search widgets. However, when users build the search UI with React SDK (or JS SDK), they have to develop the feature by themselves and the work could be challenging even for an experienced developer. Thus, the goal of the change is to have the sync URLs functionality as a generic solution in the React SDK so it can be easily used by both our internal development (search-widgets, demo,…) and the outside world.

### API proposal

The `URLStateSync` should be placed inside the `SearchProvider`. It will work out of box with any UI that consumes data from our hook components.

```jsx
<SearchProvider {...}>
<URLStateSync />
<YourSearchUI />
</SearchProvider>
```

By default, it supports state sync for the core params including `q`, `filters`, `sort` and `resultsPerPage` but we can extend other options via `extendedParams` prop:

```jsx
const defaultViewType = 'list';
const [viewType, setViewType] = useState(defaultViewType);
<SearchProvider {...}>
<URLStateSync />
<YourSearchUI
extendedParams={[
{
key: 'viewType',
value: viewType,
defaultValue: defaultViewType,
callback: setViewType,
},
]}
/>
</SearchProvider>
```

## 1.15.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sajari-sdk-docs",
"version": "1.15.2",
"version": "1.16.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
38 changes: 38 additions & 0 deletions packages/hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Change Log

## 3.13.0

### Minor Changes

- [`0e0e4712`](https://github.com/sajari/sdk-react/commit/0e0e4712c0d5097476eb71fd562f077783d1b36e) [#794](https://github.com/sajari/sdk-react/pull/794) Thanks [@zlatanpham](https://github.com/zlatanpham)! - **Motivation**: It’s super useful to have the search UI state synchronizing with the browser URL and we had the functionality internally developed in the search widgets. However, when users build the search UI with React SDK (or JS SDK), they have to develop the feature by themselves and the work could be challenging even for an experienced developer. Thus, the goal of the change is to have the sync URLs functionality as a generic solution in the React SDK so it can be easily used by both our internal development (search-widgets, demo,…) and the outside world.

### API proposal

The `URLStateSync` should be placed inside the `SearchProvider`. It will work out of box with any UI that consumes data from our hook components.

```jsx
<SearchProvider {...}>
<URLStateSync />
<YourSearchUI />
</SearchProvider>
```

By default, it supports state sync for the core params including `q`, `filters`, `sort` and `resultsPerPage` but we can extend other options via `extendedParams` prop:

```jsx
const defaultViewType = 'list';
const [viewType, setViewType] = useState(defaultViewType);
<SearchProvider {...}>
<URLStateSync />
<YourSearchUI
extendedParams={[
{
key: 'viewType',
value: viewType,
defaultValue: defaultViewType,
callback: setViewType,
},
]}
/>
</SearchProvider>
```

## 3.12.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sajari/react-hooks",
"version": "3.12.0",
"version": "3.13.0",
"description": "Easy to use hooks that allow you to build a powerful search interface powered by Sajari using any component library.",
"sideEffects": false,
"scripts": {
Expand Down
43 changes: 43 additions & 0 deletions packages/search-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Change Log

## 4.16.0

### Minor Changes

- [`0e0e4712`](https://github.com/sajari/sdk-react/commit/0e0e4712c0d5097476eb71fd562f077783d1b36e) [#794](https://github.com/sajari/sdk-react/pull/794) Thanks [@zlatanpham](https://github.com/zlatanpham)! - **Motivation**: It’s super useful to have the search UI state synchronizing with the browser URL and we had the functionality internally developed in the search widgets. However, when users build the search UI with React SDK (or JS SDK), they have to develop the feature by themselves and the work could be challenging even for an experienced developer. Thus, the goal of the change is to have the sync URLs functionality as a generic solution in the React SDK so it can be easily used by both our internal development (search-widgets, demo,…) and the outside world.

### API proposal

The `URLStateSync` should be placed inside the `SearchProvider`. It will work out of box with any UI that consumes data from our hook components.

```jsx
<SearchProvider {...}>
<URLStateSync />
<YourSearchUI />
</SearchProvider>
```

By default, it supports state sync for the core params including `q`, `filters`, `sort` and `resultsPerPage` but we can extend other options via `extendedParams` prop:

```jsx
const defaultViewType = 'list';
const [viewType, setViewType] = useState(defaultViewType);

<SearchProvider {...}>
<URLStateSync />
<YourSearchUI
extendedParams={[
{
key: 'viewType',
value: viewType,
defaultValue: defaultViewType,
callback: setViewType,
},
]}
/>
</SearchProvider>
```

### Patch Changes

- Updated dependencies [[`0e0e4712`](https://github.com/sajari/sdk-react/commit/0e0e4712c0d5097476eb71fd562f077783d1b36e)]:
- @sajari/react-hooks@3.13.0

## 4.15.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/search-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sajari/react-search-ui",
"version": "4.15.0",
"version": "4.16.0",
"description": "Easy to use search components to quickly build a beautiful search interface powered by Sajari.",
"sideEffects": false,
"repository": {
Expand Down Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@react-aria/utils": "3.5.0",
"@sajari/react-components": "^1.14.4",
"@sajari/react-hooks": "^3.12.0",
"@sajari/react-hooks": "^3.13.0",
"@sajari/react-sdk-utils": "^1.6.4",
"dayjs": "^1.10.5",
"i18next": "19.8.7",
Expand Down

0 comments on commit 9c10497

Please sign in to comment.