go-signature-statusbar icon indicating copy to clipboard operation
go-signature-statusbar copied to clipboard

Width is too small to show all arguments

Open kaskavalci opened this issue 8 years ago • 5 comments

I often have the following problem:

Variable names are not short enough and too many arguments are present in function signature. screen shot 2016-06-21 at 08 49 03

Thus, I can only see some portion of it. It may be nice if I can adjust the width. I noticed your commit 17ff9e0404b4d9d506b39e73fe092781804be9fe and changed package.json to increase the width. After restarting Atom width increased but nevertheless some functions just don't fit there.

In fact, it would be great if a popup is shown since functions may have many arguments and status bar i not long enough to show it. However this repo's name is go-signature-statusbar so maybe it's not fit for this project :)

kaskavalci avatar Jun 21 '16 05:06 kaskavalci

@kaskavalci Thanks for the feedback. v1.1.0 should indeed improve situations where the signature of a function is very long. I'm not sure what you mean by

changed package.json to increase the width

. Have you tried changing the value of the setting Width in Preferences > Packages > go-signature-statusbar to none?

I think a popup would be too distracting, but a tooltip when hovering the signature is a viable solution. Not sure when I get to it, though. Pull requests are always appreciated.

wndhydrnt avatar Jun 30 '16 18:06 wndhydrnt

I'm still seeing this issue in v1.1.0. Changing the width doesn't seem to have any effect.

ssoroka avatar Jul 29 '16 16:07 ssoroka

@ssoroka That's odd. Basically, what the feature does is changing the CSS attribute max-width to the value set in the settings. As I'm not seeing the issue in my setup, maybe there is a different package or setting that is causing the trouble?

In order for me to get a better understanding of this, please provide the following information:

  1. Wich version of Atom do you use?
  2. Do you have other packages installed that make use of the status bar?
  3. Please change the width in the settings of the package, switch to Go source file, open the Developer Console (cmd + opt + i on my mac) and inspect the element in the status bar (its CSS class is called go-signature-statusbar). Is max-width changed to the value you set in the settings?
  4. Could you provide a screenshot of the status bar? Here is mine: screen shot 2016-08-20 at 09 55 46

Thanks!

wndhydrnt avatar Aug 20 '16 07:08 wndhydrnt

I suggest you do away with the notion of max with, and operate the same way the file info display in the status bar does: https://github.com/atom/status-bar/blob/57d69026a2515279ad00d8717a141ef3ff7b9304/styles/status-bar.less#L67

joefitzgerald avatar Aug 20 '16 16:08 joefitzgerald

I'm not seeing the issue at the moment, though @joefitzgerald 's suggestion seems like a reasonable one.

ssoroka avatar Aug 23 '16 21:08 ssoroka