Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

Description

atomic-facet-manager was unable to discover and manage facets nested inside atomic-popover elements because getFacetsInChildren() only checked direct children.

Changes:

  • Added isPopover() helper to detect atomic-popover elements
  • Modified getFacetsInChildren() in both stencil-facet-common.tsx and facet-common.ts to look inside popover children
  • Added 5 unit tests covering nested facet discovery
  • Added Storybook story showcasing atomic-facet-manager with facets inside atomic-popover

Usage example:

<atomic-facet-manager>
  <atomic-facet field="author"></atomic-facet>
  <atomic-popover>
    <atomic-facet field="category"></atomic-facet> <!-- Now discovered -->
  </atomic-popover>
</atomic-facet-manager>

Note: Uses find() rather than filter() since atomic-popover enforces a single child facet by design.

Original prompt

Adapt the atomic-facet-manager so that it can acquire a facet nested within atomic-popover


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

Copilot AI and others added 3 commits November 28, 2025 20:02
Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
…nested facets

Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Copilot AI changed the title [WIP] Adapt atomic facet manager to acquire nested facet Adapt atomic-facet-manager to acquire facets nested within atomic-popover Nov 28, 2025
Copilot AI requested a review from louis-bompart November 28, 2025 20:22
Copilot finished work on behalf of louis-bompart November 28, 2025 20:22
Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

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

@copilot add a story in the atomic-facet-manager that showcase its use with atomic-popover.

Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 28, 2025

@copilot add a story in the atomic-facet-manager that showcase its use with atomic-popover.

Added in commit 0b26e5f. The new story WithPopover (named "With facets inside atomic-popover") demonstrates facets nested inside atomic-popover components within atomic-facet-manager. It can be found in Storybook under Search/FacetManager.

…over

Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Copilot finished work on behalf of louis-bompart November 28, 2025 20:55
Copilot AI requested a review from louis-bompart November 28, 2025 20:55
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.

2 participants