Skip to content

feat(ep-commerce): catalog-search enhancements for faceted search pages#352

Closed
field123 wants to merge 1 commit into
masterfrom
feat/iso-catalog-search-components
Closed

feat(ep-commerce): catalog-search enhancements for faceted search pages#352
field123 wants to merge 1 commit into
masterfrom
feat/iso-catalog-search-components

Conversation

@field123
Copy link
Copy Markdown
Collaborator

@field123 field123 commented Jun 4, 2026

Closes #351.

Reusable additions to the EP catalog-search components for building faceted, deep-linked search result pages. All handlers ride the $ctx data context so Plasmic designers wire interactions without component refs.

Changes

Component Addition
EPCatalogSearchProvider baseFilter prop — injected via InstantSearch <Configure filters> so it persists across facet refinement (adapter-level filter_by does not). highlightFullFields prop → Typesense highlight_full_fields.
EPSearchHits Exposes resolved extensions and rawData on currentProduct so the PDP field components work inside hit cards unchanged. Configurable productPathPrefix for the hit link. Recovers EP's bare-keyed highlights from the raw Typesense hit and exposes _snippetedDescription.
EPRefinementList singleSelect (radio-style via useMenu, count-desc ordering) + itemGap for the pill row. The design-time canvas mock mirrors the singleSelect flex pill-row so the visual builder matches runtime.
EPClearRefinements alwaysRender for always-visible "all"-style affordances (style off clearRefinementsData.canRefine).
EPSearchPagination goTo / next / prev exposed on searchPaginationData.
EPSearchAutocomplete clear / setQuery exposed on autocompleteData.

Why the base filter goes through <Configure filters>

The adapter joins Configure's filters with generated facet filters (&&), but drops additionalSearchParameters.filter_by as soon as InstantSearch generates its own filters (i.e. on any facet refinement). Routing the base filter through filters is the only way it survives a facet selection — verified live (selecting a scope facet no longer re-admits filtered-out documents, e.g. variation children).

Testing

  • All package tests pass (catalog-search-components.test.tsx extended: base-filter/highlight provider config, hit extensions + rawData + productPathPrefix + highlight recovery, singleSelect menu semantics + canvas mock layout).
  • Verified end-to-end against a live storefront search page (Playwright, 1440px + 390px): live search-as-you-type + URL sync + back/forward, autocomplete, single-select scope facet with live counts + clear-all, query-term highlighting in title and snippet, numbered pagination with page indicator, reference links to the PDP, empty state, header-search hand-off.

Notes

  • No production build artifacts are committed (source only).
  • Single commit on master.

@field123 field123 force-pushed the feat/iso-catalog-search-components branch from 48fc968 to f88c895 Compare June 4, 2026 14:57
@field123 field123 changed the base branch from master to feat/product-extensions-map June 4, 2026 14:57
@field123 field123 force-pushed the feat/iso-catalog-search-components branch from f88c895 to dbe9e38 Compare June 4, 2026 15:21
@field123 field123 changed the base branch from feat/product-extensions-map to master June 4, 2026 15:21
@field123 field123 force-pushed the feat/iso-catalog-search-components branch from dbe9e38 to 219b440 Compare June 4, 2026 15:35
Reusable additions to the EP catalog-search components for building
faceted, deep-linked search result pages:

- EPCatalogSearchProvider: `baseFilter` (injected via InstantSearch
  `<Configure filters>` so it survives facet refinement, unlike adapter
  `filter_by`) + `highlightFullFields` props.
- EPSearchHits: expose template `extensions` (resolved) and `rawData` on
  `currentProduct` so the PDP field components work inside hit cards
  unchanged; configurable `productPathPrefix` for the hit link; recover
  EP's bare-keyed highlights from the raw Typesense hit and expose
  `_snippetedDescription` (the marked excerpt).
- EPRefinementList: `singleSelect` (radio-style via `useMenu`, count-desc
  ordering) + `itemGap`; the canvas mock mirrors the singleSelect pill-row
  layout so the visual builder matches runtime.
- EPClearRefinements: `alwaysRender` for always-visible "all" affordances
  (style off `clearRefinementsData.canRefine`).
- EPSearchPagination: expose `goTo`/`next`/`prev` on `searchPaginationData`.
- EPSearchAutocomplete: expose `clear`/`setQuery` on `autocompleteData`.

The action handlers ride the data context so designers wire interactions
via `$ctx` without component refs. All package tests pass.
@field123 field123 force-pushed the feat/iso-catalog-search-components branch from 1867323 to 9cb1b78 Compare June 5, 2026 09:02
@field123 field123 changed the title feat(ep-commerce): catalog-search enhancements for ISO-style search pages feat(ep-commerce): catalog-search enhancements for faceted search pages Jun 5, 2026
@field123 field123 closed this Jun 5, 2026
@field123 field123 deleted the feat/iso-catalog-search-components branch June 5, 2026 09:03
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.

EP Catalog Search: component gaps blocking a faceted search page

1 participant