Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Define stricter match for categories labels in suggestions #311

Merged
merged 2 commits into from
Jul 25, 2019

Conversation

amatissart
Copy link
Contributor

A category is returned in autocomplete suggestions if the user query matches the regex associated to the category, or its translated label.

This PR suggests to make this second check less permissive by requiring the query to start with the category label as a separate word (if there are enough letters in the query string).

src/adapters/category.js Outdated Show resolved Hide resolved
src/adapters/category.js Outdated Show resolved Hide resolved
tests/integration/tests/autocomplete.js Outdated Show resolved Hide resolved
@amatissart amatissart merged commit 3111122 into master Jul 25, 2019
@amatissart amatissart deleted the fix-category-suggest branch July 27, 2019 17:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants