-
Notifications
You must be signed in to change notification settings - Fork 39
chore(atomic): migrate atomic-recs-result to Lit #6929
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
73180a4 to
2487a26
Compare
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 migrates the atomic-recs-result component from Stencil to Lit as part of the ongoing framework migration effort. The component is used internally by atomic-recs-list to render individual recommendation results with customizable layouts, density settings, and template content.
Key changes:
- Migrated from Stencil
.tsxto Lit.tsimplementation with proper decorators and reactive controllers - Replaced Stencil lifecycle hooks with Lit equivalents (
connectedCallback,disconnectedCallback,firstUpdated) - Introduced
ItemLayoutControllerandCustomRenderControllerfor managing layout and custom rendering - Added comprehensive unit test coverage (572 lines) including edge cases for undefined content and custom rendering functions
- Updated type definitions and React wrapper integration
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.tsx |
Removed legacy Stencil implementation |
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.ts |
New Lit implementation with reactive controllers and proper lifecycle management |
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.spec.ts |
Comprehensive unit tests covering props validation, event handlers, rendering modes, and edge cases |
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.pcss |
Removed PostCSS file (styles now inline) |
packages/atomic/src/components/recommendations/index.ts |
Added export for new Lit component |
packages/atomic/src/components/recommendations/lazy-index.ts |
Added lazy loading entry for new Lit component |
packages/atomic/src/utils/custom-element-tags.ts |
Registered component tag |
packages/atomic/src/components.d.ts |
Removed auto-generated Stencil type definitions |
packages/atomic-react/src/components/search/components.ts |
Added React wrapper for new Lit component |
packages/atomic-react/src/components/search/ResultListWrapper.tsx |
Updated type references to use component types instead of exported constants |
packages/atomic-react/src/components/commerce/CommerceProductListWrapper.tsx |
Updated type references to use component types instead of exported constants |
packages/atomic/src/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.ts |
Added import for new Lit component |
packages/atomic/src/components/common/item-list/display-wrapper.ts |
Updated import path for ItemDisplayLayout type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.ts
Outdated
Show resolved
Hide resolved
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.ts
Outdated
Show resolved
Hide resolved
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.ts
Outdated
Show resolved
Hide resolved
packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.ts
Show resolved
Hide resolved
…ult/atomic-recs-result.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ult/atomic-recs-result.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
no story, mdx or e2e as it is an internal component
✅ Checklist
.mdxfileindex.tsandlazy-index.tsfiles.https://coveord.atlassian.net/browse/KIT-5358