Skip to content

feat(ep-commerce): enrich EPSearchPagination default slot with Prev/Next chrome#312

Merged
field123 merged 1 commit into
masterfrom
feat/search-page-iter
May 5, 2026
Merged

feat(ep-commerce): enrich EPSearchPagination default slot with Prev/Next chrome#312
field123 merged 1 commit into
masterfrom
feat/search-page-iter

Conversation

@field123
Copy link
Copy Markdown
Collaborator

@field123 field123 commented May 1, 2026

Closes #311.

Summary

  • Replaces EPSearchPagination's placeholder slot (text("Page 1 of 4")) with a structural starting point — hbox containing Prev button, page-text, Next button — so a fresh drop renders working pagination shape.
  • Mirrors the slot-composition pattern EPSearchBox ships post-PRD: Make EPSearchBox styleable by lifting its DOM out of the code-component #308: structural skeleton only, wiring (onClickprevPage/nextPage ref-actions, visibility → hasPrev/hasNext) is designer-side because Plasmic registration metadata cannot bake bindings into defaultValue.
  • Updates the component description in registered metadata to spell out the wiring contract.
  • README gains a Composing EPSearchPagination subsection paralleling the existing Composing EPSearchBox walkthrough.
  • New test asserts the default slot shape so a future refactor cannot silently regress to the empty-chrome state.

Test plan

  • yarn jest plasmicpkgs/commerce-providers/elastic-path — 1523 tests pass (1 added)
  • Authored the slot end-to-end via MCP on project 9iSL9GyrJNp9ebWzxaHtM5 (ProductList page) — Prev / page-text / Next render in Studio canvas. Visibility + ref-action wiring still requires Studio UI per gap add enhanced container insights #81 / PRD PRD: Expose Plasmic's invokeRefAction interaction type in the MCP (gap #81) #310, same as for EPSearchBox.
  • Existing pagination instances in any project that already authored their own slot content keep their authored content (additive change — defaultValue only applies to fresh drops).

Out of scope

…ext chrome (#311)

Replace the placeholder text-only slot with an hbox of [Prev button, page text,
Next button] so a fresh drop-in renders working pagination shape. Mirrors the
same pattern EPSearchBox ships post-#308. Wiring (onClick → ref-actions,
visibility → hasPrev/hasNext) is still designer-side; this only changes the
structural starting point so designers do not begin from a single text node.

- defaultValue: text("Page 1 of 4") → hbox(button, text, button)
- description: spell out the wiring contract (data fields + ref-actions)
- README: add "Composing EPSearchPagination" subsection
- test: lock in the slot shape so future refactors do not regress
@field123 field123 force-pushed the feat/search-page-iter branch from 7671dc5 to 01d59b4 Compare May 5, 2026 12:32
@field123 field123 merged commit d104747 into master May 5, 2026
9 checks passed
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.

PRD: Enrich EPSearchPagination default slot with working Prev / Page / Next chrome

1 participant