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

Rendering of documentation in Intellisense and hover inconsistent #2330

Closed
6 of 7 tasks
egamma opened this issue Jan 26, 2016 · 19 comments
Closed
6 of 7 tasks

Rendering of documentation in Intellisense and hover inconsistent #2330

egamma opened this issue Jan 26, 2016 · 19 comments
Assignees
Labels
debt Code quality issues ux User experience issues

Comments

@egamma
Copy link
Member

egamma commented Jan 26, 2016

Testing #2230

The rendering of the documentation in the hover and in Intellisense is inconsistent, different font, font size, font family, and color.
Suggest to align on the way the documentation is rendered in Intellisense. It looks nicer.

hover

intellisense

FYI @bgashler1

  • Delayed hover
  • Diagnostics hover
  • Glyph hover
    • Debug breakpoint expressions colorisation
  • URL click hover
  • Suggest widget
  • Parameter hints widget
@egamma egamma added the feature-request Request for new features or functionality label Jan 26, 2016
@egamma egamma added this to the Jan 2016 milestone Jan 26, 2016
@bpasero bpasero modified the milestones: Feb 2016, Jan 2016 Jan 27, 2016
@bpasero bpasero added the ux User experience issues label Jan 27, 2016
@bgashler1
Copy link
Contributor

Totally agree. Only code should be in a monospaced font. The way it's done in the second image is how we should do it.

@joaomoreno joaomoreno modified the milestones: Feb 2016, March 2016 Feb 23, 2016
@egamma egamma mentioned this issue Mar 4, 2016
82 tasks
@joaomoreno joaomoreno modified the milestones: March 2016, April 2016 Mar 13, 2016
@egamma egamma added bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality ux User experience issues labels Apr 1, 2016
@egamma egamma changed the title Rendering of documentation in Intellisense and hover should be aligned Rendering of documentation in Intellisense and hover inconsistent Apr 1, 2016
@joaomoreno
Copy link
Member

joaomoreno commented Apr 28, 2016

I can't do it on styles alone.

The data type that hover gets when rendering something is:

export interface IComputeExtraInfoResult {
    range: editorCommon.IRange;
    value?: string;
    htmlContent?: IHTMLContentElement[];
    className?: string;
}

Basically, a mode just needs to return htmlContent. There is no distinction between the textual parts of the information and the code parts of it, when comparing it to the suggestion world:

export interface ISuggestion {
    label: string;
    codeSnippet: string;
    type: SuggestionType;
    typeLabel?: string;
    documentationLabel?: string;
    filterText?: string;
    sortText?: string;
    noAutoAccept?: boolean;
    overwriteBefore?: number;
    overwriteAfter?: number;
}

To fix this we might have to go the other way and render suggestions' documentations in fixed-width fonts, similarly to hover... which I would be very sad about.

cc @alexandrudima @jrieken @egamma

@joaomoreno joaomoreno modified the milestones: May 2016, April 2016, Backlog Apr 28, 2016
@joaomoreno
Copy link
Member

Actually, just saw that the html content does distinguish between code and otherwise... maybe we can work with that.

screen shot 2016-04-28 at 10 50 24

@joaomoreno joaomoreno modified the milestones: April 2016, Backlog Apr 28, 2016
@jrieken
Copy link
Member

jrieken commented Apr 28, 2016

@joaomoreno Careful cos the content can be full markdown, meaning again code and also other formatting instructions. Tho, you can use this - like the hover does.

@joaomoreno joaomoreno added ux User experience issues and removed bug Issue identified by VS Code Team member as probable bug labels Aug 29, 2016
@DanTup
Copy link
Contributor

DanTup commented Sep 2, 2016

@joaomoreno I like the look of this; hovers were looking a bit weird (esp. with fixed width fonts) 👍

I raised a case related to code-rendering in hovers, I don't know whether they may be any overlap with what you're doing here and that (#11331).

@joaomoreno
Copy link
Member

Delayed hover
delayed

Delayed hover with scroll
scroll

Diagnostics hover
diagnostics

Glyph hover (breakpoints)
breakpoint
conditional breakpoint

@jrieken
Copy link
Member

jrieken commented Sep 7, 2016

@joaomoreno It broke multi-line error messages that have a source-property

  let dia = new vscode.Diagnostic(range, 'I am an error diagnostic\n   ^^^^\n   this is bad');
  dia.source = 'abc';

sep-07-2016 10-45-28

@joaomoreno
Copy link
Member

joaomoreno commented Sep 7, 2016

Good to know, expect that it didn't break anything. That didn't work before. Here's the current insiders, where my change is yet not pushed:

image

nice try

@jrieken
Copy link
Member

jrieken commented Sep 7, 2016

homer-simpson-doh

@joaomoreno
Copy link
Member

Just went through suggest widget.

screen shot 2016-09-09 at 15 26 38

Both hover and suggest are styled the same. The contents themselves are a bit different. We need to come up with an API solution for completion item providers (and others) to return Markdown for some fields. Once we have that, we can have the same styles for the type signature and cool Markdown in the suggestion details.

@jrieken
Copy link
Member

jrieken commented Sep 9, 2016

I see many horizontal lines

@joaomoreno
Copy link
Member

i see dead people

@DanTup
Copy link
Contributor

DanTup commented Sep 11, 2016

This looks really good in insiders (esp. with the code language fix!). But, would there be any possibility of allowing it to go up to 80 characters before wrapping? 80 chars seems to be a fairly common wrapping point so docs might be formatted to try and fit within that (the Dart source code is certainly full of this!)

tooltips

@joaomoreno
Copy link
Member

Parameter hints:

image

@joaomoreno
Copy link
Member

@DanTup: #11875

Closing this as all widgets are somewhat more aligned. Created #11877 for further content alignment.

@bpasero
Copy link
Member

bpasero commented Sep 28, 2016

Since this was on the plan, I am removing the verification-needed label.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues ux User experience issues
Projects
None yet
Development

No branches or pull requests

6 participants