Skip to content

perf: share tooltip hover delays across notebook cells - #12242

Merged
kirangadhave merged 3 commits into
mainfrom
kg/cell-tooltips
Dec 3, 2026
Merged

kirangadhave merged 3 commits into
mainfrom
kg/cell-tooltips

Conversation

@kirangadhave

@kirangadhave kirangadhave commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Editable cells and the setup cell now use the notebook’s existing tooltip provider. Each cell previously started its own hover delay. With a shared provider, moving from an open tooltip in one cell to a control in another opens the next tooltip immediately. This addresses the tooltip portion of MO-8795.

Evidence

Action Result
Hover Delete in the first cell The tooltip opens after 400 ms.
Move directly to Delete in the second cell The tooltip opens immediately.

All 22 targeted tests passed. The frozen-lockfile install, frontend typecheck, and production build passed. Chromium checks covered setup-to-regular hover, keyboard focus, Escape, Tab, and tooltip placement in the page and in fullscreen.

One Radix edge case remains. If a host update removes a cell while its tooltip is open, the next hover can open immediately even after a long pause. Closing that tooltip restores the usual delay.

kirangadhave and others added 2 commits December 2, 2026 10:04
Use the app's tooltip provider for regular and setup cells. Moving the
pointer between cells can now open the next tooltip immediately, and
each cell no longer retains its own provider.
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@kirangadhave
kirangadhave requested a balanced review from Copilot December 2, 2026 18:48
@kirangadhave
kirangadhave marked this pull request as ready for review December 2, 2026 18:48
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 9f9e4eb.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the shared notebook tooltip changes.

No open issues 🎉

What changed in this PR

Shares the notebook’s tooltip provider across editable and setup cells, allowing immediate tooltip transitions between cells.

Changes:

  • Removes per-cell tooltip providers.
  • Patches Radix to restore the hover delay when an open tooltip unmounts.
  • Adds coverage for cross-cell hovering and removal of the hovered cell.
File Description
pnpm-workspace.yaml Registers the Radix tooltip patch.
pnpm-lock.yaml Records the patched dependency.
patches/​@radix-ui__react-tooltip@1.4.1.patch Calls provider cleanup when an open tooltip unmounts.
frontend/​src/​components/​editor/​notebook-cell.tsx Uses the shared provider for editable and setup cells.
frontend/​src/​components/​editor/​__tests__/​cell-renders.test.tsx Tests shared delays and delay restoration after cell removal.

Review effort: Balanced

@kirangadhave
kirangadhave marked this pull request as ready for review December 2, 2026 18:52
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./frontend

Status Category Percentage Covered / Total
🔵 Lines 69.02% 28570 / 41391
🔵 Statements 68.97% 29120 / 42221
🔵 Functions 64.16% 6834 / 10650
🔵 Branches 64.43% 16724 / 25953
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
frontend/src/components/editor/notebook-cell.tsx 55.02% 44.93% 37.83% 55.55% 112-117, 128-148, 186-195, 202-203, 282-288, 336, 443, 491-499, 517-524, 545-548, 599-603, 612, 615, 721-762, 830, 834, 968-1203
Generated in workflow #26484 for commit 763b083 by the Vitest Coverage Report Action

@kirangadhave
kirangadhave merged commit a8a24c2 into main Dec 3, 2026
41 checks passed
@kirangadhave
kirangadhave deleted the kg/cell-tooltips branch December 3, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants