Allow hovering over tooltips in git blame sidebar (#10466)

This introduces a new API on `StatefulInteractiveElement` to create a
tooltip that can be hovered, scrolled inside, and clicked:
`.hoverable_tooltip`.

Right now we only use it in the `git blame` gutter, but the plan is to
use the new hover/click/scroll behavior in #10398 to introduce new
git-blame-tooltips.

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Thorsten Ball 2024-04-12 11:47:32 +02:00 committed by GitHub
parent bc0c2e0cae
commit 6e1ba7e936
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 190 additions and 52 deletions

View file

@ -2969,7 +2969,7 @@ fn render_blame_entry(
cx.open_url(url.as_str())
})
})
.tooltip(move |cx| {
.hoverable_tooltip(move |cx| {
BlameEntryTooltip::new(
sha_color.cursor,
commit_message.clone(),