fix(atomic): exportparts added to export parts from atomic-generated-answer sub-components#7619
fix(atomic): exportparts added to export parts from atomic-generated-answer sub-components#7619mmitiche wants to merge 4 commits into
Conversation
🦋 Changeset detectedLatest commit: 59129ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Tip All tests passed and all changes approved!🟢 UI Tests: 366 tests unchanged |
@coveo/atomic
@coveo/atomic-hosted-page
@coveo/atomic-legacy
@coveo/atomic-react
@coveo/auth
@coveo/bueno
@coveo/create-atomic
@coveo/create-atomic-component
@coveo/create-atomic-component-project
@coveo/create-atomic-result-component
@coveo/create-atomic-rollup-plugin
@coveo/headless
@coveo/headless-react
@coveo/shopify
commit: |
There was a problem hiding this comment.
Pull request overview
This PR makes atomic-generated-answer styling more consistent by ensuring important shadow parts from nested generated-answer sub-components are re-exported and therefore styleable from the top-level component.
Changes:
- Added
exportpartspropagation for generated answer thread content and follow-up input so consumers can style deeper parts fromatomic-generated-answer. - Exposed inline-link parts by adding
exportpartsto generated markdown link output, and updated markdown sanitization to allow theexportpartsattribute. - Added/updated unit tests validating
exportpartspropagation and sanitizer configuration.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/atomic/src/components/search/atomic-generated-answer/atomic-generated-answer.ts | Adds exportparts for thread + follow-up input, and documents follow-up input parts in JSDoc. |
| packages/atomic/src/components/search/atomic-generated-answer/atomic-generated-answer.spec.ts | Adds assertions for exportparts on thread and follow-up input. |
| packages/atomic/src/components/common/generated-answer/generated-content/markdown-utils.ts | Adds exportparts attribute to rendered <atomic-generated-answer-inline-link> markup. |
| packages/atomic/src/components/common/generated-answer/generated-content/markdown-utils.spec.ts | Updates expected HTML output to include exportparts on inline links. |
| packages/atomic/src/components/common/generated-answer/generated-content/generated-markdown-content.ts | Allows exportparts through sanitizer config for atomic-generated-answer-inline-link. |
| packages/atomic/src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts | Updates sanitizer config expectation to include exportparts. |
| packages/atomic/src/components/common/atomic-generated-answer-thread/atomic-generated-answer-thread.ts | Re-exports generated answer content parts from nested atomic-generated-answer-content. |
| packages/atomic/src/components/common/atomic-generated-answer-thread/atomic-generated-answer-thread.spec.ts | Adds a test ensuring nested answer-content receives the expected exportparts. |
| .changeset/gentle-cats-knock.md | Adds a patch changeset for the Atomic package. |
| const GENERATED_ANSWER_THREAD_EXPORT_PARTS = [ | ||
| 'feedback-and-copy-buttons', | ||
| 'feedback-button', | ||
| 'copy-button', | ||
| 'citations-label', |
SimonMilord
left a comment
There was a problem hiding this comment.
As long as we are sure all those parts need to be exported as part im fine with this. This is a lot of customization though XD
This PR does not export additional parts, This PR simply restores, this exposure to allow parts to be customizable again. The only parts that this PR adds are the 3 inline link parts. |
SFINT-6764
Summary
This PR makes generated-answer parts consistently style-able from
atomic-generated-answer.Changes
exportpartsattributes across nested generated-answer components.exportpartsin markdown sanitization foratomic-generated-answer-inline-linkatomic-generated-answerJSDoc.Demo
The following example is created after targeting multiple parts with a style tag in
genqa.html, the parts are successfully styles now that the parts are correctly exported:Screen.Recording.2026-05-21.at.4.34.11.PM.mov