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

feat(quantic): POC: supporting result templates with document suggestions #5047

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmitiche
Copy link
Contributor

@mmitiche mmitiche commented Mar 6, 2025

https://coveord.atlassian.net/browse/SFINT-5976

This is a POC demonstrating how we could improve the Quantic Document suggestion component to make it support more UI flexibility by allowing the end user to register result templates, similarly to what's currently possible in the Search use case, these result templates will then be used to display the document suggestions.

Adding templates for document suggestion can be done following these steps:

  • Add an event listener to listen to the quantic__registerresulttemplates event in the component that wraps the QuanticDocumentSuggestion component.
  • In that event listener, use the Headless ResultTemplatesHelpers utility to register HTML templates that will be used to display document suggestions when certain conditions are met.

Example Usage:

ExampleCaseAssistFlow.html

image

ExampleCaseAssistFlow.js

image

knowldgeTemplate.html

image

Demo:

Screen.Recording.2025-03-06.at.12.41.06.PM.mov

Copy link

github-actions bot commented Mar 6, 2025

Pull Request Report

PR Title

❌ Title should follow the conventional commit spec:
<type>(optional scope): <description>

Example: feat(headless): add result-list controller

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 246.6 250 1.4
commerce 359.2 359.2 0
search 417.3 417.3 0
insight 408.5 408.5 0
recommendation 258.6 258.6 0
ssr 411.1 411.1 0
ssr-commerce 375.7 375.7 0

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.

1 participant