fix(dashboard): keep a projection's tooltip above the cards below it

Open
#793 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
nextjs, playwright, react, typescript
Domain
frontend, testing

Research direction

Read src/components/dashboard/info-tooltip.tsx and the listed dashboard components to trace tooltip stacking, then inspect e2e/projection.spec.ts for the existing keyboard and accessibility checks. Reproduce the overlap in the dashboard and check the other placements named in the issue. Done means the open tooltip is topmost over its last line, the keyboard and axe checks pass, and e2e coverage verifies the overlap.

Written by the indexing model from the issue text.

Description

area: dashboard bug impact: low priority: P3 size: S

Context

On the dashboard, the "How this projection is worked out" tooltip of a spend total in "Spending this billing period" opens below the total's card, and the provider card below it is drawn over it, so the end of the explanation cannot be read ("...so StackDash assumes it ends with the calendar month. It is never added to the spend shown."). Found while capturing the evidence for #743; it is the same on main (cde5aa3b). Synthetic data:

The spend total's projection tooltip open on the dashboard: its last lines are hidden behind the Fake billing account card below it

Why: the total's card is relative isolate (src/components/dashboard/dashboard-view.tsx:109), so the tooltip's z-10 (src/components/dashboard/info-tooltip.tsx:56, absolute top-full) only orders it inside that card. The provider card (src/components/dashboard/provider-card.tsx:218) is relative isolate too and comes later in the page, so it paints on top. ProjectionNote (src/components/dashboard/value-meta.tsx:108) keeps the tooltip inside the card's width, not its height. e2e/projection.spec.ts asserts the tooltip toBeVisible, which an element drawn on top of it does not fail.

Plan

  1. Let an open InfoTooltip draw above the sections after its card: raise the stacking context of the card whose tooltip is open, or render the tooltip where no later section covers it. Keep its keyboard behavior: focus opens it, Escape closes it, and the button keeps aria-describedby.
  2. Check the other InfoTooltip placements (a provider card's spend and allowance notes, a budget in alert settings) for the same overlap and fix them the same way.

Acceptance criteria

  • With the tooltip of the spend total open, its whole text is visible and nothing covers it: in Playwright, the tooltip is the topmost element at a point on its last line (document.elementFromPoint).
  • The keyboard path in e2e/projection.spec.ts (focus, Escape, Enter) and its axe scans still pass.
  • Playwright e2e coverage added in e2e/projection.spec.ts.

Files and areas

  • src/components/dashboard/info-tooltip.tsx, src/components/dashboard/value-meta.tsx, src/components/dashboard/dashboard-view.tsx, src/components/dashboard/provider-card.tsx, e2e/projection.spec.ts

Non-goals: the tooltip's text, and the projections themselves.

Verification

  • e2e/projection.spec.ts through the guarded Playwright runner
  • npm run typecheck, npm run lint

Branch: <issue-number>-projection-tooltip-stacking
Closes with a Closes #<issue-number> footer on the commit or pull request.

Model: anthropic/claude-opus-5-5 | Reasoning effort: max

Dominant language
TypeScript
Stars
13
Forks
2
Avg merge
5h 20m
Merged PRs (30d)
287

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eddiejaoude/StackDash

All issues in eddiejaoude/StackDash

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.