-
Notifications
You must be signed in to change notification settings - Fork 85
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
IBX-6878: Customize BO search suggestions #2222
Conversation
code_samples/back_office/suggestions/src/EventSubscriber/MySuggestionEventSubscriber.php
Outdated
Show resolved
Hide resolved
code_samples/back_office/suggestions/src/EventSubscriber/MySuggestionEventSubscriber.php
Outdated
Show resolved
Hide resolved
code_samples/back_office/search/assets/js/admin.search.autocomplete.product.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Tomasz Dąbrowski <[email protected]>
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.
Looks good! Just a couple of small suggestions
By default, suggestions start showing up after the user types in at least 3 characters, and 5 suggestions are presented. | ||
This can be changed with [SiteAccess aware dynamic configuration](dynamic_configuration.md), by setting the following [scoped](multisite_configuration.md#scope) parameters: | ||
|
||
```yaml |
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.
Is it recommended to set the SiteAccess parameters directly?
I always thought that the ibexa.system.<scope>
configuration is preferred (in this case: https://github.com/ibexa/search/blob/main/src/bundle/DependencyInjection/Configuration/Parser/SiteAccessAware/SuggestionParser.php#L20-L29)
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.
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.
Side note:
We may need to add something to https://doc.ibexa.co/en/latest/administration/configuration/dynamic_configuration/
The example starts with something that could lead to bad practice:
parameters:
# Internal configuration
ibexa.site_access.config.default.content.default_ttl: 60
ibexa.site_access.config.site_group.content.default_ttl: 3600
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.
Yes, I think for our configuration you can always use the SiteAccess-aware configuration - and settings the parameters directly is not recommended (might be needed by partners for something custom, if they don't want to provide the configuration 🤔 )
Co-authored-by: Marek Nocoń <[email protected]>
--------- Co-authored-by: adriendupuis <[email protected]> Co-authored-by: Tomasz Dąbrowski <[email protected]> Co-authored-by: Marek Nocoń <[email protected]> (cherry picked from commit 454b71e)
How to customize Back Office search bar suggestions
Install and test "Add custom suggestion source" example:
Maybe add some more contents if you're on clean install:
Checklist