Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

βœ… Checklist

  • πŸ§ͺ The component is unit tested
  • πŸ§ͺ The component includes E2E tests
  • πŸ—‘οΈ Old Cypress tests exclusive to the component are removed (N/A - 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 - modal is auto-created, not exported)
  • 🎨 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

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

Description

Migrates atomic-insight-smart-snippet-feedback-modal from Stencil to Lit, following the pattern established in the search version migration.

Key Changes

  • Component: Converted to Lit with @customElement, @property, @state, @bindings, @errorGuard, @bindingGuard, @withTailwindStyles
  • Headless Integration: Uses @coveo/headless/insight with InsightBindings, buildInsightSmartSnippet, and Insight-specific types
  • Lifecycle: updated() replaces @Watch for isOpen changes
  • Styles: Tailwind CSS replaces PostCSS (.tw.css.ts)
  • Tests: Vitest unit tests (288 lines) using renderInAtomicInsightInterface
  • Stories: Storybook with MockAnswerApi and wrapInInsightInterface
  • E2E: Playwright tests with fixture and page object pattern
  • Documentation: MDX file with usage and CSS parts

Insight-Specific Adaptations

// Headless imports
import {
  buildSmartSnippet as buildInsightSmartSnippet,
  type SmartSnippet as InsightSmartSnippet,
  type SmartSnippetFeedback as InsightSmartSnippetFeedback,
} from '@coveo/headless/insight';

// Bindings type
import type {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';

// Storybook API mocking
import {MockAnswerApi} from '@/storybook-utils/api/answer/mock';
import {wrapInInsightInterface} from '@/storybook-utils/insight/insight-interface-wrapper';

Maintains full functional parity with the Stencil version.

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate atomic-insight-smart-snippet-feedback-modal comonent to Lit</issue_title>
<issue_description>

Issue KIT-4855
Parent KIT-4881
Type User Story
Status New
Priority Medium
Components

<agent_instructions>refer to this PR #6820 and follow the same pattern. The changes should be identical (but for insight)</agent_instructions>

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.

Co-authored-by: y-lakhdar <12199712+y-lakhdar@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate atomic-insight-smart-snippet-feedback-modal to Lit feat(atomic): migrate atomic-insight-smart-snippet-feedback-modal to Lit Jan 8, 2026
Copilot AI requested a review from y-lakhdar January 8, 2026 17:40
@y-lakhdar y-lakhdar added the chromatic Opt-in w/ Chromatic label Jan 8, 2026
Copilot AI temporarily deployed to Prerelease (CDN) January 8, 2026 17:49 Inactive
@y-lakhdar
Copy link
Contributor

replaced by #6937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chromatic Opt-in w/ Chromatic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate atomic-insight-smart-snippet-feedback-modal comonent to Lit

2 participants