Skip to content

Conversation

@majiayu000
Copy link
Contributor

What this Pull Request (PR) does

Fixes tooltip visibility issue in WebUI Model Controls by using position: fixed positioning instead of position: absolute.

Problem: Tooltips were being clipped by parent containers with overflow: hidden (caused by Svelte slide transitions).

Solution: Calculate tooltip position using getBoundingClientRect() and apply fixed positioning to escape overflow constraints.

Related issues

Closes #1790

Screenshots

The tooltip now correctly renders above the parent container boundaries.

Use position: fixed and getBoundingClientRect() to calculate tooltip
position dynamically. This prevents tooltips from being clipped by
parent containers with overflow: hidden (such as slide transitions).

Closes danielmiessler#1790

Signed-off-by: majiayu000 <[email protected]>
@ksylvan
Copy link
Collaborator

ksylvan commented Dec 25, 2025

Merry Christmas! Will look at this soon.

- Extract positioning calculations into dedicated `positioning.ts` module
- Add reactive tooltip position updates on scroll/resize
- Improve accessibility with `aria-describedby` and unique IDs
- Add SSR safety with `isBrowser` flag check
- Replace inline position calculation with reactive statement
- Add window event listeners for position tracking
- Update unit tests to use extracted functions
- Add test coverage for style formatting function
@ksylvan ksylvan force-pushed the fix/webui-tooltips-rendering-1790 branch from 655eb67 to 4d0e1e7 Compare December 25, 2025 05:02
Copy link
Collaborator

@ksylvan ksylvan left a comment

Choose a reason for hiding this comment

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

Approved with some refactoring. Thanks, @majiayu000 !!!

@ksylvan ksylvan merged commit 14ab798 into danielmiessler:main Dec 25, 2025
1 check passed
@majiayu000
Copy link
Contributor Author

Thanks for the review and refactoring improvements! Merry Christmas! 🎄

@majiayu000 majiayu000 deleted the fix/webui-tooltips-rendering-1790 branch December 25, 2025 07:01
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.

[Bug]: WebUI Tooltips Rendering, but not being Shown

2 participants