-
Notifications
You must be signed in to change notification settings - Fork 39
feat(atomic): migration of functional generated content components to lit #6668
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
Conversation
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.
Pull request overview
This PR successfully migrates internal generated content functional components from Stencil to Lit, following the established migration pattern in the Atomic package. The migration creates new Lit implementations (generated-text-content.ts, generated-markdown-content.ts, generated-content-container.ts) while preserving backward compatibility by retaining deprecated Stencil versions prefixed with stencil-*. All new components include comprehensive test coverage following the established testing patterns.
Key Changes
- New Lit functional components with proper TypeScript interfaces and
render*naming convention - Stencil versions renamed with
stencil-*prefix and marked as@deprecated - Comprehensive test suites using
renderFunctionFixturefor all new components - Updated import paths in consuming code to reference Stencil versions
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
stencil-generated-content-container.tsx |
Updated imports to reference stencil-prefixed components for backward compatibility |
stencil-generated-text-content.tsx |
New deprecated Stencil version of text content renderer |
stencil-generated-markdown-content.tsx |
New deprecated Stencil version of markdown content renderer |
generated-text-content.ts |
New Lit functional component for rendering plain text generated content |
generated-text-content.spec.ts |
Comprehensive test suite covering all text content rendering scenarios |
generated-markdown-content.ts |
New Lit functional component for rendering markdown with DOMPurify sanitization |
generated-markdown-content.spec.ts |
Test suite with mock validation for markdown transformation and sanitization |
generated-content-container.ts |
New Lit functional component with children support for content container |
generated-content-container.spec.ts |
Test suite covering format switching, streaming state, and children rendering |
generated-answer-common.tsx |
Updated import to reference deprecated Stencil container version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
.../src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts
Outdated
Show resolved
Hide resolved
alexprudhomme
left a comment
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
louis-bompart
left a comment
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.
Some tweaks in the UT
.../src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts
Outdated
Show resolved
Hide resolved
.../src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts
Outdated
Show resolved
Hide resolved
.../src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts
Outdated
Show resolved
Hide resolved
.../src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts
Outdated
Show resolved
Hide resolved
.../src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts
Show resolved
Hide resolved
.../src/components/common/generated-answer/generated-content/generated-markdown-content.spec.ts
Show resolved
Hide resolved
erocheleau
left a comment
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.
Just a small question, otherwise looks good!
KIT-5038
This PR successfully migrates the internal answer content functional components including the
generated-text-content,generated-markdown-contentandgenerated-content-containerfrom Stencil to Lit while maintaining backward compatibility. The migration follows established patterns and preserves existing functionality for Stencil consumers.Key changes:
Created new functional Lit implementation for
generated-text-content,generated-markdown-contentandgenerated-content-container.Preserved Stencil version of these components stencil-*.tsx with deprecation notice for backward compatibility
Added comprehensive test coverage for the new Lit functional components