-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Editor: Popup showing function arguments only displayed for 3 seconds #2644
Comments
If you put the mouse over the popup before it disappears, it will remain visible until you do a right-click over the popup or move the mouse somewhere else. |
So the user is happily typing away, and has to move their hands to the mouse and put it over the popup in the next three seconds, or the helpful info goes away? That seems less than ideal. I would argue that it should be treated the same as the code completion popup, which gets left in place indefinitely, unless the user dismisses it by hitting ESC. Finally, if the info is not going to be left there indefinitely, it should at least be for longer than three seconds. Three seconds isn't generally enough time for me to even read the function definition, let along process it and make use of the information. It's hardly even enough time for me to move the mouse over the popup to keep it from disappearing, unless I'm planning ahead that I'm going to do it. |
Same problem I am facing.. |
I don't think this is a problem per se (at least in my mind ;-) I still think we should not maintain the tooltip in view all the time. |
I mean, having the tooltip visible seems to me very distracting. But we could add an option for users who prefer that. @joshburnett, @akhouribhanu, what do you think? |
@ccordoba12 : Definitely, there should be an option to customise. As you wrote earlier, as long as you keep your mouse over menu, it will be visible. But, as soon as you start typing code, It will be gone. As you know, there are many parameters/arguments available with a function, and one cannot memorise it all after looking it once. When you are in middle of writing a function, and you are stuck as you forget the parameter/arguments you are suppose to use. |
@akhouribhanu, ok, I understand the use case better now. Then perhaps it'd be better to add a close button to the tooltip. @goanpeca, @jitseniesen, what do you think about this one? |
Actually @ccordoba12 I do agree with the user suggestion, I have find myself deleting the We could try to leave it there until the cursor changes to a different line (after going to the end of the line and pressing enter... or moving the cursor with the arrows up or down). This would leave the tooltip for the needed time :-), while typing in the same line. Maybe is not perfect, but having a close button completely defeats the purpose of a mouse free interaction (which the user and I myself prefer) Update Or using Esc as the user suggests! |
@goanpeca wrote down exactly what I thought: leave the tooltip until the corresponding closing parenthesis is typed (or the user moves the cursor past the automatically inserted closing parenthesis), or the cursor is moved to another line, or the user presses Esc, or another tooltip is displayed. Not sure what to do if the argument list spans more than one line; does the tooltip move down or is it closed? PS: Visual Studio displays the argument that you are currently at in bold in the tooltip, which I think is pretty neat. |
These are all very good suggestions. I'll create a PR to test how this works :-) @Nodd, I think this would require some changes in your
Interesting idea, but for another PR ;-) |
@ccordoba12 If the problem is just pressing Esc I think it's fine. But I'm afraid that it could be more problematic because the same shortcut would be used for 2 different things in the same context (the editor). And using something else than Esc for vim is not realistic either. Maybe it will depend on how the tooltip thing will be implemented. |
So I tried VS Code, which maintains the tooltip open until the user decides to close it (by typing Up or Down arrows), and it works quite nicely!! So now I fully agree with you guys, and you can expect a PR at the end of this week ;-) |
Description
In the editor, when I type the name of a function and a left parenthesis, Spyder displays a helpful popup showing the function's arguments. Unfortunately, this is only displayed for 3 seconds, and then disappears. It would be helpful if this popup stayed visible for longer, possibly until I type the closing parenthesis or move the text cursor off of the line.
What steps will reproduce the problem?
Version and main components
Optional dependencies
The text was updated successfully, but these errors were encountered: