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
@ksylvan
Copy link
Collaborator

ksylvan commented Dec 26, 2025

@majiayu000 How would you like to tackle this request? #680

@majiayu000
Copy link
Contributor Author

@majiayu000 How would you like to tackle this request? #680你想如何应对这个请求? #680

Wait minutes.

@majiayu000
Copy link
Contributor Author

@ksylvan I've created a PR to address #680: #1907

The implementation adds a Session ID input field to the GUI, allowing users to:

  • Enter a new session name manually
  • Select from existing sessions via dropdown (when available)

However, I have some UI design concerns:

  1. The Session ID input is currently placed in the left configuration panel alongside Pattern, Model, Language, and Strategy selectors. I'm not sure if this is the best placement.

  2. The current layout stacks the input field and the existing sessions dropdown vertically. Would a different arrangement be more appropriate?

I'd appreciate feedback on whether this UI approach aligns with the project's design philosophy, or if there's a preferred way to integrate this feature.

@ksylvan
Copy link
Collaborator

ksylvan commented Dec 27, 2025

@majiayu000 I reviewed it and requested some changes. Thanks for your contribution!

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