-
Notifications
You must be signed in to change notification settings - Fork 39
Migrate atomic-search-box to Lit #6601
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]>
- Created test fixtures for search box controllers - Added test helper for fake search box suggestions - Comprehensive test coverage for props, controller integration, keyboard navigation, and accessibility Co-authored-by: alexprudhomme <[email protected]>
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.
@copilot You are missing quite a few things :
- You must delete the old stencil component
- You must add/adjust the stories file
- You must add/adjust the mdx file
- You must add/adjust the e2e tests
Use the commerce search box as an example for all of those. Thanks
β¦ile, add MDX docs, update stories and E2E - Deleted old Stencil component file (atomic-search-box.tsx) - Created MDX documentation following commerce pattern - Updated stories with MSW API mocking (WithSuggestions, WithSuggestionsAndRecentQueries, WithNoSuggestions, StandaloneSearchBox) - Updated E2E page-object to use lit-base-page-object instead of base-page-object Co-authored-by: alexprudhomme <[email protected]>
All requested changes have been completed in commit c0006bd:
All changes follow the |
β Checklist
.mdxfileindex.tsandlazy-index.tsfiles.Description
This PR migrates the
atomic-search-boxcomponent from Stencil to Lit framework, following the same patterns used inatomic-commerce-search-box.Component Migration
Converted from Stencil to Lit:
atomic-search-box.tsx)@Componentto@customElementdecoratorLitElementinstead of implementing Stencil component@Propto@propertywith proper configuration@Stateto@state@Eventto standard CustomEvent dispatching@Listento addEventListener in connectedCallback@AriaLiveRegiontoAriaLiveRegionController@BindStateToControllerto@bindStateToControllerdecorator@bindings()decorator for bindings initialization@withTailwindStylesdecorator@bindingGuard()and@errorGuard()decorators on render@/*path aliasesUnit Tests
Comprehensive Vitest test coverage:
Test Fixtures Created:
buildFakeSearchBox- Mock search box controllerbuildFakeStandaloneSearchBox- Mock standalone search box controllerfake-atomic-search-box-suggestions- Test component for suggestionsStorybook Stories
Created comprehensive stories with MSW API mocking:
E2E Tests
lit-base-page-objectinstead of Stencilbase-page-objectDocumentation
Created MDX documentation following commerce pattern:
atomic-search-interfaceQuality Verification
Fixes #6527
Original prompt
π¬ We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.