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

Edge detection ignored in flutter/dart popup tooltips #22561

Closed
gggustafson opened this issue Oct 2, 2018 · 12 comments
Closed

Edge detection ignored in flutter/dart popup tooltips #22561

gggustafson opened this issue Oct 2, 2018 · 12 comments

Comments

@gggustafson
Copy link

gggustafson commented Oct 2, 2018

I am using VS Code 1.25.1 on Windows 7 SP1.

The tooltips that appears when the cursor hovers over a documented object do not display their content in the most readable manner. For example, the current CustomPaint tooltip appears as:

CustomPaint({Key key, CustomPainter painter, Cust
omPainter foregroundPainter, Size size: Size.zer
o, bool isComplex: false, bool willChange: false,
 Widget child}) → CustomPaint

package:flutter

Creates a widget that delegates its painting.

I argue that for greater readability, the CustomPaint tooltip should appear as:

CustomPaint({Key           key, 
             CustomPainter painter, 
             CustomPainter foregroundPainter, 
             Size          size: Size.zero, 
             bool          isComplex: false, 
             bool          willChange: false, 
             Widget        child}) → CustomPaint

package:flutter

Creates a widget that delegates its painting.

An argument for edges is found in http://coding-guidelines.com/cbook/sent766.pdf, Section 1.3 Edge detection, beginning on page 207.

Realizing that this modification is a significant effort, I offer my services.

@zoechi
Copy link
Contributor

zoechi commented Oct 3, 2018

@DanTup ?

@DanTup
Copy link
Contributor

DanTup commented Oct 3, 2018

@bwilkerson This text is from elementDescription so if we think this can be improved it may be better done in the server (though we would need to ensure editors can handle newlines or add as another property, either formatted, or a collection of properties). I do agree the original is a bit hard to read:

screen shot 2018-10-03 at 11 00 02 am

I'm not sure lining things up is perfect, though I do think it's easier to read when there's more than a few arguments:

screen shot 2018-10-03 at 11 03 09 am

screen shot 2018-10-03 at 11 02 38 am

Another possible may be to use the formatting as it appears in the source (in this case, the ButtonBar source does have them split across lines).

WDYT?

@gggustafson
Copy link
Author

I would suggest that "more than a few" in "I'm not sure lining things up is perfect, though I do think it's easier to read when there's more than a few arguments:" read "more more than one". This makes reading the tooltip much easier. Please read the reference in the original post.

@DanTup
Copy link
Contributor

DanTup commented Oct 3, 2018

Sure, I didn't mean to suggest it shouldn't apply for smaller numbers of args, just that (in my head) the gain seemed smaller. For example:

clamp(int min, int max);

I don't think that's bad too bad, and is one line instead of four. However, I'm not sure changing formatting at some magic number is a good idea; I was just thinking out loud.

@DanTup
Copy link
Contributor

DanTup commented Oct 3, 2018

I am using VS Code 1.25.1 on Windows 7 SP1.

BTW, the latest version of the Dart plugin requires Code 1.27 so you're probably not seeing the updates. Doesn't affect this, but it does mean you won't have all the latest bug fixes in the plugins.

@gggustafson
Copy link
Author

Thanks for pointing that out. I have "update_channel":"default" so it should have upgraded automatically. How do I get the upgrade? When I downloaded the zip for windows and executed it, I receive a warning that the current vs code was installed for everyone and that I should remove it. But I'm not sure I want to do that. Any thoughts?

@DanTup
Copy link
Contributor

DanTup commented Oct 8, 2018

@gggustafson There are two ways of installing VS Code - at the machine level (which will require elevation to install updates) or at the user level (each user gets their own copy in their %AppData%, which can be their own versions and upgraded by the user themselves).

I can't advise on which is best for you (though I switched to the user installs and uninstalled the main one - the less things that require elevation the better IMO, even if it's only updates), but if you're using the machine-level install you may need to approve elevation to install updates (and if you have both, that may confuse things a little, especially if you update extensions in one, then open the other and it's an older version).

You can force an update check within Code, but I'm not on Windows atm so can't confirm that the menu entry is (probably File/Help menu?). I'm not sure why it didn't auto-update though - maybe there's a VS Code bug worth filing there.

@gggustafson
Copy link
Author

FYI, I went to Microsoft/vscode on GitHub and entered an issue. In response, a thingy name vscodebot intervened and advised me that my issue had already been raised. It pointed me to five existing answers. Unfortunately, all of them were vscodebot responses to other users stating that the issue was already raised. Whoever built vscodebot needs to reconsider its implementation.

Latest VS Code is now 1.28 and I cannot get it down.

@DanTup
Copy link
Contributor

DanTup commented Oct 9, 2018

@gggustafson That note from vscodebot is just trying to be helpful; it hasn't closed your issue so it'll still be looked at by someone. It's useful in that sometimes it finds a real dupe and you can close your issue; though in my experience it tends to miss a lot. I tend to put 👍/👎's on the vscodebot comment in the hope that maybe it gets retrained based on that; but who knows :D

@zoechi zoechi added the will need additional triage This issue or PR needs attention during weekly triage label Dec 2, 2018
@zoechi zoechi added tool Affects the "flutter" command-line tool. See also t: labels. and removed will need additional triage This issue or PR needs attention during weekly triage labels Dec 18, 2018
@jonahwilliams jonahwilliams removed the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 10, 2020
@jonahwilliams
Copy link
Member

Removing tool designation since this has nothing to do with package/flutter_tools

@iapicca
Copy link
Contributor

iapicca commented Jan 10, 2020

Hi @gggustafson
following the indication of VS Code Flutter Extension
the correct way to address the problem
is to open an issue on the dedicated github

Closing, as this isn't an issue with Flutter itself,
if you disagree please write in the comments and I will reopen it.
Thank you

@iapicca iapicca closed this as completed Jan 10, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants