Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

Migrates atomic-segmented-facet from Stencil to Lit as part of the ongoing framework migration effort.

Changes

Component Migration

  • atomic-segmented-facet.ts - New Lit implementation with full feature parity
    • Uses @bindStateToController for Facet, SearchStatus, TabManager state binding
    • Uses @mapProperty decorator for dependsOn attribute mapping
    • CSS styles via css template literal with CSS custom properties for border radius

Functional Component

  • facet-segmented-value.ts - New Lit functional component using renderButton
  • stencil-facet-segmented-value.tsx - Renamed original for backwards compatibility

Exports

  • Added to index.ts and lazy-index.ts under ./facets/atomic-segmented-facet/

Tests

  • Unit tests for component initialization, rendering states, value selection, cleanup
  • Unit tests for functional component rendering and interaction
  • E2E test structure (page object, fixture, basic tests)

Usage

<atomic-segmented-facet
  field="objecttype"
  label="Object Type"
  number-of-values="8"
  tabs-included='["all", "articles"]'
></atomic-segmented-facet>

Notes

  • Existing Storybook stories work unchanged
  • Cypress tests are skipped (describe.skip) - migration to Playwright pending

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,AutoDeElevate,RenderD (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate atomic-segmented-facet</issue_title>
<issue_description>

Jira Issue: KIT-4955

Type: User Story
Status: New
Priority: Medium
Components: Atomic


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

Custom agent used: StencilToLitMigrationV2
Specialized agent for migrating Atomic Stencil code to Lit with visual regression testing


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 1, 2025 16:54
- Create Lit version of atomic-segmented-facet component
- Create Lit version of renderFacetSegmentedValue functional component
- Rename Stencil facet-segmented-value to stencil-facet-segmented-value
- Update imports in Stencil component to use prefixed version
- Add component exports to index.ts and lazy-index.ts
- Create e2e test structure (page object, fixture, basic tests)

Co-authored-by: jmazzah-coveo <[email protected]>
…etSegmentedValue

- Create comprehensive unit tests for the Lit atomic-segmented-facet component
- Create unit tests for the renderFacetSegmentedValue functional component
- Test initialization, rendering, selection behavior, and disconnection

Co-authored-by: jmazzah-coveo <[email protected]>
Copilot AI changed the title [WIP] Migrate atomic segmented facet feat(atomic): migrate atomic-segmented-facet to Lit Dec 1, 2025
Copilot finished work on behalf of jmazzah-coveo December 1, 2025 17:03
Copilot AI requested a review from jmazzah-coveo December 1, 2025 17:03
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.

Migrate atomic-segmented-facet

2 participants