Dynamically set the initial label & tree pane sizes
USE CASE: WHAT DO YOU WANT TO DO?
I want the amount of space taken up by the labels and trees to be optimally set automatically instead of requiring the user to manually adjust the sizes.
STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)
- Open a cdt file for the first time (might have to reset preferences for testing this)
CURRENT BEHAVIOR
The amount of space taken up by the labels and trees is static.
EXPECTED BEHAVIOR
The amount of space taken up by labels and trees should be dynamically determined to create as little wasted space as is reasonable/possible and maximize the space dedicated to the interactive matrix.
DEVELOPERS ONLY SECTION
SUGGESTED CHANGE (Pseudocode optional)
- Establish a static maximum initial tree and label area size (for the dimension not linked to the matrix size).
- Determine the minimum size necessary for the tree (in order to be able to unambiguously select any node - see issue #339)
- Determine the longest label (plus the indicator & indent sizes) size
- Set the splitpane divider location to either the maximum from step 1 or the minimum from step 2 - whichever is smaller.
- Set the DragGridPanel first row/col size to the size from step 4 (plus the splitpane divider width) plus either the size from step 3 or the max label area size from step 1 - whichever is smaller.
When a file is re-opened, this code should not execute, but rather grab the saved data from stored preferences.
FILES AFFECTED (where the changes will be implemented) - developers only
DendroView (the initial DragGridPanel first row/col size is currently hard-coded there, as is the splitpane divider width and position) LabelView (the longest label and indicator sizes are there)
LEVEL OF EFFORT - developers only
medium
COMMENTS
Old issue description:
Determine the label pane size based on which is smaller:
- Length of the longest label string
- An arbitrary minimum starting size
User should be able to change the size smaller than the minimum when "show trees" is true.
Should dynamically update if "Row and Column labels..." preference is changed or when a new file is opened.
Comments (12)
-
reporter -
reporter This is easily possible now since I have implemented the whizzing labels feature.
-
reporter - marked as trivial
Changed to trivial since the label area has been reduced in the latest layout changes.
-
reporter - changed milestone to Labels
- changed title to Dynamically set the initial label-pane sizes
- edited description
-
reporter - changed component to Labels
-
reporter - removed milestone
Removing milestone: Labels (automated comment)
-
reporter - changed milestone to 06
-
reporter - changed milestone to Faizaan/Srikanth - 06
-
reporter - changed milestone to F/S - 06
-
reporter - changed version to alpha04
-
reporter - edited description
- changed title to Dynamically set the initial label & tree pane sizes
Updating this issue given pull request #109 and BB issue
#36. Also taking BB issue #339 into consideration, as an example of determining the necessary height a tree needs to be in order to be able to unambiguously select any node upon hover. -
reporter - changed version to beta2
- Log in to comment
I'm tracking through some of the older issues and adding some clarifications where might be needed. This issue is regarding the size of the panes where the labels are. It's sort of a real-estate conservation issue. To better show what I mean by label pane size, take a look at these two images. The first is what you get by default right now and the other is what I envision with this issue. Note how the row labels pane size has shrunk and the data takes up more of the real-estate...