Module panel resize due to Data Probe is distracting

On recent Slicer preview versions, the module panel automatically resizes based on the size of the contents. This is an understandable design decision. As someone who often is switching between modules, I personally would prefer that the slice views not be changing sizes as I do so, but there are advantages either way and I can live with it as it is now.

However, there is one case where I think the auto-resizing is both very annoying and potentially functionally problematic, and that is when mousing over the slice views causes the Data Probe module to change dimensions. This causes a resizing of slice views, which causes the point under the mouse to change, which causes a change in the Data Probe data to change. If I position my mouse cursor near the edge of the image volume in the slice view, I can get into a state where the shift gets into an endless loop where one state is ā€œOut of Frameā€, which increases the size of the Data Probe module and causes a shrinkage of the slice view, which puts my (non-moving) cursor inside the frame of the slice view, which decreases the size of the Data Probe, which expands the slice view, which puts the cursor outside the frame, etc. This case is a vivid illustration of why this is a problem, as just putting my mouse cursor in one location should not possibly lead to an oscillation in the partition sizes.

The obvious solution for this is to not allow the Data Probe to trigger resizing of the side panel, instead it must use whatever space is available.

If you are having trouble reproducing, I can record a video and share it. The problem can be generated near the edges of displayed segments as well as near the edge of the volume, so it is not sufficient to catch the ā€œOut of Frameā€ case.

This behavior has been around for a few years, so it is not a regression, but I agree that it can be quite annoying. @Sunderlandkyl has implemented an important fix about a year ago: if you set the width of the left panel manually once then the DataProbe will not make the vertical separator jump again.

Can you verify that after you drag-and-drop the vertical separator there is no more jumping around as you move the mouse between viewers and the left panel?

It would be nice if this manual initial adjustment was not needed but some initial width would be automatically set by default.

1 Like

Testing this, the behavior I get is that the Data Probe will still expand the left panel, but it will no longer shrink it. This prevents oscillation, but does not prevent a single jarring shift from just mousing over a slice view. If the left panel is manually decreased in size by dragging the divider, then moving the mouse over the slice view will again expand the left panel until it is wide enough to hold whatever is in the Data Probe. There does not appear to be a way to prevent auto-expansion of the left panel.

I find this behavior quite annoying too, but I also understand the potential for use for it. Would it be possible to turn this into an application setting, in which the default is auto-resize the module window, but it can be turned off?

I agree that oscillation of the left panel is jarring. A single expansion might be unexpected but understandable when a module needs more space. I donā€™t see how you could otherwise fulfill conflicting requirements of the user wanting the left panel to be a certain size but the widgets that the module must display not fitting in that amount of space. Alternative solutions that I can think of - cut off the part that does not fit, add a horizontal scrollbar, show a popup to get permission from the user to make the panel wider - all sound much worse than a quick automatic size adjustment.

We try to keep the left panel size narrow (there is automatic test for each module GUI), but not all issues may be captured and there may be cases (e.g., some content makes a window too wide) that should be addressed specifically. If you run into any of these then you can submit an issue for that or discuss it here.

I think the main issue is that there is no initial size - oscillation can still happen until the user adjusts the width manually once. @Sunderlandkyl do you know how could we achieve the same effect (make the size not decrease automatically) without a manual adjustment of the splitter? Would that have any negative side effects?

Iā€™ve made a PR here that I think should fix this issue for good (fingers crossed). Iā€™ve just made it so that the horizontal size policy of the data probe is ā€œIgnoredā€.

2 Likes

The pull request has been merged and will be available in the Slicer Preview Release from Wednesday. It resolves all the width changes due to information appearing in the Data Probe. The module panel may still become wider when switching between modules, due to different minimum width requirements of modules (depending on the module and content displayed in the module widget).

1 Like