Skip to content

Conversation

@lavoiesl
Copy link
Contributor

@lavoiesl lavoiesl commented Nov 25, 2025

Work for #6389
https://coveord.atlassian.net/browse/KIT-4982

This is a PR in preparation to the migration to Lit: #6662
I decided to do it separately because the PR was already big and I wanted to make sure my changes were still passing all CI.

  • Rename files to stencil-
  • Split into multiple files
  • Remove the use of <Fragment>.
    • It's just a Stencil compile time helper.
    • Fragment is not supported when invoking Stencil from Vitest.
    • Returning an array does the same thing.
  • Add more support in renderStencilVNode:
    • Array of nodes as input
    • Event listeners
    • htmlFor, which resolves to the for attribute.
  • Generate unit tests.

@github-actions
Copy link

🔗 Scratch Orgs ready to test this PR:

@lavoiesl lavoiesl force-pushed the seb-KIT-4983-QuickviewIframe branch 2 times, most recently from 9174484 to 4e72f84 Compare November 25, 2025 16:51
@lavoiesl lavoiesl force-pushed the seb-KIT-4982-QuickviewSidebar-tests branch 2 times, most recently from c8be29e to 3ecff48 Compare November 25, 2025 16:52
@lavoiesl lavoiesl changed the base branch from seb-KIT-4983-QuickviewIframe to seb-KIT-4982-stencil-test-prompt November 25, 2025 16:55
@lavoiesl lavoiesl force-pushed the seb-KIT-4982-QuickviewSidebar-tests branch from 3ecff48 to 1abb405 Compare November 25, 2025 16:55
@lavoiesl lavoiesl marked this pull request as ready for review November 26, 2025 18:25
@lavoiesl lavoiesl requested a review from a team as a code owner November 26, 2025 18:25
Copy link
Contributor

@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.

Lgtm 👍

@lavoiesl lavoiesl force-pushed the seb-KIT-4982-stencil-test-prompt branch from df68b56 to 99a0760 Compare November 28, 2025 13:21
@lavoiesl lavoiesl force-pushed the seb-KIT-4982-QuickviewSidebar-tests branch from 1abb405 to 9332263 Compare November 28, 2025 13:22
@lavoiesl lavoiesl temporarily deployed to Prerelease (CDN) December 1, 2025 14:18 — with GitHub Actions Inactive
Base automatically changed from seb-KIT-4982-stencil-test-prompt to main December 1, 2025 14:57
@lavoiesl lavoiesl force-pushed the seb-KIT-4982-QuickviewSidebar-tests branch from 38f7bd8 to 055258b Compare December 1, 2025 15:01
Copilot AI review requested due to automatic review settings December 1, 2025 15:01
Copilot finished reviewing on behalf of lavoiesl December 1, 2025 15:06
@lavoiesl lavoiesl temporarily deployed to Prerelease (CDN) December 1, 2025 15:08 — with GitHub Actions Inactive
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 prepares the atomic-quickview-sidebar component for migration to Lit by refactoring the Stencil functional component structure. The changes maintain existing functionality while adhering to patterns that will support the upcoming Lit migration.

Key changes:

  • Enhanced renderStencilVNode test utility to support arrays, event listeners, htmlFor attribute mapping, and boolean attributes
  • Split monolithic component into focused, testable functional components with stencil- prefixes
  • Replaced Fragment with array returns for Vitest compatibility
  • Generated comprehensive unit tests for all functional components

Reviewed changes

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

Show a summary per file
File Description
vitest-utils/testing-helpers/stencil-vnode-renderer.ts Added support for array rendering, event listeners (onClick, etc.), htmlFor attribute conversion, and boolean attributes to enable testing of split functional components
atomic-quickview-sidebar/stencil-minimize-button.tsx Extracted minimize button logic into standalone functional component
atomic-quickview-sidebar/stencil-minimize-button.spec.ts Added unit tests covering button rendering, event handling, and conditional badge display
atomic-quickview-sidebar/stencil-keywords.tsx Extracted keywords list rendering; replaced Fragment with array return pattern
atomic-quickview-sidebar/stencil-keywords.spec.ts Added tests for keyword rendering, navigation callbacks, highlight toggling, and disabled states
atomic-quickview-sidebar/stencil-highlight-keywords-checkbox.tsx Extracted checkbox component; uses array return for conditional label rendering
atomic-quickview-sidebar/stencil-highlight-keywords-checkbox.spec.ts Added tests for checkbox state management and conditional label visibility
atomic-quickview-sidebar/stencil-atomic-quickview-sidebar.tsx Main component now orchestrates extracted child components; marked as deprecated for Stencil-only use
atomic-quickview-sidebar/stencil-atomic-quickview-sidebar.spec.ts Added integration tests for component composition and state propagation
atomic-quickview-modal/atomic-quickview-modal.tsx Updated import path to reference renamed stencil-atomic-quickview-sidebar file

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

@lavoiesl lavoiesl force-pushed the seb-KIT-4982-QuickviewSidebar-tests branch from 055258b to edec312 Compare December 1, 2025 15:15
@lavoiesl lavoiesl temporarily deployed to Prerelease (CDN) December 1, 2025 15:22 — with GitHub Actions Inactive
@lavoiesl lavoiesl added this pull request to the merge queue Dec 1, 2025
Merged via the queue into main with commit 2eb7f08 Dec 1, 2025
81 of 82 checks passed
@lavoiesl lavoiesl deleted the seb-KIT-4982-QuickviewSidebar-tests branch December 1, 2025 15:54
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