Skip to content

Delay hiding git blame tooltip#22644

Merged
mgsloan merged 1 commit intomainfrom
delay-hiding-hoverable-tooltips
Jan 18, 2025
Merged

Delay hiding git blame tooltip#22644
mgsloan merged 1 commit intomainfrom
delay-hiding-hoverable-tooltips

Conversation

@mgsloan
Copy link
Copy Markdown
Contributor

@mgsloan mgsloan commented Jan 4, 2025

It's easy to overshoot the bottom of the tooltip when cursoring to a button, such as opening the commit from a blame tooltip. Before this change the tooltip would immediately disappear, and now it sticks around for a bit.

Also:

  • Shares the implementation with elements/text.rs. This will particularly be handy when it makes use of hoverable tooltips.

  • Improves the fix to Tooltip stuck on screen #21657.

    • Now the element will no longer think it has an active tooltip that it registers with the window.

    • It will instead display the next available tooltip, whereas I believe before the next available tooltip would be suppressed.

  • Fixes bug where cx.refresh() wasn't called when text tooltip is hidden due to a mouse down event.

  • Ports over fix in Fix tooltips sometimes continuously displaying when the button is selected #14832 to elements/text.rs

Release Notes:

  • The tooltip for inline git blame now waits a bit before disappearing when the mouse leaves it.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 4, 2025
@mgsloan mgsloan force-pushed the delay-hiding-hoverable-tooltips branch from 3dcde67 to c553512 Compare January 4, 2025 07:46
@mgsloan mgsloan force-pushed the delay-hiding-hoverable-tooltips branch 11 times, most recently from 063e920 to 9cb70b2 Compare January 4, 2025 19:03
It's easy to overshoot the bottom of the tooltip when cursoring to a
button, such as opening the commit from a blame tooltip. Before this
change the tooltip would immediately disappear, and now it sticks
around for a bit.

Also:

* Shares the implementation with `elements/text.rs`. This will
particularly be handy when it makes use of hoverable tooltips. Also
means that it will use the same handling for mouse down / mouse
wheel (it did not handle mouse wheel before).

* Improves the fix to #21657.

    - Now the element will no longer think it has an active tooltip
    that it registers with the window.

    - It will instead display the next available tooltip, whereas
    I believe before the next available tooltip would be suppressed.

* Fixes bug where `cx.refresh()` wasn't called when text tooltip is
hidden due to a mouse down event.

* Ports over fix in #14832 to `elements/text.rs`
@mgsloan mgsloan force-pushed the delay-hiding-hoverable-tooltips branch from 9cb70b2 to 968db6e Compare January 18, 2025 20:42
@mgsloan
Copy link
Copy Markdown
Contributor Author

mgsloan commented Jan 18, 2025

Merging now as I'm now working on remove-window-context and so will be dealing with the merge conflicts there.

@mgsloan mgsloan enabled auto-merge (squash) January 18, 2025 20:43
@mgsloan mgsloan merged commit ac214c5 into main Jan 18, 2025
@mgsloan mgsloan deleted the delay-hiding-hoverable-tooltips branch January 18, 2025 20:52
mgsloan added a commit that referenced this pull request Feb 5, 2025
Regression in #22644

Co-authored-by: Ben <ben@zed.dev>
mgsloan added a commit that referenced this pull request Feb 5, 2025
Regression in #22644

Co-authored-by: Ben <ben@zed.dev>
mgsloan added a commit that referenced this pull request Feb 5, 2025
Regression in #22644

Co-authored-by: Ben <ben@zed.dev>
mgsloan added a commit that referenced this pull request Feb 5, 2025
Regression in #22644

Unfortunately not a full fix, In the case where a tooltip gets displayed
and then gets occluded after display, it will stick around until the
mouse exits the hover bounds.

Release Notes:

- N/A

Co-authored-by: Ben <ben@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant