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
- Fork the repo and create a branch
git checkout -b feature/compare-apis
- Implement changes
src/components/CompareTray.tsx and src/components/CompareDrawer.tsx
src/components/ApiCard.tsx — pin button
- 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
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
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
src/components/ApiCard.tsx,src/pages/MarketplacePage.tsxSuggested Execution
src/components/CompareTray.tsxandsrc/components/CompareDrawer.tsxsrc/components/ApiCard.tsx— pin buttonExample commit message
Acceptance Criteria
aria-pressedGuidelines