Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

✅ Checklist

  • 🧪 The component is unit tested
  • 🧪 The component includes E2E tests (covered by atomic-tab-manager E2E tests)
  • 🗑️ Old Cypress tests exclusive to the component are removed (no component-specific Cypress tests 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 - child component used via HTML)
  • 🎨 CSS parts are documented still accessible. (N/A - light DOM component with no shadow parts)
  • 🦥 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-5026

Description

Successfully migrated the atomic-tab component from Stencil to Lit. The component is a simple light DOM data container used exclusively as a child of atomic-tab-manager.

Changes Made

Component Migration

  • ✅ Created atomic-tab.ts using Lit with LightDomMixin
  • ✅ Preserved all properties: label, name, expression
  • ✅ Added error state property for validation
  • ✅ Renamed original Stencil file to stencil-atomic-tab.tsx

Testing

  • ✅ Created comprehensive unit tests (atomic-tab.spec.ts) - 8 tests covering rendering, property reflection, slot content, and property updates
  • ✅ All unit tests passing (8/8)
  • ✅ E2E testing covered by existing atomic-tab-manager E2E tests
  • ✅ No component-specific Cypress tests found

Documentation

  • ✅ Created atomic-tab.mdx with usage examples
  • ✅ Documentation references atomic-tab-manager for context

Design Decisions

  • Storybook Stories: Not created separately as atomic-tab is documented through atomic-tab-manager stories
  • Index Exports: Not added as this is a child component used only within atomic-tab-manager via HTML (similar to other nested components like atomic-result-icon)

Testing

  • ✅ Unit tests: 8/8 passing
  • ✅ E2E tests: Covered by atomic-tab-manager E2E suite
  • ✅ Linting: Passing with no issues
  • ✅ Build: Compiles successfully
  • ✅ TypeScript: All types valid

The component maintains full backward compatibility and is ready for use.

Fixes #6375

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate atomic-tab</issue_title>
<issue_description>

Jira Issue: KIT-5026

Type: User Story
Status: New
Priority: Medium


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

Custom agent used: stencil-to-lit-migration-agent
Specialized agent for migrating Atomic Stencil code to Lit (components, functional components, and utils)


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

@alexprudhomme
Copy link
Contributor

@copilot Retry this please !

Copy link
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot Retry this please !

✅ Migration complete!

The atomic-tab component has been successfully migrated from Stencil to Lit:

Completed:

  • ✅ Component migrated to Lit (commit f7dce3e)
  • ✅ Unit tests created - 8/8 passing (commit 62d5904)
  • ✅ MDX documentation added (commit f7dce3e)
  • ✅ All linting and builds passing

Notes:

  • No separate Storybook stories needed - atomic-tab is documented through atomic-tab-manager stories
  • No separate E2E tests needed - fully covered by atomic-tab-manager E2E tests
  • Component is not exported in index files (child component used only within tab-manager)

The component is ready for use!

Copilot AI changed the title [WIP] Migrate atomic-tab functionality feat(atomic): migrate atomic-tab to Lit Nov 20, 2025
Copilot AI requested a review from alexprudhomme November 20, 2025 16:03
Copilot finished work on behalf of alexprudhomme November 20, 2025 16:03
@alexprudhomme alexprudhomme changed the title feat(atomic): migrate atomic-tab to Lit refactor(atomic): migrate atomic-tab to Lit Nov 20, 2025
@alexprudhomme alexprudhomme marked this pull request as ready for review November 20, 2025 19:04
@alexprudhomme alexprudhomme requested a review from a team as a code owner November 20, 2025 19:04
Copilot finished reviewing on behalf of alexprudhomme November 20, 2025 19:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR successfully migrates the atomic-tab component from Stencil to Lit, moving it from tabs/atomic-tab/atomic-tab.tsx to atomic-tab/atomic-tab.ts. The component is a simple light DOM data container used exclusively as a child of atomic-tab-manager to define tab configurations (label, name, and expression).

Key Changes:

  • Migrated component implementation to Lit using LightDomMixin
  • Added property validation with ValidatePropsController for required label and name props
  • Created comprehensive unit tests (8 tests) and Storybook documentation
  • Updated all package exports (index.ts, lazy-index.ts) and React wrapper

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/atomic/src/components/search/tabs/atomic-tab/atomic-tab.tsx Removed Stencil implementation (file deleted)
packages/atomic/src/components/search/atomic-tab/atomic-tab.ts New Lit implementation with property validation and light DOM rendering
packages/atomic/src/components/search/atomic-tab/atomic-tab.spec.ts Unit tests covering properties, reflection, and slots (missing validation error tests)
packages/atomic/src/components/search/atomic-tab/atomic-tab.new.stories.tsx Storybook stories showing component within tab-manager context
packages/atomic/src/components/search/atomic-tab/atomic-tab.mdx Documentation with usage examples and parent component reference
packages/atomic/src/components/search/index.ts Added AtomicTab export for public API
packages/atomic/src/components/search/lazy-index.ts Added lazy-loading entry for atomic-tab
packages/atomic/src/components.d.ts Removed Stencil-generated type definitions
packages/atomic-react/src/components/search/components.ts Added React wrapper component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alexprudhomme alexprudhomme added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit 291e15e Nov 24, 2025
92 checks passed
@alexprudhomme alexprudhomme deleted the copilot/migrate-atomic-tab branch November 24, 2025 13:11
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-tab

4 participants