Skip to content

Commit

Permalink
feat(quantic): Add option for rephrase buttons, remove citations numb…
Browse files Browse the repository at this point in the history
…ers (#4277)

1. SFINT-5661: Add an option (default false), to show the rephrase
buttons
- We want to ultimately completely remove the rephrase buttons (with
V3), but meanwhile we will simply hide them by default, customers can
still bring them back with an option for now.
- But the data proves very low usage, and most of the usage is to "try"
and get an answer when there were no answer generated in the first
place.
- The display format will be markdown for everyone as it provides the
best format of answer anyway.

2. SFINT-5660: Remove the numbers next to the citations in the RGA
component. (They were judged not useful by product).


![image](https://github.com/user-attachments/assets/0e80ca15-3c8d-4b63-b260-07ccf3a8ecb9)


I also re-organized a little bit the e2e tests for the
quanticGeneratedAnswer component.

The new logic is basically this:
1. When no streamID is returned
2. When a streamID is returned
a. All the "happy path" tests here, completed event, markdown, end of
stream, like/dislike, feedback, toggle button, collapsible,
copyToClipboard, citations.
b. All the options: fieldsToInclude, multilineFooter, collapsible,
withRephraseButtons, answerStyle

That way it's a lot more readable, I personally think. Feel free to
comment on that if you'd make other changes to the format of tests.


![image](https://github.com/user-attachments/assets/14ff1950-691c-4b25-9d4e-81f0ba2eaf0a)
  • Loading branch information
erocheleau authored Aug 14, 2024
1 parent 107c56b commit e65b99f
Show file tree
Hide file tree
Showing 11 changed files with 306 additions and 389 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,6 @@ function generatedAnswerExpectations(selector: GeneratedAnswerSelector) {
);
},

citationNumberContains: (index: number, value: string) => {
selector
.citationIndex(index)
.then((element) => {
expect(element.get(0).innerText).to.equal(value);
})
.log(
`the citation at the index ${index} should contain the number "${value}"`
);
},

citationLinkContains: (index: number, value: string) => {
selector
.citationLink(index)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ export const GeneratedAnswerSelectors: GeneratedAnswerSelector = {
GeneratedAnswerSelectors.get()
.find('[data-cy="generated-answer__citations"] .citation__title')
.eq(index),
citationIndex: (index: number) =>
GeneratedAnswerSelectors.get()
.find('[data-cy="generated-answer__citations"] .citation__index')
.eq(index),
citationLink: (index: number) =>
GeneratedAnswerSelectors.get()
.find('[data-cy="generated-answer__citations"] .citation__link')
Expand Down
Loading

0 comments on commit e65b99f

Please sign in to comment.