Unidata / IDV

The Integrated Data Viewer (IDV) from Unidata is a framework for analyzing and displaying geoscience data.
http://www.unidata.ucar.edu/software/idv/
Other
80 stars 37 forks source link

Remove restriction on map label length [1484] #70

Closed tommyjasmin closed 10 years ago

tommyjasmin commented 10 years ago

Guys - the only relevant bit is the part removing the restriction on name length at 30 chars. The rest is cosmetic. We need this because our hi-res map label is otherwise truncated in the display. The display is all within a scrollpane so if ever there was need for more room, it should expand fine, and we tested this.

Here are before and after pics so you can see the effect of this minor change.

Before: (label truncated)

screen shot 2014-04-10 at 2 36 26 pm

After: (label fits fine)

screen shot 2014-04-10 at 2 35 03 pm

donmurray commented 10 years ago

So, if I had a 256 character map name, would the whole thing be shown? The reason for truncating at 30 was to prevent the control UI from getting too wide. I think there still needs to be a limit - maybe 35 chars. Is there a way to get long names to wrap?

tommyjasmin commented 10 years ago

Well personally, I think if you had a 256 character map label, you should shorten it to something reasonable, being that it's a label and all, which I'll define in this context as a "very brief description, typically only a few words for maximum efficacy".

To answer the question, yes, if a map name was 256 characters the whole thing would be shown. Well, scrollbars appear so that if you scroll, you can read the whole thing. But then you are violating a common UI design principle which says "if possible, try to not make your users horizontal scroll".

So then you should go back and come up with a better, shorter name for your map.

Yes, we would build in HTML breaks at certain char limits, but I'm guessing that would look clunky.

Come on Don, click the accept button! You know you want to, it's kinda shiny and alluring.

donmurray commented 10 years ago

The comment button has a shorter label the merge request button, so I'd rather click that. ;-)

The original code assumed that anything over 30 was too long, so maybe you should shorten your map name to fit within the original constraints. ;-) How long is too long (30,35,40,50?) I think we need a limit. I'm willing to go up to 40, but no more. Does the size of that column get set somewhere? Would that make the test wrap instead of truncating?

jon4than commented 10 years ago

It might be nice if there was some visual indicator that the label has been truncated. Something like "blahblahblahblah..." and then maybe a tooltip with the nontruncated string?

donmurray commented 10 years ago

Somewhere this is a method that will put ellipses on the end of the truncation. You could just add a tooltip to the JCheckBox if the name was truncated.

tommyjasmin commented 10 years ago

We'll investigate that Don, thanks.

"I'm willing to go up to 40, but no more."

donmurray commented 10 years ago

Wait'll you're my age.

tommyjasmin commented 10 years ago

Don - now restricted to 35 max (split the difference), tooltip as suggested if exceeded, see pic:

screen shot 2014-04-10 at 4 38 53 pm