Skip to content

#589 feat(frontend): add tooltip explanations for financial terms (AP…#598

Open
Feyisara2108 wants to merge 5 commits intoLabsCrypt:mainfrom
Feyisara2108:feat/589-financial-tooltips
Open

#589 feat(frontend): add tooltip explanations for financial terms (AP…#598
Feyisara2108 wants to merge 5 commits intoLabsCrypt:mainfrom
Feyisara2108:feat/589-financial-tooltips

Conversation

@Feyisara2108
Copy link
Copy Markdown

#589 feat(frontend): add tooltip explanations for financial terms (APY, utilization rate, credit score)

Summary

Adds a reusable, accessible Tooltip component and integrates plain-English explanations for key financial terms to improve onboarding for non-finance-savvy users.

Changes

  • Created src/components/ui/Tooltip.tsx: reusable, accessible tooltip with hover/focus support
  • Added tooltips to: APY, Utilization Rate, Credit Score, Collateral Ratio, LTV, Grace Period
  • Included ARIA attributes (role="tooltip", aria-describedby) for screen reader support
  • Matched existing design system for styling and icon usage

Accessibility

  • Tooltips trigger on both hover and keyboard focus
  • Escape key dismisses open tooltip
  • Proper aria-describedby linking for screen readers

Testing

  • Verified tooltips display correctly on desktop and mobile
  • Confirmed no layout shifts or z-index conflicts with existing UI
  • All existing tests continue to pass

Screenshots (Optional)

[Attach if helpful]

Issue

Closes #589

@ogazboiz
Copy link
Copy Markdown
Contributor

Two things to fix:

1. Frontend — layout.tsx conflict

The PR adds <TooltipProvider> but accidentally duplicates <QueryProvider> in the process. Also, PR #595 was merged recently and added <WalletProvider> to the layout. Your branch doesn't have that yet, which is why the linter is complaining about a missing closing tag.

Please rebase on main first, then add <TooltipProvider> cleanly inside the existing provider tree — don't add a second <QueryProvider>.

2. Backend — eventIndexer.test.ts

This test was added in the recent #595 merge and it's failing on your branch. It's not caused by your changes — you just need to rebase on main to pick up the updated eventIndexer.ts that the test expects.

Once you rebase, both failures should clear up. The actual tooltip work looks solid.

@Feyisara2108 Feyisara2108 force-pushed the feat/589-financial-tooltips branch from 687d7ec to 5c85b44 Compare March 30, 2026 02:43
Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frontend Prettier check is failing. Run this from the frontend/ directory and commit:

cd frontend
npx prettier --write .
git add -A
git commit -m 'style: apply prettier formatting'
git push

Also rebase on main afterward to pick up a recent test fix in eventIndexer.test.ts.

@ogazboiz
Copy link
Copy Markdown
Contributor

The codebase issues on main have been resolved and all CI checks are passing now. Please rebase your branch to pull in the latest changes before continuing. Thanks for your patience.

Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root-level package-lock.json was committed by accident (dependencies should go in frontend/package.json). Unused HelpCircle import. The cn() utility may already exist in the project, check before duplicating it. Has merge conflicts. Fix and rebase.

@ogazboiz
Copy link
Copy Markdown
Contributor

Hey, just checking in. Have you had a chance to look at the review feedback? Let me know if you need any help or have questions about the requested changes.

@ogazboiz
Copy link
Copy Markdown
Contributor

heads up, a few important changes just landed on main that affect your PR:

  1. axios pinned to 1.13.5 - there's an active supply chain attack on axios 1.14.1 (pulls in confirmed malware). we added overrides in all package.json files to block it.

  2. CI now runs a supply chain audit before backend/frontend jobs. if your lockfile has a compromised package, CI will fail with a clear error.

  3. backend test fixes - loanEndpoints tests now use valid Stellar addresses and base64 strings. if your PR was failing backend CI but you didn't touch backend code, this should fix it after rebase.

please rebase on latest main:

git fetch upstream
git rebase upstream/main
git push --force-with-lease

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.

feat(frontend): add tooltip explanations for financial terms (APY, utilization rate, credit score)

2 participants