atom-community/atom-ide-datatip

Use variable-width fonts for documentation and allow adjusting the size

Closed this issue ยท 3 comments

Currently, the datatips use the font size of the editor. This is undesirable for people (me) who prefer large font sizes for the editor but don't mind smaller font sizes for the datatips for space efficiency.

The datatips also use the font family of the editor, which make the documentation strings written in prose look weird and hard to distinguish from code.

I propose setting the default font family for the main datatip text (system-ui, which is what Atom uses as its variable-width font) and use a percentage for the font size (since the datatips inherit from the editor's font size anyway) and allow changing that percentage with a configuration option

Currently, the datatips use the font size of the editor. This is undesirable for people (me) who prefer large font sizes for the editor but don't mind smaller font sizes for the datatips for space efficiency.

Adding a font size option is too much customizability, and I am reluctant to add it. In the Atom ecosystem, none of the packages do that. They usually either use fixed size or they use the editor size. If we want to have this mindset, then every single Atom package should provide config for all the CSS options.

The datatips also use the font family of the editor, which make the documentation strings written in prose look weird and hard to distinguish from code.

I propose setting the default font family for the main datatip text (system-ui, which is what Atom uses as its variable-width font) and use a percentage for the font size (since the datatips inherit from the editor's font size anyway) and allow changing that percentage with a configuration option

Editor's font is the only font setting that users set. Based on what I have experienced, having the same font makes the datatips not look alien.

hard to distinguish from code.

The glow option makes datatips distinguishable from the code. We can add more styling to make them look different.

Alright, I agree on the font size, we can use the Atom custom stylesheet to adjust that to one's needs. However, I still think the font family should be default. Documentation is prose, mostly, not code, and it shouldn't be written in a monospace font because then the code is not accented enough (and monospace fonts aren't as optimized for readability). VS Code also uses a variable-width font for its datatips and it makes them a lot better, in my opinion.

If a person wants to customize the font family because it looks alien to them, they can always use the stylesheet as well. But considering it's the system-ui font, the users should be relatively comfortable with it.

I disagree that the glow option makes the datatips distinguishable from the code. See my comment on #107 for reasoning

๐ŸŽ‰ This issue has been resolved in version 0.22.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€