Skip to content

feat: add tooltip primitive usage on PredictionCard icon buttons (Closes #823) - #855

Open
waterWang wants to merge 1 commit into
Predictify-org:mainfrom
waterWang:feat/tooltip-predictioncard-icon-buttons-823
Open

feat: add tooltip primitive usage on PredictionCard icon buttons (Closes #823)#855
waterWang wants to merge 1 commit into
Predictify-org:mainfrom
waterWang:feat/tooltip-predictioncard-icon-buttons-823

Conversation

@waterWang

Copy link
Copy Markdown

Description

Adds tooltip primitives to the PredictionCard component's icon buttons for better UX.

Changes

  • components/PredictionCard.tsx: Wrapped status icon, OutcomeIcon, and odds trigger with the Tooltip component from @/app/components/Tooltip
    • Status icon now shows descriptive tooltip (e.g., "This prediction is currently active")
    • OutcomeIcon shows tooltip explaining the shape-based status indicator
    • Odds trigger shows expand/collapse tooltip text that updates dynamically
  • components/tests/PredictionCard.test.tsx: Added 5 tooltip-specific tests covering:
    • Tooltip appears on hover for status icon
    • Correct tooltip content for each status variant (won, lost, pending, active)
    • Odds expand/collapse tooltip on hover
    • Tooltip content updates after expanding odds
    • Tooltip is hidden by default (no hover state)

Testing

All existing tests pass. New tooltip tests verify the hover behavior using @testing-library/user-event.

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@waterWang is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant