New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced TableLayout with GridBagLayout, JXTaskPaneContainer #3927
Replaced TableLayout with GridBagLayout, JXTaskPaneContainer #3927
Conversation
} | ||
} | ||
src.setSpecial(true); | ||
firePropertyChange(SELECTED_TASKPANE_PROPERTY, null, src); | ||
} | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we needed that space 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) I wonder how that slipped in. Unfortunately the whole formatting is a quite messy, couldn't manage to get my changes in matching the old format and if I reformat the whole file with the right format (i.e. spaces instead of tabs) one can't see the changes in the diff.
Tested using OMERO.insight-5.1.2-290-fdc6305-ice34-b549-mac_Java6 and OMERO.insight-5.1.2-290-fdc6305-ice34-b549-mac_Java7+ trout user-3 read-only-1. The right hand pane is not displaying the various tabs as expected. The un-expanded tabs are not anchored to the bottom of the window as expected - see screenshot - b549 on left and b545 on right. There are also juddering and slow animations-transformations in the latest build when the tabs are expanded. This is compared with the completely smooth opening and closing previously. The trees all appear to be behaving as expected, and the scroll bars are appropriate to the size of the pane and the contents. |
Thanks @gusferguson ... Yes, I missed the point that the collapsed panes should be aligned at the bottom. The collapse/expand animations were already switched on previously but just didn't work with the TableLayout, now with the GridbagLayout they work. But I also find the animations slightly annoying. Shall I disable them (will match the previous behaviour)? |
@dominikl - I think it would be better to disable them and revert to previous behaviour. |
f405cef
to
a58a9e9
Compare
Tested using OMERO.insight-5.1.2-308-a751719-ice35-b550-mac_Java7+ user-3 read-only-1 Other tabs now pinned to the bottom - works as expected. Another issue noticed - with truncation of names in data tree. When a dataset with long names is opened (e.g. Project-user-3 > non-archivedv) the left hand pane horizontal scroll bar appears even though the names are accurately truncated to the width of the pane - see screenshot 1. If you then scroll horizontally, the pane appears to be expanded to the extent required to accommodate the long names even though they are actually truncated - see screenshot 2. I tested the PR J-M did for the truncation a while back (can’t remember the number unfortunately) and we really struggled to get the behaviour correct with each solution tending to cause another issue, so the change to GridBagLayout may have negated or reverted one of those fixes. This does not really affect the functionality of the data tree as if you just expanding the width of the panel the truncation expands correctly and you see the full image names, so I would be happy for you to look at that in another PR having considered and maybe talked to J-M about what was done before. Therefore if you want to merge this PR and take up the scrollbars as a new issue, I am happy with that, but if you want to sort it out here I am happy to carry on testing. |
I'll try to fix this issue here. The PR isn't urgent anyway, not likely to conflict with anything else, so no need for being merged immediately. |
Just as a reference, found the 'name truncation' PR #3770 |
a58a9e9
to
9c4d039
Compare
I also noticed another issue: Previously for the name truncation just the width of the character 'A' was determined and then based on that calculated how many characters of the name have to be truncated. This often leads to wrong results (too much or too less cut off). Now the truncation happens iteratively until the name fits into the given space. This might have performance issues. Do we have a test dataset with hundreds of images with long names somewhere, to check if this change has significant performance implications? @gusferguson |
@dominikl - no I don't think that we have a dataset - ask Simon though - I think he has scripts that make awkward datasets. |
Example for dataset with 300 images with long names: read-only-1/user-3 "pngs" |
@dominikl - I expect so - it just about drove J-M nuts. |
Hopefully fixed it without introducing other bugs... |
Tested using OMERO.insight-5.1.2-426-49062df-ice34-b554-mac_Java6 trout user-3 read-only - pngs dataset. Behaves as expected. Good to merge!! |
Tested with Windows 8 and Ubuntu. |
Big 👍 |
…rcontainer Replaced TableLayout with GridBagLayout, JXTaskPaneContainer
@dominikl: congrats |
As @pwalczysko just discovered, I introduced a bug with this PR: If you now expand an empty dataset it shows a child node with the same name like the dataset (previously the child node just said "Empty"). Will fix this in a follow-up PR. |
Replaces the usage of TableLayout with GridBagLayout in the left hand side "browser container"; this should fix 11403 and 12655.
Unfortunately the problems mentioned in the tickets are random and not reproducible, so for testing this PR make sure the left hand side panel in Insight still works as expected, i. e. switch between project, screen, administration, etc., change the size of the panel, make sure the scrollbar appears when there's not enough space, and so on.