yujinakayama / atom-lint

Obsolete: Generic code linting support for Atom
https://atom.io/packages/atom-lint
MIT License
111 stars 33 forks source link

Tooltip being cut off by top of editor #45

Closed ryanjafari closed 10 years ago

ryanjafari commented 10 years ago

First off, thanks for this superb package.

I was wondering if anyone was experiencing something similar to the following screenshot: http://cl.ly/image/0U3w1e3G2R0P

When I mouse over a lint warning, the tooltip that appears is cut off by the edge of the editor window if the error occurs on the 1st or 2nd line (basically, at the very top).

I would guess a couple of things can contribute to this including the theme used, font size, font family, etc.

I'm not sure what can be helpful if this is indeed unexpected behavior, but here is some information:

Theme: https://github.com/dmackerman/atom-soda-light-ui Editor settings: http://cl.ly/image/0S0s0V0K0U0I

ryanjafari commented 10 years ago

Could also just be an atom thing :)

yujinakayama commented 10 years ago

Thanks for the report. Actually I'm aware of it. :)

Since atom-lint 0.9.0, it places tooltips smartly according to the position of the problematic code in the editor.

For example, atom-lint 0.8.0 displayed the tooltip for a violation at the end of the file:

screen shot 2014-04-11 at 9 29 39

And the current atom-lint 0.11.1 displays as the following:

screen shot 2014-04-11 at 9 36 10

However, the logic is not smart enough when the file has only a few lines. :) Currently it considers the logical area of editor, but it doesn't consider the bottom blank area of the editor when the window is larger than the content of the file.

I'll try fixing this.

ryanjafari commented 10 years ago

Wonderful! It's fixed. Thank you.