Skip to content

fix(html): keep MetaBar stability tooltips inside the sidebar - #1269

Open
fh4d wants to merge 1 commit into
nodejs:mainfrom
fh4d:fix/metabar-tooltip-clipping
Open

fh4d wants to merge 1 commit into
nodejs:mainfrom
fh4d:fix/metabar-tooltip-clipping

Conversation

@fh4d

@fh4d fh4d commented Dec 1, 2026

Copy link
Copy Markdown

Description

Stability badge tooltips in the MetaBar's table of contents were cut off (#938).

The MetaBar's <dl> scrolls (overflow-y: auto at wide viewports), which also clips anything that overflows it horizontally. The tooltip was centred on its badge and could be wider than the space beside it, so part of it was hidden.

This change, in MetaBar/index.module.css:

  • anchors the tooltip to the table-of-contents row (li:has(> a > .badge)) instead of the badge
  • caps its width at the row's width, so it always fits inside the MetaBar
  • hides the tooltip arrow, since it would otherwise point at the middle of the row rather than the badge

A patch changeset for @doc-kit/generator-react is included.

I used Claude to help find the cause and then wrote this change, I've reviewed and tested it myself. Works completely fine.

Validation

Generated fs.md with the html generator and checked it in the browser at a wide viewport. Hovering (and focusing with Tab) the E/D badges, e.g. next to fsPromises.mkstemp and fsPromises.lchmod, now shows the full tooltip inside the MetaBar.

1796101396438_image

Related Issues

Fixes #938

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
    Ran locally on Windows: 810 pass, 37 fail, and the same 37 fail on main (Windows path separators in typedoc/shiki tests, and t.assert.callCount missing on my Node version). None touch the changed file; the web generate tests pass. CI will cover them.
  • I have check code formatting with node --run format:check & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@fh4d
fh4d requested a review from a team as a code owner December 1, 2026 05:29
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Dec 1, 2026 5:29am UTC

Request Review

@ovflowd ovflowd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SGTM! Good first contribution ;)

@btea btea 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.

image

Accessing the preview address reveals, as shown in the image, that the tooltip is misplaced.

This branch was successfully deployed

1 active deployment
Preview – api-docs-tooling — 977f25aa Deployed Dec 1, 2026 by vercel[bot]
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.

3 participants