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

Don't truncate "Write Local Grid" dialog labels #106

Closed mhiley closed 9 years ago

mhiley commented 9 years ago

Hi guys, Currently, "Write Local Grid" dialog box truncates data choice labels to 30 characters, which is too short for many gridded fields. The dialog box looks fine without any truncation, so this commit just disables the truncation. Before fix:

screen shot 2015-10-07 at 2 23 57 pm screen shot 2015-10-07 at 2 26 59 pm

After fix:

screen shot 2015-10-07 at 2 24 12 pm

This fixes McV inquiry 1887.

donmurray commented 9 years ago

There are some names longer than the ones you are showing, like "Convective available potential energy @ Level at specified pressure difference from ground to level layer" from the GFS .5 degree grids. See if that fits with your change. If not, maybe just increase the point of truncation out to the longest of the variables listed in your examples. (e.g., 65 vs. 30)

tommyjasmin commented 9 years ago

Don - can you elaborate on your concern? I'm not sure what you mean regarding whether longer field names "fit with the change". Are you concerned that if the field name is longer than you can resize the window, you will not see the Grid Size column? If so, what if we just switch the column order?

donmurray commented 9 years ago

If the widget automagically resize to fit the longest name, them it's not a problem. If it doesn't then the names should be truncated to a reasonable length. What happens when you shrink the window? Does the layout get messed up? Keep the columns where they are in any case.

Don

BuddhaAndTheBees.net

On Oct 8, 2015, at 8:41 AM, Tommy Jasmin notifications@github.com wrote:

Don - can you elaborate on your concern? I'm not sure what you mean regarding whether longer field names "fit with the change". Are you concerned that if the field name is longer than you can resize the window, you will not see the Grid Size column? If so, what if we just switch the column order?

— Reply to this email directly or view it on GitHub.

mhiley commented 9 years ago

@donmurray If the window isn't large enough to hold the labels, they just get truncated anyway, only the "Grid Size" label doesn't show up anymore.

1

donmurray commented 9 years ago

Is there a way to set the max width on the label so it wouldn't overwrite the size?

buddhaandthebees.net

On Thu, Oct 8, 2015 at 10:24 AM, Michael Hiley notifications@github.com wrote:

@donmurray https://github.com/donmurray If the window isn't large enough to hold the labels, they just get truncated anyway, only the "Grid Size" label doesn't show up anymore.

[image: 1] https://cloud.githubusercontent.com/assets/1490630/10372762/1d5fec06-6daf-11e5-8e05-27b1a2a6dd4c.png

— Reply to this email directly or view it on GitHub https://github.com/Unidata/IDV/pull/106#issuecomment-146602440.

tommyjasmin commented 9 years ago

Don - the size never gets overwritten, it just doesn't get displayed if there's not enough real-estate in the window. Same with the label - you will see as much now as the fits in the window, rather than just chopping it off at 30 regardless how much a user resizes the window. See the screencast in the link below to make sure we are on the same page. Then tell us what you think the behavior should be...

http://www.screencast.com/t/hQoYxfoE

donmurray commented 9 years ago

It just looks odd to have the "Grid size" label, but no grid size. IMHO, if the label is too long so that the grid size isn't shown in the default window size, then the label should be truncated so you can still see the grid size. I don't really have any skin in this any more - just looking at it as a confused user.

buddhaandthebees.net

On Thu, Oct 8, 2015 at 12:47 PM, Tommy Jasmin notifications@github.com wrote:

Don - the size never gets overwritten, it just doesn't get displayed if there's not enough real-estate in the window. Same with the label - you will see as much now as the fits in the window, rather than just chopping it off at 30 regardless how much a user resizes the window. See the screencast in the link below to make sure we are on the same page. Then tell us what you think the behavior should be...

http://www.screencast.com/t/hQoYxfoE

— Reply to this email directly or view it on GitHub https://github.com/Unidata/IDV/pull/106#issuecomment-146651183.

yuanho commented 9 years ago

I think this is another good topic for next week tel conf

Yuan

Sent from my iPhone

On Oct 8, 2015, at 12:52 PM, Don Murray notifications@github.com wrote:

It just looks odd to have the "Grid size" label, but no grid size. IMHO, if the label is too long so that the grid size isn't shown in the default window size, then the label should be truncated so you can still see the grid size. I don't really have any skin in this any more - just looking at it as a confused user.

buddhaandthebees.net

On Thu, Oct 8, 2015 at 12:47 PM, Tommy Jasmin notifications@github.com wrote:

Don - the size never gets overwritten, it just doesn't get displayed if there's not enough real-estate in the window. Same with the label - you will see as much now as the fits in the window, rather than just chopping it off at 30 regardless how much a user resizes the window. See the screencast in the link below to make sure we are on the same page. Then tell us what you think the behavior should be...

http://www.screencast.com/t/hQoYxfoE

— Reply to this email directly or view it on GitHub https://github.com/Unidata/IDV/pull/106#issuecomment-146651183.

— Reply to this email directly or view it on GitHub.

tommyjasmin commented 9 years ago

Don - after mulling this over I agree with you we should not show the "Grid Size" column label when that column is not visible. I have coded up a fix and once it passes testing here at SSEC will update the Pull Request.

mhiley commented 9 years ago

Closing in favor of Tommy's fix in #109