Skip to content

fix(react): keep sidebar tooltips visible - #1014

Open
aswanth-07 wants to merge 1 commit into
nodejs:mainfrom
aswanth-07:fix/938-sidebar-tooltips
Open

fix(react): keep sidebar tooltips visible#1014
aswanth-07 wants to merge 1 commit into
nodejs:mainfrom
aswanth-07:fix/938-sidebar-tooltips

Conversation

@aswanth-07

@aswanth-07 aswanth-07 commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • render each stability tooltip in a portal outside the MetaBar scroll container
  • keep the tooltip anchored to its badge and clamp it to the viewport
  • reposition open tooltips on nested scrolling and viewport resize
  • add browser coverage for portal placement, viewport bounds, hover, and keyboard focus

Why

The table of contents <dl> must remain vertically scrollable, but that makes it a clipping ancestor for CSS pseudo-element tooltips. Moving the anchor to the full heading row avoided the clipping while producing the odd alignment noted in review.

The stability badge is now a small hydrated island. Its tooltip renders under document.body, so it is no longer a descendant of the scrolling <dl> and remains aligned with the badge.

Fixes #938.

Validation

  • npm run format:check: passed
  • npm run lint: passed with three pre-existing warnings and no errors
  • focused HTML generator tests: 5/5 passed
  • full Playwright suite: 5/5 passed
  • full Windows unit run: 537/541 passed; four unrelated assertions expect POSIX path separators and fail on Windows

@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Aug 9, 2026 12:39pm

Request Review

@aswanth-07
aswanth-07 marked this pull request as ready for review August 9, 2026 09:12
@aswanth-07
aswanth-07 requested a review from a team as a code owner August 9, 2026 09:12
@avivkeller

Copy link
Copy Markdown
Member
Screenshot 2026-08-09 at 7 50 02 AM This feels oddly aligned, wouldn't it make more sense to fix the issue that clips them rather than work around it?

Signed-off-by: aswanth-07 <a.aswanth0707@gmail.com>
@avivkeller

Copy link
Copy Markdown
Member

@aswanth-07 I'm sure there's a CSS only solution to this either here or upstream. One that doesn't clip, and doesn't misalign

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.

The tooltips for methods or attributes in the sidebar are not fully displayed.

2 participants