Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

No e2e, stories or mdx needed as this is an internal component.

✅ Checklist

  • 🧪 The component is unit tested
  • 🧪 The component includes E2E tests
  • 🗑️ Old Cypress tests exclusive to the component are removed
  • 📖 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.
  • 🎨 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-5024
close #6377

- Create new atomic-tab-button component as a Lit custom element in its own folder
- Delete incorrect functional component migration (tab-button.ts)
- Delete original Stencil component (stencil-tab-button.tsx) and styles (tab-button.pcss)
- Add comprehensive unit tests for the new component
- Update exports in index.ts and lazy-index.ts
- Add import to atomic-tab-manager.ts

Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix migration of atomic-tab-button component feat(atomic): migrate atomic-tab-button from Stencil to Lit Dec 3, 2025
Copilot AI requested a review from alexprudhomme December 3, 2025 20:39
Copilot finished work on behalf of alexprudhomme December 3, 2025 20:39
@alexprudhomme alexprudhomme marked this pull request as ready for review December 4, 2025 14:37
@alexprudhomme alexprudhomme requested a review from a team as a code owner December 4, 2025 14:37
@alexprudhomme alexprudhomme changed the title feat(atomic): migrate atomic-tab-button from Stencil to Lit refactor(atomic): migrate atomic-tab-button from Stencil to Lit Dec 4, 2025
Copilot finished reviewing on behalf of alexprudhomme December 4, 2025 14:41
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 migrates the atomic-tab-button component from Stencil to Lit as part of the broader Stencil-to-Lit migration effort. The component is marked as internal, so e2e tests, Storybook stories, and MDX documentation are not required per the PR description.

Key Changes:

  • Migrated atomic-tab-button from Stencil to Lit with Tailwind CSS styling
  • Updated unit tests to use Vitest instead of the previous testing framework
  • Updated atomic-tab-manager to use the new Lit component and corrected role from "list" to "tablist"

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/atomic/src/components/common/atomic-tab-button/atomic-tab-button.ts New Lit implementation of tab button component with shadow DOM and Tailwind styles
packages/atomic/src/components/common/atomic-tab-button/atomic-tab-button.spec.ts Migrated unit tests to Vitest with updated test structure
packages/atomic/src/components/search/atomic-tab-manager/atomic-tab-manager.ts Updated to import and use new Lit tab button, changed container role from "list" to "tablist"
packages/atomic/src/components/search/atomic-tab-manager/e2e/page-object.ts Updated locator from label-based to role-based for better semantic querying
packages/atomic/src/components/common/index.ts Exported new AtomicTabButton component
packages/atomic/src/components/common/lazy-index.ts Added lazy loading entry for atomic-tab-button
packages/atomic/src/utils/custom-element-tags.ts Registered 'atomic-tab-button' custom element tag
packages/atomic/src/components/common/tabs/stencil-tab-button.tsx Removed old Stencil implementation
packages/atomic/src/components/common/tabs/tab-button.ts Removed old functional component implementation
packages/atomic/src/components/common/tabs/tab-button.pcss Removed old PostCSS styles
packages/atomic/src/components.d.ts Removed Stencil-generated type definitions for atomic-tab-button
Comments suppressed due to low confidence (2)

packages/atomic/src/components/common/atomic-tab-button/atomic-tab-button.spec.ts:51

  • The test is checking for role="listitem" but the implementation uses role="tab". This test should be updated to verify role="tab" instead. The container query querySelector('[role="listitem"]') on line 25 will return null, causing test failures.
    packages/atomic/src/components/common/atomic-tab-button/atomic-tab-button.spec.ts:25
  • The getContainer() function queries for '[role="listitem"]' but the implementation renders role="tab". This selector should be '[role="tab"]' to match the actual implementation.

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate atomic-tab-button

2 participants