-
Notifications
You must be signed in to change notification settings - Fork 35
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): rich text formatting for quantic RGA #4015
Conversation
added marked as static resource fixed build warning in quanticCitation.js modified quanticGeneratedAnswer to specify it supports markdown
Styling added for the new markdown answer
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.
That's very nice!
...ic/force-app/main/default/lwc/quanticGeneratedAnswerContent/quanticGeneratedAnswerContent.js
Outdated
Show resolved
Hide resolved
fixed issue with empty <p> in <li>
Pull Request ReportPR Title✅ Title follows the conventional commit spec. Live demo linksBundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : 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 |
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.
Nice job 👍
...ic/force-app/main/default/lwc/quanticGeneratedAnswerContent/quanticGeneratedAnswerContent.js
Show resolved
Hide resolved
...ic/force-app/main/default/lwc/quanticGeneratedAnswerContent/quanticGeneratedAnswerContent.js
Outdated
Show resolved
Hide resolved
...ic/force-app/main/default/lwc/quanticGeneratedAnswerContent/quanticGeneratedAnswerContent.js
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.js
Outdated
Show resolved
Hide resolved
...ic/force-app/main/default/lwc/quanticGeneratedAnswerContent/quanticGeneratedAnswerContent.js
Show resolved
Hide resolved
...in/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js
Outdated
Show resolved
Hide resolved
...in/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js
Show resolved
Hide resolved
...in/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js
Show resolved
Hide resolved
...in/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticUtils/markdownUtils.js
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticUtils/markdownUtils.js
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticUtils/markdownUtils.js
Outdated
Show resolved
Hide resolved
...ges/quantic/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html
Show resolved
Hide resolved
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.
Nice job on the tests!
...ic/force-app/main/default/lwc/quanticGeneratedAnswerContent/quanticGeneratedAnswerContent.js
Show resolved
Hide resolved
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.
Nice job 👍
It would be nice if we could have a test covering the DOM purification logic.
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.
RSLGTM: @coveo/search was included 'cause of the lockfile, so I did not review the code.
SFINT-5459
Rich Text Formatting supported within the Quantic RGA component.
Very similar in essence to what @lbergeron did.
Some tweaks and changes were made to the styling of the rendered HTML based on Salesforce design system.
Unit tests were made for the new components and code, but i can't find a good way to create e2e tests for this feature.
It heavily depends on first receiving an EventStream message to set the answerType, and THEN renders markdown as HTML. We don't have the setup to be able to mock two consecutive RGA EventStream events, only one.
Some examples of rendered HTML:
Code blocks
Table: has a maximum height and is scrollable horizontally and vertically
Different levels of headers, all headers are repleaced with
h1,h2,h3,etc.
elements in order to not break headings hierarchy in the page and break accessibility rules:Inline code
With Collapse = true
Added some Cypress tests too!
I am covering most of the "irregular" cases where we differ from the simple behavior of the
marked
library.