Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

✅ Checklist

  • 🧪 The component is unit tested
  • 🧪 The component includes E2E tests
  • 🗑️ Old Cypress tests exclusive to the component are removed (none existed)
  • 📖 The component is documented in storybook with an .mdx file
  • ♿ The component complies with the Web Content Accessibility Guidelines.
  • 🌐 All strings intended for humans or assistive technology must be localized with i18n.
  • 📦 The Lit component is exported in the appropriate index.ts and lazy-index.ts files (N/A - component is @internal)
  • 🎨 CSS parts are documented still accessible.
  • 🦥 Slotted Content, public methods and properties are documented
  • 🔄 The component outputs the same Angular output as before with Stencil
  • 🏷️ The component declares the component type in the HTMLElementTagNameMap

Description

Migrated atomic-insight-folded-result-list from Stencil to Lit following the established search component pattern (atomic-folded-result-list).

Key Changes

Component Implementation

  • Converted to Lit with proper decorators: @customElement, @bindings, @withTailwindStyles, @bindStateToController
  • Uses Insight-specific Headless imports (@coveo/headless/insight)
  • Implements Lit lifecycle: disconnectedCallback, initialize, willUpdate, render
  • Event listeners registered in initialize(), cleaned up in disconnectedCallback()
  • All imports use @/* path aliases

Differences from Search Version

  • No tab manager support (Insight doesn't use tabs)
  • Uses atomic-insight-result and atomic-insight-result-template child components
  • Simplified willUpdate() without tab state management

Test Coverage

  • Unit tests (378 lines): props validation, controller integration, rendering states, event handlers, lifecycle
  • E2E tests: page object model, fixtures, comprehensive folding scenarios
  • Storybook stories with MSW API mocking using new baseFoldedResponse in Insight API mock

Files to Remove Post-Merge

  • atomic-insight-folded-result-list.tsx (original Stencil)
  • atomic-insight-folded-result-list.pcss (original styles)

Component now uses Tailwind CSS via imported listDisplayStyles and placeholderStyles.

https://coveord.atlassian.net/browse/KIT-4856

Original prompt

This section details on the original issue you should resolve

<issue_title>KIT-4856: Migrate the atomic-insight-folded-result-list component to Lit</issue_title>
<issue_description>

Issue KIT-4856
Parent KIT-4833
Type User Story
Status New
Priority Medium
Components

Comments on the Issue (you are @copilot in this section)

Custom agent used: StencilToLitMigrationV1
Specialized agent for migrating Atomic Stencil code to Lit (components, functional components, and utils)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits January 2, 2026 13:45
Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
Created comprehensive Vitest unit tests following the search version pattern. Tests include:
- Component initialization
- Controller integration
- Rendering with different states (loaded/loading/error/empty)
- Props validation
- Event handlers
- Disconnection cleanup

Note: Tests require full build environment to run.

Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
…list

Created comprehensive Storybook stories with MSW API mocking:
- Default story with folded results and children
- Story with no result children
- Story with few result children
- Story with more results available but no children loaded

Also added baseFoldedResponse to Insight API mock for testing folded results.

Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
Created comprehensive Playwright E2E tests following the search version pattern:
- Page object model for component interactions
- Test fixtures for consistent setup
- Happy path tests covering all folding scenarios:
  - No result children
  - Few result children
  - More results available with children
  - More results available without children
- Accessibility testing via role-based locators

Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
…list

Created comprehensive documentation following the search version pattern:
- Usage within atomic-insight-interface
- Code examples for basic setup
- Instructions for defining custom result templates
- Link to Coveo documentation on Result Folding

All core migration steps are now complete!

Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate atomic-insight-folded-result-list component to Lit feat(atomic): migrate atomic-insight-folded-result-list to Lit Jan 2, 2026
Copilot AI requested a review from alexprudhomme January 2, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KIT-4856: Migrate the atomic-insight-folded-result-list component to Lit

2 participants