-
-
Notifications
You must be signed in to change notification settings - Fork 72
feat: Add excludedItems parameter to autocomplete function with dynamic size adjustment #1027
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
base: master
Are you sure you want to change the base?
Conversation
…ic size adjustment **Description (optional):** - Added `excludedItems` parameter to filter out unwanted items from auto-suggestions. - Dynamically adjusted the `size` parameter to request additional items based on the length of the exclusion list. - Ensured safety by handling potential null values in `excludedItems`. - Improved overall flexibility of the autocomplete functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AffanShaikhsurab!
Please have a look at my comments about minor issues.
But other related parts of the code needs to be impacted too:
OpenFoodAPIClient.getSuggestions
Autocompleter
AutocompleteManager
TagTypeAutocompleter
TaxonomyNameAutocompleter
In addition to that, the code must be tested, in api_suggestion_manager_test.dart
and api_search_test.dart
.
- Updated impacted components: - `OpenFoodAPIClient.getSuggestions` - `Autocompleter` - `AutocompleteManager` - `TagTypeAutocompleter` - `TaxonomyNameAutocompleter` - Added/updated tests in `api_suggestion_manager_test.dart` and `api_search_test.dart`. - Addressed minor review comments.
I have made the changes. Could you please check if they are valid? Also, what should we pass as |
What
excludedItems
parameter to filter out unwanted items from auto-suggestions.size
parameter to request additional items based on the length of the exclusion list.excludedItems
.Fixes bug(s)
#889
Part of