Skip to content

Commit 2d5f269

Browse files
committed
chore(search): add doc for icon customization
1 parent d9a43f0 commit 2d5f269

11 files changed

+108
-0
lines changed

docs/javascript/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ And `configuration` is an object that allows these properties:
8282
| `targets.SEARCH` | Target id for the search page. | [Documentation](./capabilities#search) |
8383
| `targets.SEARCH_BOX` | Target id for the search box. | [Documentation](./capabilities#search-box) |
8484
| `targets.SEARCH_CUSTOM_METADATA` | Target id for search custom metadata. | [Documentation](./capabilities#search-custom-metadata) |
85+
| `targets.SEARCH_RESULT_ICON` | Target id for icons of the search result page and quick search. | [Documentation](./capabilities#search-result-icon) |
8586
| `targets.SEARCH_TAB` | Target id for search tab. | [Documentation](./capabilities#search-tab) |
8687
| `targets.SETTINGS` | Target id for the settings menu. | [Documentation](./capabilities#settings) |
8788
| `targets.SETTINGS_BUTTON` | Target id for the settings icon on the top bar. | [Documentation](./capabilities#settings-button) |
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

docs/javascript/capabilities.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,35 @@ Target that allows customizing the search custom metadata.
517517
| Disable | No compatibility. |
518518
| Changing text | No compatibility. |
519519

520+
### Search result icon
521+
522+
Target that allows customizing icons of the search results of both the search page and quick search.
523+
524+
![Search results icons](./assets/search-icon-custo-doc.png "Search results icons")
525+
526+
![Quick search result icons](./assets/quick-search-icon-custo-doc.png "Quick search result icons")
527+
528+
#### Compatibility
529+
530+
| | |
531+
| ------------- | -------------------------------------- |
532+
| Target ID | `search-result-icon` |
533+
| Description | Target the search result icon. |
534+
| Placements | Compatible with placements: `REPLACE`. |
535+
| Disable | No compatibility. |
536+
| Changing text | No compatibility. |
537+
538+
**Note:** Using `context` it is possible to retrieve data of the search result being customized as well as its type.
539+
This allows specific customization depending on result type / data etc...
540+
In addition, a `SearchThumbnail` component is available to be as close as possible to the current implementation.
541+
542+
#### Use cases
543+
544+
- [Replace icons for a specific result type](./use-cases#replace-icons-for-a-specific-result-type)
545+
- [Replace icons with a custom svg](./use-cases#replace-icons-with-a-custom-svg)
546+
- [Replace icons of documents with a specific mimetype](./use-cases#replace-icons-of-documents-with-a-specific-mimetype)
547+
548+
520549
### Search tab
521550

522551
Target that allows customizing the search tab.

0 commit comments

Comments
 (0)