fix(react): avoid clipped stability tooltips - #1046
Conversation
Use the browser-native title tooltip for stability badges so the tooltip is not clipped by the scrolling table of contents. Fixes nodejs#938 Signed-off-by: dabidabi <91039645+dabidabi@users.noreply.github.com> Assisted-by: OpenAI Codex
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
AugustinMauroy
left a comment
There was a problem hiding this comment.
okay it's worked, but it's a regression that was better before I mean the fix should be applied on the tool-tips component
ovflowd
left a comment
There was a problem hiding this comment.
This switches to native browser tooltips whereas the ask is to ensure the current custom tooltips (generated via data-tooltip) don't have the issue. i.e.: this should be as simple as fixing the source CSS behind the tooltips. That might be on @node-core/ui-components or on doc-kit itself.
|
Using the native title seems to avoid the problem, but it loses the relevant styles and doesn't look very aesthetically pleasing. However, it seems that we still need to use JavaScript to maintain the appearance. |
Summary
titletooltip for stability badges in the meta barWhy
The shared CSS tooltip is rendered inside the meta bar's scrolling table of
contents. When a stability badge wraps near either horizontal edge, that
container clips part of the tooltip. A native tooltip is rendered outside the
scroll container, so its text remains fully visible without adding client-side
JavaScript to the otherwise static table of contents.
Fixes #938.
Validation
prettier --checkon the changed filesAI assistance was used to investigate, implement, test, and review this change.
The commit includes an
Assisted-by: OpenAI Codexattribution.