Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve popup positioning and multi popup interactions #5827

Open
2 of 5 tasks
sudormrfbin opened this issue Feb 4, 2023 · 10 comments
Open
2 of 5 tasks

Improve popup positioning and multi popup interactions #5827

sudormrfbin opened this issue Feb 4, 2023 · 10 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@sudormrfbin
Copy link
Member

sudormrfbin commented Feb 4, 2023

Popups as a whole have some usability problems as of now (most of them due to the window being small):

@sudormrfbin sudormrfbin added C-bug Category: This is a bug A-helix-term Area: Helix term improvements E-medium Call for participation: Experience needed to fix: Medium / intermediate labels Feb 4, 2023
@faldor20
Copy link

faldor20 commented Feb 6, 2023

I have experienced a few of these and 1. is by far the most problematic. It just makes completion unusable in some scenarios

@kirawi
Copy link
Member

kirawi commented Feb 10, 2023

There is also #5529

@wes-adams
Copy link
Contributor

can this be broken into multiple issues/fixes?
i'd like to attempt a fix for

  1. Rendering on top of the cursor and obstructing the current editing line, commonly happens with auto completion popup

@kirawi
Copy link
Member

kirawi commented Feb 16, 2023

It looks like a PR for that was merged recently: #5842

@sudormrfbin
Copy link
Member Author

It was mostly fixed by #5842, but there are still some cursor overlapping edge cases caused by position calculation. Soft wrap also seems to trigger the overlapping since the current document line does not necessarily correspond to the current screen line anymore (\cc @pascalkuthe).

@pascalkuthe
Copy link
Member

pascalkuthe commented Feb 16, 2023

It was mostly fixed by #5842, but there are still some cursor overlapping edge cases caused by position calculation. Soft wrap also seems to trigger the overlapping since the current document line does not necessarily correspond to the current screen line anymore (\cc @pascalkuthe).

I reviewed the code again and it seems to already account for softwrap correctly as it uses screen_coords_at_pos to calculate the position (there are some minor nits I noticed that could be simplified but nothing that is really important).
I did some testing and couldn't find an example of the cursor itself being overlapped. There were examples where the previous visual line (that was still part of the document line that contains the cursor) was being overlapped. Is that what you mean @sudormrfbin? I think always leaving the entire document line free is not realistic because a single document line can cover the entire screen with softwrap but we could do something like ensuring that the visual line before the cursor is not overlapped if it belongs to the same document line.

@wes-adams
Copy link
Contributor

wes-adams commented Feb 16, 2023

i pulled master and tried to repro number 1, the overlap issues that i am sure i used to encounter... and i have to agree! looks like this was fixed.

@ghost
Copy link

ghost commented Mar 19, 2023

Posting here bc it seems to be n.3, let me know if I need to open a new issue.

Docs popup shadows the auto-completion. I am not triggering the docs popup manually, albeit I have auto-complete = true in the config.

PS. This only happens when the line is near the bottom of the window, so a current workaround would be to scroll the line towards the centre of the screen.

Demo:

Screen.Recording.2023-03-19.at.13.06.03.mov

@pascalkuthe
Copy link
Member

pascalkuthe commented Apr 14, 2024

see #10257 and particularly #10257 (comment) relevant (latter contains descirpiton of a popupmanager that I think can resolve this issue)

@ondrej-ivanko
Copy link

I can reproduce point 2 of this issue. It happens when I'm editing line close to the top of the viewport.

Screenshot from 2024-07-25 13-30-43

and

Screenshot from 2024-07-25 13-34-20

In this case there are lot of func parameters. The popup of object help is really strange. The cause might be the border rendered around the popup help. I remember this functionality was implemented few months ago.

When I edit the same line at bottom of viewport, the problem disappears

Screenshot from 2024-08-09 18-05-52

Maybe in case two popups overlaps there can be some sort of rendering prioritization. First render object help, than autocompletion popup on top of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

6 participants