Skip to content

chore(atomic): migrate atomic-insight-result-action to Lit#7172

Merged
fbeaudoincoveo merged 15 commits intomainfrom
alexprudhomme/insight-result-action-4hh
Feb 26, 2026
Merged

chore(atomic): migrate atomic-insight-result-action to Lit#7172
fbeaudoincoveo merged 15 commits intomainfrom
alexprudhomme/insight-result-action-4hh

Conversation

@alexprudhomme
Copy link
Contributor

@alexprudhomme alexprudhomme commented Feb 25, 2026

Summary

Migrates atomic-insight-result-action from Stencil to Lit, including new unit tests, E2E tests, Storybook stories, and MDX documentation.

Scout camping 🏕️

Small improvements discovered during review, applied for parity or correctness:

  • Tooltip reset timeout cleanup — the original Stencil component never cleared the setTimeout used for the "Copied!" tooltip flash. Added disconnectedCallback cleanup and rapid-click debounce (clearTimeout before re-setting).
  • Null-result guardrender() and onClick() now bail early when the result context is unavailable, preventing runtime errors.
  • @reference fix in atomic-insight-user-actions-timeline — corrected a wrong Tailwind @reference path that pointed to a non-existent file.
  • @reference addition in atomic-insight-user-actions-session — added the missing Tailwind @reference import.

Editorial choices 📝

  • JSDoc focuses on "what", MDX on "how" — the class-level JSDoc describes the component's purpose; the MDX Usage section shows both placement options (always-visible in atomic-result-section-actions, hover-reveal in atomic-insight-result-action-bar) with markup examples.
  • @internal tag intentionally removed — the Stencil original had @internal, but removing it is required for the component to appear in the custom elements manifest used by Storybook.
  • static styles over Tailwind class prop — the component uses a [part='result-action-button'] CSS selector to override renderIconButton defaults (h-8 w-8 vs the default h-[2.6rem] w-[2.6rem]). This is more reliable than Tailwind class composition, where conflicting utility classes have non-deterministic resolution based on stylesheet generation order.
  • Stories trimmed to twoDefault (with action dropdown control covering all 5 action types) and InActionBar (showing the hover-reveal placement). Per-action stories were redundant.
  • E2E consolidated — a single happy-path test asserts all three parts are visible, rather than three separate tests checking one part each.

✅ Checklist

  • 🧪 The component is unit tested
  • 🧪 The component includes E2E tests
  • 🗑️ Old Cypress tests exclusive to the component are removed N/A: No Cypress tests existed for this component
  • 📖 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. N/A: No user-facing strings; tooltip text is consumer-provided via props
  • 📦 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-5482

- Migrate component from Stencil to Lit
- Remove @internal annotation to make component public
- Add unit tests (12 tests)
- Add Storybook stories (7 stories)
- Add MDX documentation
- Add E2E tests (3 tests)
- Fix pre-existing CSS reference issues in atomic-insight-user-actions-timeline and atomic-insight-user-actions-session
Copy link
Contributor Author

@alexprudhomme alexprudhomme left a comment

Choose a reason for hiding this comment

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

Approved 👍

@fbeaudoincoveo fbeaudoincoveo added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit b18fbc1 Feb 26, 2026
217 of 229 checks passed
@fbeaudoincoveo fbeaudoincoveo deleted the alexprudhomme/insight-result-action-4hh branch February 26, 2026 21:17
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.

4 participants