Skip to content

Add a "Compare APIs" tray that lets users pin up to 3 APIs from MarketplacePage #165

Description

@greatest0fallt1me

Description

This is a UI/UX issue. Choosing between APIs requires side-by-side comparison. Add a "Compare" affordance to each ApiCard that adds the API to a bottom-anchored tray (max 3); tapping "Compare" in the tray opens a comparison drawer showing price, latency, uptime, categories, and rating side-by-side.

Requirements and Context

  • Reference: src/components/ApiCard.tsx, src/pages/MarketplacePage.tsx
  • Tray persists across navigation within the session
  • Drawer is keyboard navigable and supports ESC close
  • Empty tray hides itself
  • Must be secure, tested, and documented
  • Should be efficient and easy to review

Suggested Execution

  1. Fork the repo and create a branch
    git checkout -b feature/compare-apis
  2. Implement changes
    • src/components/CompareTray.tsx and src/components/CompareDrawer.tsx
    • src/components/ApiCard.tsx — pin button
  3. Test and commit
    • Pin 3 APIs, open drawer, verify columns
    • Tab through drawer; ESC closes

Example commit message

feat: compare APIs tray and drawer

Acceptance Criteria

  • Pin button shows pinned state with aria-pressed
  • Tray hidden when no pins; visible when ≥1
  • Drawer renders consistent rows across all pinned APIs
  • ESC closes drawer and returns focus to trigger

Guidelines

  • Tray must not obscure the last row of cards on mobile (offset bottom padding)
  • Tokens only
  • Clear documentation and inline comments
  • Timeframe: 96 hours

Metadata

Metadata

Labels

GRANTFOX OSSGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueStellar WaveIssues in the Stellar wave programdesignVisual/design-system workenhancementNew feature or improvementui/uxUI/UX design, usability, and visual polish

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions