-
Notifications
You must be signed in to change notification settings - Fork 39
feat(atomic): migrate atomic-smart-snippet to Lit with Tailwind styles #6858
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
feat(atomic): migrate atomic-smart-snippet to Lit with Tailwind styles #6858
Conversation
… Migration) Co-authored-by: y-lakhdar <[email protected]>
Co-authored-by: y-lakhdar <[email protected]>
Co-authored-by: y-lakhdar <[email protected]>
Co-authored-by: y-lakhdar <[email protected]>
|
@copilot few adjustments:
|
… tests - Create tw.css.ts file with Tailwind styles - Add @withTailwindStyles decorator to component - Simplify E2E tests to single rendering test - Expand unit tests with comprehensive coverage from Cypress - Remove Cypress test file (smart-snippet.cypress.ts) - Fix TypeScript errors (use private field #id instead of private id) Co-authored-by: y-lakhdar <[email protected]>
All adjustments completed in commit ✅ Removed The component now uses Tailwind styles, has comprehensive unit test coverage, and passes all linting checks. |
Description
Migrates
atomic-smart-snippetfrom Stencil to Lit, maintaining all functionality while modernizing the implementation to use Lit decorators, lifecycle methods, and functional component patterns. Includes migration from PCSS to Tailwind CSS with expanded utility classes.Changes
Component Migration
.tsxto Lit.tsusing@customElement,@property,@statedecoratorsconnectedCallback,disconnectedCallback,willUpdate)renderSnippetWrapper,renderSnippetQuestion,renderSnippetFooter, etc.)arrayConverterfortabs-included/tabs-excludedatomic-smart-snippet.tw.css.ts)link-style,set-font-size-*) to CSS variables since@referencedirectives are not supported in Lit'scsstemplate literals@applydirectives to standard CSS using CSS custom properties@withTailwindStylesdecorator for proper style encapsulation#idinstead ofprivate id)atomic-smart-snippet-sourcecomponent to resolve Rollup bundling errorTesting
smart-snippet.cypress.tswith all coverage preserved in unit testsDocumentation
Notes
@/src/components/common/smart-snippets/atomic-smart-snippet-sourceto@/src/components/common/atomic-smart-snippet-source/atomic-smart-snippet-sourcecsstemplate tag constraints✅ Checklist
.mdxfileindex.tsandlazy-index.tsfiles.https://coveord.atlassian.net/browse/KIT-5062
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.