Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Fsharp status bar tooltips #3084

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Fsharp status bar tooltips #3084

wants to merge 6 commits into from

Conversation

nosami
Copy link
Member

@nosami nosami commented Sep 25, 2017

Useful if you don't use the mouse.

statusbartooltips

@iainx
Copy link
Contributor

iainx commented Sep 28, 2017

This might be better in the lower left of the bottom bar?

Or might be worth revisiting after #3100 gets merged

@iainx
Copy link
Contributor

iainx commented Sep 28, 2017

But also, the new UI doesn't have accessibility hints.

@nosami
Copy link
Member Author

nosami commented Sep 28, 2017

This might be better in the lower left of the bottom bar?

Yeah, I think so too. No idea how to do that though :)

@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from ec93c4f to 83cafc1 Compare October 3, 2017 09:22
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch 2 times, most recently from a138a4b to e961060 Compare October 15, 2017 19:59
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from e961060 to 16e35fb Compare October 26, 2017 09:56
@nosami
Copy link
Member Author

nosami commented Oct 27, 2017

footerstatusbar

Modified to use the footer status bar area.

@nosami nosami requested a review from iainx October 27, 2017 14:16
@decriptor
Copy link
Contributor

That looks really cool, but would it be better if it was a bar in the bottom of the text editor (if possible). I'm thinking about the eye travel distance. It isn't horrible on a horizontal monitor, but it could be a fair bit on a vertical monitor?

@nosami
Copy link
Member Author

nosami commented Oct 27, 2017

but would it be better if it was a bar in the bottom of the text editor (if possible)

That space at the bottom is currently doing nothing right now, seems a shame to waste it.

@decriptor
Copy link
Contributor

true, maybe cycle cool random F# tips ;)

@slluis
Copy link
Member

slluis commented Oct 27, 2017

There was a conscious decision of removing the status bar when XS was redesigned a few years ago. I think it would make more sense to show the status in a bar in the text editor, but I'd like to have the opinion from @vancura @hbons @migueldeicaza.

@vancura
Copy link
Contributor

vancura commented Oct 27, 2017

Window status area is indeedly not the right place to show this information. We need something better. Let me think.

@vancura
Copy link
Contributor

vancura commented Oct 31, 2017

If I understand this well, the information currently shown in the toolbar status area is just a quick help, right? If that's right, I'd rather show it on a keypress in a bubble on top of the TextEditor. Something that JetBrains use to inspect declaration of the method.

@nosami
Copy link
Member Author

nosami commented Oct 31, 2017

@vancura - the idea is that it isn't distracting and is automatic. Every other editor/IDE has this. It's also currently an option that is disabled by default - you have to enable it.

@vancura
Copy link
Contributor

vancura commented Oct 31, 2017

This is what Rider has, is this the same thing? Invoked with ⌘P.

screenflow

@vancura
Copy link
Contributor

vancura commented Oct 31, 2017

By the way, I also think it's way too detached if it's in toolbar or footer. It should close to where you're looking at.

@nosami
Copy link
Member Author

nosami commented Oct 31, 2017

By the way, I also think it's way too detached if it's in toolbar or footer. It should close to where you're looking at.

I'd like to have the same feature but in a bar beneath the editor if it's not possible to use the footer area. I've been using this feature for years in other editors and I find working in VS for Mac jarring for this reason. I don't want to use the mouse to see the tooltip. There are probably accessibility considerations in play here also.

This is what Rider has, is this the same thing? Invoked with ⌘P.

No, not quite the same thing, that's parameter help.

Certainly possible to display a tooltip with a keybind, but I wouldn't want it to be the only way to get this information.
Here's the same thing in VS code

vscode

@vancura
Copy link
Contributor

vancura commented Oct 31, 2017

I got it. Well, the problem is we don't have any permanent panel we could display it on, like VSCode's footer. Toolbar status area is a wrong place to use for such a feature, but I don't think we should re-introduce footer just because of this.

@maryanne-exe @hbons Thoughts?

@nosami
Copy link
Member Author

nosami commented Oct 31, 2017

I just found a screenshot from VS (Windows) showing almost the same thing

vswindows

I don't mind where the information is displayed so long as it can be displayed somewhere - I was happy with it in the top area :)

@vancura
Copy link
Contributor

vancura commented Oct 31, 2017

Sorry to rain on your parade. We just need to come up with some better place.

@maryanne-exe
Copy link

Agree that status bar isn't the right place for these hints, let's leave it for IDE related updates.
Cons of displaying in the line (either top or bottom):

  • The line will constantly flash in the user's peripheral view: can be annoying;
  • Distance eyes need to travel is significant as was mentioned here;

I think it's reasonable to have a hotkey to display the hint.
Pros:

  • We can use the same tooltip that popups on mouse hover: consistent with the current solution and less of implementation work;
  • The user may decide to enable or disable the hints.
    Cons:
  • Discoverability of a new hotkey. We can add a hotkey suggestion in a tooltip that shown on the mouse event (e.g. at the bottom of a tooltip) so the user may learn in the UI. Also, use the same shortcut as other IDEs use (e.g. Rider).

@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from cec01bc to 7d6729b Compare November 1, 2017 13:11
@vancura
Copy link
Contributor

vancura commented Nov 1, 2017

@nosami: Do you think a keyboard shortcut to invoke the feature would be too much?

@nosami
Copy link
Member Author

nosami commented Nov 1, 2017

@vancura - It's not difficult at all.

I feel like it that would be only be half as useful though. I would still want a way to always see the current type information without having to press some shortcut key constantly while evaluating some unfamiliar code.

The popup tooltip also obscures the view of the code which makes things a little awkward when trying to determine how a block of code works.

F#'s strong type inferencing means that type information isn't visible in the actual source code, and this type of tooltip becomes far more valuable than it would be for a C# developer.

@vancura
Copy link
Contributor

vancura commented Nov 1, 2017

It would be really a nice feature if we find a good spot to draw it on. Let's summarize the requirements:

  • it needs to be fast
  • no keyboard shortcut to show it
  • it needs to draw near the caret

Am I right?

@vancura
Copy link
Contributor

vancura commented Nov 1, 2017

I am sorry that we need to postpone your branch, but let's first make sure this looks and behaves really nice, it could be a killer feature, and not only for F#.

@nosami
Copy link
Member Author

nosami commented Nov 1, 2017

@vancura - yes, ideally. I'm not opposed to having a shortcut provided that there is an option to have it always visible as well.

Not too sure about it being near the caret though as that moves constantly... and anywhere near the caret would obscure other code. I'd prefer somewhere static, either in the IDE frame, or per editor frame.

@vancura
Copy link
Contributor

vancura commented Nov 1, 2017

Please see the xamarin/design issue above. Also, I am marking this PR as not-to-be-merged yet.

@migueldeicaza
Copy link
Contributor

This should be added as well to our online help pad that we have discussed.

@migueldeicaza
Copy link
Contributor

The shortcut is undiscoverable, so I rather not rely on that. For F# we need this kind of help.

@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from 7d6729b to 497d901 Compare November 4, 2017 13:02
@ghost ghost removed the cla-not-required label Nov 8, 2017
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch 2 times, most recently from f425c48 to 8ce3a9b Compare November 17, 2017 13:34
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from 8ce3a9b to 9ff58b6 Compare January 17, 2018 16:46
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from 9ff58b6 to 057152c Compare February 23, 2018 09:22
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from 057152c to 4d165b2 Compare March 6, 2018 14:59
@nosami nosami requested a review from slluis as a code owner March 6, 2018 14:59
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch 2 times, most recently from 732c796 to c0f859b Compare March 9, 2018 09:49
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from c0f859b to 4d8e32a Compare June 11, 2018 14:05
@nosami nosami force-pushed the fsharp-status-bar-tooltips branch from 4d8e32a to d9b2c4a Compare July 9, 2018 12:45
Base automatically changed from master to main March 9, 2021 14:17
@akoeplinger akoeplinger changed the base branch from main to master March 15, 2021 17:02
Base automatically changed from master to main March 15, 2021 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants