-
Notifications
You must be signed in to change notification settings - Fork 39
chore(atomic): migrate atomic-insight-history-toggle to Lit #6849
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 <[email protected]>
β¦-toggle Co-authored-by: alexprudhomme <[email protected]>
Co-authored-by: alexprudhomme <[email protected]>
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-insight-history-toggle component from Stencil to Lit, replacing the legacy TSX implementation with a modern TypeScript-based Lit component. The component is a simple button toggle for displaying history panels within the Insight interface.
Key changes:
- Converted component from Stencil (
.tsx) to Lit (.ts) with proper decorators and patterns - Added comprehensive unit tests using Vitest browser mode (142 test cases)
- Added E2E tests using Playwright with page object pattern
- Created Storybook documentation with stories and MDX file
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
atomic-insight-history-toggle.ts |
New Lit component implementation with @customElement, @property decorators, and withTailwindStyles |
atomic-insight-history-toggle.tsx |
Removed legacy Stencil component implementation |
atomic-insight-history-toggle.pcss |
Removed PostCSS stylesheet (no longer needed with Tailwind) |
atomic-insight-history-toggle.spec.ts |
New comprehensive unit tests covering rendering, properties, callbacks, and accessibility |
atomic-insight-history-toggle.new.stories.tsx |
Storybook stories with Default and WithTooltip variants |
atomic-insight-history-toggle.mdx |
Component documentation with usage examples |
e2e/atomic-insight-history-toggle.e2e.ts |
E2E tests for visibility and tooltip behavior |
e2e/fixture.ts |
Playwright fixture setup for E2E tests |
e2e/page-object.ts |
Page object pattern for E2E test interactions |
index.ts |
Added export for the new Lit component |
lazy-index.ts |
Added lazy loading configuration for the component |
custom-element-tags.ts |
Registered the component tag for Lit |
components.d.ts |
Removed Stencil auto-generated type definitions |
atomic-react/.../components.ts |
Added React wrapper exports for both search and commerce packages |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
β Checklist
.mdxfileindex.tsandlazy-index.tsfiles.https://coveord.atlassian.net/browse/KIT-4875