atom-community/atom-ide-datatip

Not showing correctly

Closed this issue · 7 comments

Atom IDE data tips are not shown correctly using this new package:

  • No syntax highlighting
  • No formatting, syntax highlighting, line breaks for jsdoc docstrings
  • The color of datatip matches the editor's background color, which makes it hard to distinguish the two (in One-dark). The datatip can optionally have a border.
  • A very small font that is hard to read
  • No pinning option

Examples using IDE TypeScript:

atom-ide-datatip

image
image

atom-ide-ui:

image

image

Belar commented

Hi,
thanks for the report and including screenshots.

Screenshots for reference:
theme: Atom's One Dark (UI and syntax)
code: atom-languageclient package
language server: ide-typescript package

config.get:
datatip_one_dark

definitions.getDefinition:
datatip_docstring_one_dark

No syntax highlighting

Code highlight seems to be available. However, I did get incorrect formatting, compared to yours.

No formatting, syntax highlighting, line breaks for jsdoc docstrings

In the first case, both descriptions look as expected (single sentence in italic). However, second pair of your screenshots are showing italicised markdown, for both atom-ide-datatip and atom-ide-ui. I don't know what is the cause, may be environment related.

The color of datatip matches the editor's background color, which makes it hard to distinguish the two (in One-dark). The datatip can optionally have a border.

Are you running Atom's default One Dark theme or a flavour? From what I checked, data tip and description have different backgrounds (lighter, darker) and entire tooltip has a hard shadow to contrast with editor - all based on theme. Overall style sheets look true to the original, atom-ide-ui.

Adding a light border to the tooltip sounds good, should help in dark themes, where shadow is not enough.

A very small font that is hard to read

I pushed a branch with a potential fix, makes it respect UI theme's font size setting. However, it wouldn't change anything for default setup, would be great if you could check if it works for the reported case.

No pinning option

Yes, a missing feature. I'm not sure how popular it is, never used/needed it myself, but could be added.

Why your screenshots look so different than mine?⁉️ Yours has two different sections (lighter and darker one).

Yes I am using default One Dark theme. My Syntax was Atom Dark, but changing to One Dark doesn't change the look of the pup ups.
One-Dark Syntax and Theme:
image

Belar commented

Do you have other package(s) with datatip tooltip functionality installed, or one that could interfere? If yes, maybe there is a conflict, could you try disabling atom-ide-datatip?

After disabling:
image

Which package is this?

Belar commented

Which package is this?

Must be some other datatip provider. The simplest way to find out, that I know of, is to go through your installed packages and play with disabling.

Maybe this happens because main.js initializes datatip manager before markdown service is initialized. I had similar problem and fixed it by forcing renderer:

   consumeMarkdownRenderer(renderer) {
     this.renderer = renderer;
+    this.datatipManager.renderer = renderer;
   }

I will close this since most of the issues are resolved in the last version as I checked with atom-typescript, ide-typescript, ide-python.