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

fix(answerApi): search context trigger new request #4293

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

dmgauthier
Copy link
Contributor

@dmgauthier dmgauthier commented Aug 19, 2024

The Problem

With the actual search API flow. We make sure to retrigger a request for a RGA answer when the search context changes.
e.g. Changing a facet.

We did not port this behavior when using the AnswerApi flow at first

The solution

Since the AnswerApi generate answer call is basically proxying the searchApi call. We can pass the params that should influence the search context to the call, retriggering a request.

Demo

simplescreenrecorder-2024-08-19_08.47.49.webm

SVCC-4076

Copy link

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 244.1 244.1 0
commerce 341.2 341.2 0
search 414 414.9 0.2
insight 391.8 391.8 0
product-listing 306.4 306.4 0
product-recommendation 210.4 214.9 2.2
recommendation 257.2 257.2 0
ssr 405.1 405.1 0
ssr-commerce 338.5 338.5 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
product-recommendation 0 10 0
product-listing 0 13 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
product-recommendation : missing SSR support
product-listing : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but refactor the legacy utils out of legacy. (I want to keep the legacy as loosely attached as possible so that we can cut it off whenever we can)

@dmgauthier dmgauthier force-pushed the fix-SVCC-4076-RGA-search-context-trigger branch from 4770d72 to 24cdd0f Compare August 19, 2024 15:20
@dmgauthier dmgauthier force-pushed the fix-SVCC-4076-RGA-search-context-trigger branch from 24cdd0f to b0d2c79 Compare August 19, 2024 19:03
@dmgauthier dmgauthier added this pull request to the merge queue Aug 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 19, 2024
@dmgauthier dmgauthier added this pull request to the merge queue Aug 19, 2024
Merged via the queue into master with commit 49b33a6 Aug 19, 2024
113 of 116 checks passed
@dmgauthier dmgauthier deleted the fix-SVCC-4076-RGA-search-context-trigger branch August 19, 2024 20:36
fpbrault pushed a commit that referenced this pull request Aug 23, 2024
## The Problem

With the actual search API flow. We make sure to retrigger a request for
a RGA answer when the search context changes.
e.g. Changing a facet.

We did not port this behavior when using the AnswerApi flow at first

## The solution

Since the AnswerApi generate answer call is basically proxying the
searchApi call. We can pass the params that should influence the search
context to the call, retriggering a request.

## Demo


[simplescreenrecorder-2024-08-19_08.47.49.webm](https://github.com/user-attachments/assets/52a45636-82fe-4763-9b7d-b8182d45b6a5)

Co-authored-by: Danny Gauthier <[email protected]>
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.

4 participants