editor: Move blame popover from hover_tooltip to editor prepaint (#29320)

WIP!

In light of having more control over blame popover from editor.

This fixes: https://github.com/zed-industries/zed/issues/28645,
https://github.com/zed-industries/zed/issues/26304

- [x] Initial rendering
- [x] Handle smart positioning (edge detection, etc)
- [x] Delayed hovering, release, etc
- [x] Test blame message selection
- [x] Fix tagged issues

Release Notes:

- Git inline blame popover now dismisses when the cursor is moved, the
editor is scrolled, or the command palette is opened.
This commit is contained in:
Smit Barmase 2025-04-25 01:52:24 +05:30 committed by GitHub
parent 87f85f1863
commit d3911e34de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 501 additions and 83 deletions

View file

@ -957,6 +957,7 @@ impl Item for Editor {
cx.subscribe(&workspace, |editor, _, event: &workspace::Event, _cx| {
if matches!(event, workspace::Event::ModalOpened) {
editor.mouse_context_menu.take();
editor.inline_blame_popover.take();
}
})
.detach();