Repository navigation
Error hover semantic information should be rendered separate of error message #62370
Description
Activity
Another problem: changing
sourceback tocssis not nice in problems view. Previously I get:Now I get:
Good things I miss from previous one:
sourceandcodedisplayed together in the left, the most prominent & easily-scannable place- I'm able to see the
codeeven in half screen, whereas if the message is long, I lose thecodeat the end
source and code displayed together in the left, the most prominent & easily-scannable place
While that is true, isn't the real question what value the
codeattribute has at all? Usually this is a number and for css its seems to be a close variant of the message. Are people reading/understanding diagnostics like: "Oh errorTS33165, I better not assign a boolean to a string" or do they understand the message "Type boolean cannot be assigned to type string" better/faster? For me the code is something I would use when googling a problem I don't understand by reading the message and therefore the least important piece of information.Reacted by Dirk Bäumer, Sandeep Somavarapu and Ghost4Man- addedfeature-requestRequest for new features or functionalityRequest for new features or functionality
on Nov 5, 2018 Johannes Rieken (@jrieken)
I see your point, but there are also cases when, say, a user is enforcing some new linter rules throughout a codebase. He would want to see which errors/warnings are caused by exactly these rules. He might also add pragmas to disable certain rules for some lines, when the rulename is useful.From an extension author point of view, he doesn't care about passing in semantically correct info. He only knows the messages displayed on hover and problems are
${code} ${message} ${source} ${range}, and he tries to make best use of that format. We see that with HTML all the time, don't we...which errors/warnings are caused by exactly these rules.
That sounds a little artificial but if that is the case, then I would probably search for that specific error code using the filter box on the upper right. (actually I wouldn't use the UI at all but I'd use the command line)
Inline widget renders the source and code similar to Problems view.
Hover renders the source and code as suggested in descriptionExample 1:
Example 2:
Johannes Rieken (@jrieken) João Moreno (@joaomoreno) @misolori Feedback is welcome.
I think having source and code on separate lines gives them way more attention than they should have. And to my eyes it also looks ugly. What again is wrong about the inline rendering and why is it only wrong in the hover?
Since it is a suggestion from João Moreno (@joaomoreno) I would request him to reply for above comment.
Pushed changes in inline view - made source and code less prominent just like in problems view.
- added a commit that references this issue
on Nov 13, 2018 28 remaining items
miguelsolorio commented
on Nov 29, 2018 ContributorMore actionsIn the UX call yesterday we discussed both of those options and even though we all liked both versions, we all agreed that we liked the cleaner look of last one (the one that's now on insiders).
Pine (@octref) To be fair, the option to not show any additional information is actually the one with the most likes and it is what Visual Studio does too.
I think it should be shown because if I have multiple extensions contributing diagnostics, I want to know where a message is coming from. The error code is also useful, e.g. if you want to know which rule in a tslint.json is associated with an error message. I prefer option 1.
Note that the hovers in vscode are clickable. If said information is not shown, what about clicking the hover and having it shift focus to the full diagnostic in the problems view? Personally, I think it would make sense as most people eventually get an idea of where a diagnostic is coming from an no longer need that data.
- addedverification-foundIssue verification failedIssue verification failedverification-neededVerification of issue is requestedVerification of issue is requestedand removedverification-foundIssue verification failedIssue verification failed
on Dec 3, 2018 Fixes for his have caused regression for https://github.com/rust-lang/rls-vscode. We used backtick-enclosed strings for types and since everything is escaped now to render a custom hover window, the error messages are illegible now, for example:
current output
note: expected type
std::option::Option<std::string::String>found typestd::option::Option<&std::string::String>previous output
note: expected type
std::option::Option<std::string::String>found typestd::option::Option<&std::string::String>See rust-lang/vscode-rust#479 for more details.
Reacted by pedantic79 and danieleadesSuffering the same issue as Igor Matuszewski (@Xanewok) in nwolverson/vscode-ide-purescript#115 - diagnostics are rendering fine in problems and tooltip but replaced by displayed HTML entities in the hover
- removedverifiedVerification succeededVerification succeeded
on Jan 7, 2019 - locked and limited conversation to collaborators
on Feb 22, 2019





From Pine (@octref) in #62159
If we have access to semantic information we should render it much better. The message should come first. Then the source on a separate line, with a
Source:label preceding it and in non-monospace font (since source should be a user-readable string likeCSS Lint). Then, the code with the same style, but with monospace, since code is often a library/OS error code. Something like:cc Sandeep Somavarapu (@sandy081) Ramya Rao (@ramya-rao-a) @misolori