-
Notifications
You must be signed in to change notification settings - Fork 39
lab: externalize legacy components #6922
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
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 pull request externalizes legacy Stencil components from the main @coveo/atomic package into a new @coveo/atomic-legacy package as part of the ongoing migration from Stencil to Lit. Currently, only the atomic-suggestion-renderer component has been moved to this new legacy package.
Key Changes:
- Created new
@coveo/atomic-legacypackage with Stencil build configuration - Moved
atomic-suggestion-renderercomponent frompackages/atomic/src/components/common/topackages/atomic-legacy/src/ - Updated imports in search box components to reference the legacy package
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pnpm-workspace.yaml |
Added packages/atomic-legacy to workspace packages |
pnpm-lock.yaml |
Updated lock file with atomic-legacy dependencies and workspace links |
packages/atomic-legacy/package.json |
Created package.json for legacy package with dependencies and build script |
packages/atomic-legacy/tsconfig.json |
Created TypeScript configuration for Stencil compilation |
packages/atomic-legacy/stencil.config.ts |
Created Stencil build configuration with dist-custom-elements output |
packages/atomic-legacy/.gitignore |
Added gitignore to exclude Stencil build artifacts |
packages/atomic-legacy/src/atomic-suggestion-renderer.tsx |
Moved component implementation with inline type definitions to avoid external dependencies |
packages/atomic/package.json |
Added @coveo/atomic-legacy as workspace dependency |
packages/atomic/src/components/search/atomic-search-box/atomic-search-box.ts |
Updated import to use legacy package |
packages/atomic/src/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.ts |
Updated import to use legacy package |
packages/atomic/src/components/insight/atomic-insight-search-box/atomic-insight-search-box.tsx |
Updated import to use legacy package |
packages/atomic/src/components/common/atomic-suggestion-renderer/atomic-suggestion-renderer.spec.tsx |
Deleted test file (component moved to legacy package) |
biome.jsonc |
Excluded atomic-legacy tsx files from Biome linting during migration |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "name": "@coveo/atomic-legacy", | ||
| "type": "module", | ||
| "private": "true", |
Copilot
AI
Jan 7, 2026
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.
The private field should be a boolean value, not a string. Change "true" to true (without quotes).
| "private": "true", | |
| "private": true, |
| "exports": { | ||
| ".": { | ||
| "types": "./dist/types/index.d.ts", | ||
| "import": "./dist/index.js" | ||
| }, | ||
| "./atomic-suggestion-renderer": { | ||
| "types": "./dist/components/atomic-suggestion-renderer.d.ts", | ||
| "import": "./dist/components/atomic-suggestion-renderer.js" | ||
| } |
Copilot
AI
Jan 7, 2026
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.
The package exports reference ./dist/types/index.d.ts and ./dist/index.js, but the Stencil configuration only outputs dist-custom-elements which creates a dist/components/ directory. Either the exports should be updated to match the actual build output paths, or the Stencil configuration needs to include additional output targets (such as dist type) to generate the expected files.
| .stencil | ||
| src/components.d.ts No newline at end of file |
Copilot
AI
Jan 7, 2026
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.
The atomic-legacy package should include a README.md file explaining its purpose as a temporary home for legacy Stencil components during the migration to Lit, and providing basic usage documentation for consumers.
f067cfb to
42d8931
Compare
No description provided.