-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
Tagging @nethip @abose @ryanstewart |
I believe it would be nice to show the data types as the output of Edit: We can also use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures |
Thanks @sprintr. I will try that once and post a snapshot of the rendering. Our goal is to have the type data without being too loud. We have to compare different displays in order to conclude. |
@sprintr With some CSS changes and new literals , this is how it looks. I must confess , to me it looks cluttered. |
@swmitra maybe aligning the literal labels to right would help (plus maybe more padding to the right side). I think that the labels the OP look pretty nice too, but then again the literals are more clearer (in a way). Maybe the labels could come from a What about mixed types? For example |
+1 for right align. |
FWIW, I like the second screenshot with right alignment. |
@petetnt I will write a label provider which can be overridden by extensions. |
@swmitra Can you try to put the type on the right of the variable names? |
😅 I too meant right align after the variable names! |
This looks good. I am not sure if short names will look good in right alignment. |
@larz0 @ryanstewart Please provide your inputs. |
Just throwing a couple of ideas:
@swmitra great job 👍 |
Thanks @ficristo . Something like this - |
Styling changes
As usual my english need some improvements... And then I stop here. |
Thanks a lot @sprintr for your prompt feedback. I agree that it doesn't exactly look tidy , but from a developer point of view , I think this adds more flexibility even before I choose the guess. In it's current form, the hinting module allows the parameters hinting only after choosing the guess from the list. But in the approach above we get to see the param type information upfront. I know it's debatable , but that's why communities are best. In a day the entire ux got changed and became considerably more informative. |
@swmitra Maybe we could take a leaf out of pref code hints where lengthy descriptions are shown under the hint. The type could come on the right and the function signature could come under the hint. |
@sprintr I was actually planning to use that for available docs for the particular definition when highlighted. |
Tagging @larz0 for ui review. |
@sprintr @petetnt @ryanstewart @abose @ficristo Feedback Please 💬 |
display: none; | ||
padding-left: 28px !important; | ||
padding-right: 10px !important; | ||
color: grey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look very visible in the dark mode. We use #ccc
in pref hints so it will be good to use it here as well.
Dark Mode: #cccccc
Light Mode: #6e6e64
@sprintr It is intentional to make the type details appear in next line if it is beyond a certain character length. |
It will look better if the signature is also right aligned in the second line. |
Maybe we could remove the 5px padding on the signature then. |
// 1
function Get() {
var h1 = document.
} // 2
function Get() {
var h1 = document.crea
} Brackets now throws an error and doesn't give any code hints for script 1 (from dot up to 3 chars) whereas script 2 works just fine. |
@sprintr Fixed now. jQuery was complaining as it was thinking that js doc spans innerHtml was malformed ( as it contains html tags sometimes ). Fixed that by adding the doc as text instead of html. |
@swmitra Great. works fine now. |
@sprintr Replaced '<>' with a boxed '?'. Looked better to me. Please have a look and let me know. |
@swmitra Looks better to me too. |
[WIP]Type Inference in hint list.
@swmitra Great work! This is awesome. Small recommendation. I think the hints list looks cleaner without the box icons on the left. Also we could do something better with replacing current icon "?". Let us go without the box icons for now. We could then incorporate the changes(or icons) once we hear from @larz0 . |
Show type data in the hint list. This is work in progress as we need more ideas about the type symbols which are just text in this PR.
A snapshot of the rendered types from this implementation.