Skip to content

feat(marketplace): add RefinementPanel with faceted search - #1

Open
CodedTricks wants to merge 1 commit into
mainfrom
feat/marketplace-faceted-search
Open

feat(marketplace): add RefinementPanel with faceted search#1
CodedTricks wants to merge 1 commit into
mainfrom
feat/marketplace-faceted-search

Conversation

@CodedTricks

@CodedTricks CodedTricks commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

Implements advanced faceted search refinements for the Marketplace page.

What was implemented

New component: RefinementPanel

  • Dual-handle range sliders for:
    • Price (0–1000 USDC/tCO₂) with $-formatted labels
    • Carbon Reduction (0–1M tCO₂) with k/M suffixed labels
  • Vintage year range picker — two <select> dropdowns (from/to) covering 2015–current year
  • Multi-select verifier chips — Verra, Gold Standard, ACR, CAR as toggleable pill buttons with role=checkbox + aria-checked semantics
  • URL persistence — all refinement state written to query params (debounced 250 ms) so links are shareable and back/forward works
  • Results update dynamically — client-side filtering on top of API data so sliders respond instantly
  • Clear all filters button resets all sliders, chips, and URL params

Updated: MarketplaceFilter

  • Extended FilterState interface and filtersFromParams to carry a verifiers field

Updated: marketplace/page.tsx

  • Integrated RefinementPanel as a sticky left sidebar in a two-column CSS grid layout
  • Sidebar collapses to a bottom-sheet mobile drawer on ≤ 767 px
  • Combined filter + refinement state drives both API query params and client-side filtering

What was tested

  • TypeScript: no errors in modified/new files (pre-existing errors in BulkPurchaseWizard.tsx not introduced by this PR)
  • Responsive layout confirmed at 390 px (mobile) and 1200 px (desktop) via CSS breakpoints

Closes Carbon-Ledger-stellar#1031

…dger-stellar#1031)

Add RefinementPanel component providing advanced faceted filtering:
- Dual-handle range sliders for Price (0–1000 USDC/tCO₂) and Carbon
  Reduction (0–1M tCO₂) with accessible ARIA labels
- Vintage year range picker with min/max selects (2015–current year)
- Multi-select verifier chips (Verra, Gold Standard, ACR, CAR) with
  toggle-button semantics (role=checkbox, aria-checked)
- All filter state persists in URL query params (debounced, 250 ms)
- Results update dynamically via client-side filtering on top of API data
- Clear all filters button resets sliders + chips + URL params
- Desktop: vertical sidebar panel; mobile: bottom-sheet drawer
- Integrate RefinementPanel into marketplace page with responsive
  two-column layout (sidebar collapses to drawer on ≤ 767 px)
- Extend FilterState and filtersFromParams to carry verifiers field

Closes Carbon-Ledger-stellar#1031
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.

Build Advanced Filtering with Refinement

1 participant