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

npm prod v2 fix #4583

Closed
wants to merge 26 commits into from
Closed

npm prod v2 fix #4583

wants to merge 26 commits into from

Conversation

louis-bompart
Copy link
Collaborator

louis-bompart and others added 26 commits August 28, 2024 11:18
Current behaviour: All `atomic-result/product` are clickable and default
to a 'default' atomic-result/product-link.

Expected behaviour: That should have been the case only with the grid
layout.

KIT-3508

Backport of #4355
@coveo/bueno@0.46.2
@coveo/headless@2.80.1
@coveo/atomic@2.78.1
@coveo/headless-react@1.1.5
@coveo/atomic-react@2.14.1
@coveo/atomic-angular@2.28.1
@coveo/auth@1.11.23
@coveo/atomic-hosted-page@0.6.8
@coveo/quantic@2.57.2

**/CHANGELOG.md
**/package.json
CHANGELOG.md
package.json
package-lock.json
@coveo/bueno@0.46.3
@coveo/headless@2.80.2
@coveo/atomic@2.78.2
@coveo/headless-react@1.1.6
@coveo/atomic-react@2.14.2
@coveo/atomic-angular@2.28.2
@coveo/auth@1.11.24
@coveo/atomic-hosted-page@0.6.9
@coveo/quantic@2.57.3

**/CHANGELOG.md
**/package.json
CHANGELOG.md
package.json
package-lock.json
# V2

This PR backports #4405 into the V2
branch.

## This is a fix

Since we should not backport features to the V2 branch, I will defend
that this PR is indeed a fix for the whole answer api feature on V2.
Without this. The whole feature is unusable for customers to test the
answerAPI properly. And will furthermore hinder the momentum we could
have to incentive them to move to v3 with the rest of the feature we
will add to the answerAPI in the next sprints.

Co-authored-by: Danny Gauthier <dgauthier@WKS-002169.corp.coveo.com>
…archId V2 (#4510)

Make sure to keep the id of the search that returned each result.

https://coveord.atlassian.net/browse/KIT-3481

backporting #4391
…wn heading (#4564)

[SVCC-4245](https://coveord.atlassian.net/browse/SVCC-4245)

A CRGA model generally generates markdown headings like this:
```
# Title
```

However, in some cases, it can generate headings this way:
```
**Title**
=====
```

When it does, the HTML returned by the `generated-answer` component is
broken and the heading reads like this:
```
Title>Title
```

The core of the issue is in the custom Marked renderer. When the heading
has formatting, the `text` parameter contains the HTML rendering of the
heading content. Inserting non-escaped HTML into the `aria-label`
attribute then breaks the `div` element.

This PR fixes the issue by affecting only the heading text content to
the `aria-label` attribute. To do so, the HTML elements are removed from
the heading content when setting `aria-label`. The heading content HTML
is kept intact when setting the heading inner HTML though in order to
keep the heading formatting.

For example:
```
**Title**
=====
```
Would generate this HTML
```
<div part="answer-heading-1" aria-label="Title">
  <strong part="answer-strong">Title</strong>
</div>
```

[SVCC-4245]:
https://coveord.atlassian.net/browse/SVCC-4245?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Louis Bompart <lbompart@coveo.com>
@coveo/headless@2.80.3
@coveo/atomic@2.78.3
@coveo/headless-react@1.1.7
@coveo/atomic-react@2.14.3
@coveo/atomic-angular@2.28.3
@coveo/atomic-hosted-page@1.0.9
@coveo/quantic@2.57.4

**/CHANGELOG.md
**/package.json
CHANGELOG.md
package.json
package-lock.json
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.

6 participants