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
  • πŸ“– 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-5362

Copilot AI and others added 3 commits January 2, 2026 13:43
Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
…tions-toggle

Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
Co-authored-by: alexprudhomme <78121423+alexprudhomme@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate atomic insight user actions toggle component feat(atomic): migrate atomic-insight-user-actions-toggle to Lit Jan 2, 2026
Copilot AI requested a review from alexprudhomme January 2, 2026 14:01
@alexprudhomme alexprudhomme changed the title feat(atomic): migrate atomic-insight-user-actions-toggle to Lit refactor(atomic): migrate atomic-insight-user-actions-toggle to Lit Jan 2, 2026
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-insight-user-actions-toggle component from Stencil to Lit. The component displays a button that opens a modal containing user actions timeline, designed for Insight Panel interfaces.

Key Changes

  • Migrated component from Stencil (.tsx) to Lit (.ts) using modern decorators and patterns
  • Replaced Stencil's IconButton with the Lit functional renderIconButton component
  • Added comprehensive unit tests using Vitest and E2E tests using Playwright
  • Created Storybook documentation (.mdx file) and stories

Reviewed changes

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

Show a summary per file
File Description
atomic-insight-user-actions-toggle.ts New Lit implementation with proper decorators, bindings, and error guards
atomic-insight-user-actions-toggle.tsx Removed legacy Stencil implementation
atomic-insight-user-actions-toggle.pcss Removed (no longer needed with shadow DOM component)
atomic-insight-user-actions-toggle.spec.ts New comprehensive unit tests covering initialization, rendering, and modal interaction
atomic-insight-user-actions-toggle.new.stories.tsx Storybook stories with MSW API mocking
atomic-insight-user-actions-toggle.mdx Component documentation for Storybook
e2e/atomic-insight-user-actions-toggle.e2e.ts Playwright E2E tests for button visibility and modal interaction
e2e/page-object.ts Page object pattern for E2E test interactions
e2e/fixture.ts E2E test fixtures and setup
user-actions-controller.ts New test helper fixture for mocking UserActions controller
lazy-index.ts Added lazy loading entry for the migrated component
index.ts Added component export
custom-element-tags.ts Registered new custom element tag
components.d.ts Auto-generated type definitions updated (Stencil types removed)

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +41
public userActions!: InsightUserActions;

@bindStateToController('userActions')
@state()
public userActionsState!: InsightUserActionsState;

Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The userActionsState property should be declared as private. According to the class field declaration order guidelines, controller-bound state fields should be grouped with other state fields, but public state that's bound to controllers should typically be private unless explicitly needed in the public API. Since this state is only used internally to react to controller state changes and isn't documented as part of the component's public API, it should be private.

Suggested change
public userActions!: InsightUserActions;
@bindStateToController('userActions')
@state()
public userActionsState!: InsightUserActionsState;
@bindStateToController('userActions')
@state()
private userActionsState!: InsightUserActionsState;
public userActions!: InsightUserActions;

Copilot uses AI. Check for mistakes.
@state()
error!: Error;

public userActions!: InsightUserActions;
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The userActions property should be declared as private. This controller is only used internally by the component and is not documented as part of the public API. According to the component structure guidelines, fields that are not part of the public API should be private to avoid exposing implementation details.

Suggested change
public userActions!: InsightUserActions;
private userActions!: InsightUserActions;

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +61
private buttonRef?: HTMLButtonElement;
private modalRef?: HTMLAtomicInsightUserActionsModalElement;
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The property declaration order doesn't follow the established guidelines. According to the class field declaration order, non-decorated fields (like buttonRef and modalRef) should come after all @state decorated fields. Move these two properties to appear after the userActionsState declaration.

Copilot generated this review using guidance from repository custom instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants