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

Separate recent searches in verticals #242

Merged
merged 16 commits into from
Jul 19, 2022
Merged

Conversation

alextaing
Copy link
Contributor

@alextaing alextaing commented Jul 18, 2022

This PR allows recent searches to show in verticals and keeps their recent search histories separate.

J=SLAP-2241
TEST=manual, auto

The test site was used to check that recent search histories in different verticals (and in universal) were all kept separate. Jest tests were written for the useRecentSearches hook, testing that recent searches appear, that they stay on their own verticals, and that they can be cleared using the returned clearRecentSearches function.

@alextaing alextaing requested a review from a team as a code owner July 18, 2022 18:21
@coveralls
Copy link

coveralls commented Jul 18, 2022

Coverage Status

Coverage increased (+0.1%) to 84.486% when pulling f0b786e on dev/recent-searches-rework into ba357d1 on main.

@alextaing alextaing added the wip label Jul 18, 2022
@alextaing
Copy link
Contributor Author

Are there any suggestions on writing automated tests for this item? Is it something that is best done with unit tests, or is its scope a little too wide?

src/components/SearchBar.tsx Outdated Show resolved Hide resolved
src/hooks/useRecentSearches.ts Show resolved Hide resolved
@alextaing alextaing removed the wip label Jul 19, 2022
@alextaing
Copy link
Contributor Author

Current coveralls error is due to 504 gateway error, will try to rerun coveralls in an hour

tests/hooks/useRecentSearches.test.tsx Outdated Show resolved Hide resolved
tests/hooks/useRecentSearches.test.tsx Outdated Show resolved Hide resolved
tests/hooks/useRecentSearches.test.tsx Outdated Show resolved Hide resolved
src/hooks/useRecentSearches.ts Outdated Show resolved Hide resolved
src/hooks/useRecentSearches.ts Outdated Show resolved Hide resolved
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.

💯 💯 💯

@alextaing alextaing merged commit 067b4d3 into main Jul 19, 2022
@alextaing alextaing deleted the dev/recent-searches-rework branch July 19, 2022 20:01
@ElemelonWind ElemelonWind mentioned this pull request Jul 20, 2022
ElemelonWind added a commit that referenced this pull request Jul 20, 2022
## Version 0.2.0-beta.243
`@yext/answers-react-components` is now `@yext/search-ui-react`!

### Changes
- Exported a string representing the content path to files in component lib that uses tailwind classnames. (#193)
- Trimmed/edited various CSS classes  interfaces. (#189, #190, #191, #194, #196, #197, #198, #200, #202)
- Made hovering over `FilterSearch` autocomplete suggestions trigger a highlight on the selected option and fixed its width/padding. (#203, #205)
- Removed `allowPagination` prop from `VerticalResults` (#217, #219)
- Updated `StandardFacets` to optionally display the number of results associated with each facet option. (#226, #248)
- Added a 'clear filter' feature for 'clear min and max' button in `RangeInput`. (#227)
- Added a range to the `ResultCount` that describes the range of results currently displayed by `Pagination`. (#228)
- Replaced `onSubmit` with `dropdownItemProps` in `RenderEntityPreviews` interface. (#225, #238)
- Separated recent searches in verticals to keep their recent search histories separate. (#242)
- Removed links from `AlternativeVerticals` and deleted `UniversalLink` interface. (#229)
- `@yext/answers-headless-react` has been renamed to `@yext/search-headless-react`, and has been replaced by such as a peer dependency. (#243)

### Bugfixes
- When `label` is undefined, `FilterSearch` does not display default 'filter' label (#201)
- Fixed `DropdownMenu` tabbing and selecting behavior (#206, #207)
- Fixed a bug where clicking the `ApplyFiltersButton` did not reset the pagination offset. (#213)
- Fixed linebreak bug in `resultsCount` (#218)
- Fixed a bug where range input static filters were removed when selecting/de-selecting facet options with different `fieldId`s. (#224)
- Fixed `LocationBias` mobile styling (#221)
- Fixed `ThumbsFeedback` issues of not having a default width and height, as well as rotation issue with the thumbs-down button. (#233)
- Fixed `inputPrefix` collision issue and tooltip location in `RangeInput`. (#232, #234)
- Fixed a bug where facets were not being reset when applying a filter from `FilterSearch` with `searchOnSelect=true`. (#236)
yen-tt pushed a commit that referenced this pull request Sep 28, 2022
This PR allows recent searches to show in verticals and keeps their recent search histories separate.

J=SLAP-2241
TEST=manual, auto

The test site was used to check that recent search histories in different verticals (and in universal) were all kept separate. Jest tests were written for the `useRecentSearches` hook, testing that recent searches appear, that they stay on their own verticals, and that they can be cleared using the returned `clearRecentSearches` function.
yen-tt pushed a commit that referenced this pull request Sep 28, 2022
## Version 0.2.0-beta.243
`@yext/answers-react-components` is now `@yext/search-ui-react`!

### Changes
- Exported a string representing the content path to files in component lib that uses tailwind classnames. (#193)
- Trimmed/edited various CSS classes  interfaces. (#189, #190, #191, #194, #196, #197, #198, #200, #202)
- Made hovering over `FilterSearch` autocomplete suggestions trigger a highlight on the selected option and fixed its width/padding. (#203, #205)
- Removed `allowPagination` prop from `VerticalResults` (#217, #219)
- Updated `StandardFacets` to optionally display the number of results associated with each facet option. (#226, #248)
- Added a 'clear filter' feature for 'clear min and max' button in `RangeInput`. (#227)
- Added a range to the `ResultCount` that describes the range of results currently displayed by `Pagination`. (#228)
- Replaced `onSubmit` with `dropdownItemProps` in `RenderEntityPreviews` interface. (#225, #238)
- Separated recent searches in verticals to keep their recent search histories separate. (#242)
- Removed links from `AlternativeVerticals` and deleted `UniversalLink` interface. (#229)
- `@yext/answers-headless-react` has been renamed to `@yext/search-headless-react`, and has been replaced by such as a peer dependency. (#243)

### Bugfixes
- When `label` is undefined, `FilterSearch` does not display default 'filter' label (#201)
- Fixed `DropdownMenu` tabbing and selecting behavior (#206, #207)
- Fixed a bug where clicking the `ApplyFiltersButton` did not reset the pagination offset. (#213)
- Fixed linebreak bug in `resultsCount` (#218)
- Fixed a bug where range input static filters were removed when selecting/de-selecting facet options with different `fieldId`s. (#224)
- Fixed `LocationBias` mobile styling (#221)
- Fixed `ThumbsFeedback` issues of not having a default width and height, as well as rotation issue with the thumbs-down button. (#233)
- Fixed `inputPrefix` collision issue and tooltip location in `RangeInput`. (#232, #234)
- Fixed a bug where facets were not being reset when applying a filter from `FilterSearch` with `searchOnSelect=true`. (#236)
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.

None yet

3 participants