Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329102

Summary: excess scroll space in editor sections
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Ling Hao <ling.hao>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2010-10-29 16:13:40 EDT
The problem can be best seen in the Sapphire Gallery sample. When an editor
section utilizes label parts, the scrollbar doesn't correctly size itself to
the actual content. As more label parts are used and as those labels get
longer, the excess scrollable whitespace gets larger.
Comment 1 Konstantin Komissarchik CLA 2010-11-04 18:02:31 EDT
Found a related problem that appears to be still there. See gallery sample -> Simple Values -> Enums.
Comment 2 Konstantin Komissarchik CLA 2010-11-04 18:06:23 EDT
Another problem... 

1. In gallery sample, go to Actions -> Value Property Editor.
2. Significantly reduce the size of the right hand side using the separator.
3. Watch a fascinating resizing animation as the text progressively reflows to fit the space.
Comment 3 Ling Hao CLA 2010-11-05 19:16:48 EDT
Fixed comment 1 (complete different problem, empty composite defaults to 64x64) and comment 2.
Comment 4 Konstantin Komissarchik CLA 2010-11-10 14:49:17 EST
Problem described in Comment #1 isn't quite fixed. The whitespace is smaller, but is still not the same as beneath other sections on the same page. To fix, instead of making the parts composite be 0-height, try not to create the composite in the first place. Even if you make the composite 0-height, you still have padding between it and the section description. Another way to fix this might be to use the same composite for description and the section parts instead of creating a nested composite.

Problem described in Comment #2 now shows a different issue. The resizing animation is gone, but when the section resizes it doesn't fit into available horizontal space. I get a horizontal scrollbar even if there is plenty of space.
Comment 5 Konstantin Komissarchik CLA 2010-11-30 13:19:31 EST
Ling,

Could you also take a look at the case introduced with fix for Bug 330697 when you get a chance? It looks to be a similar problem to what you fixed in SapphireLabel class (wrapping text). Will likely require similar treatment. See RadioButtonsGroup class. You can see the problem in the gallery sample under Simple Values -> Enums.
Comment 6 Konstantin Komissarchik CLA 2010-12-07 13:39:47 EST
For comment #4 paragraph #1, what if the section description is rendered the same way as a label part would be (on the parts composite) instead of the parent section composite.
Comment 7 Ling Hao CLA 2010-12-13 16:02:30 EST
Fixed comment 4, second paragraph and comment 5.

will open a separate bug to track comment 4 first paragraph.
Comment 8 Konstantin Komissarchik CLA 2010-12-15 15:14:42 EST
I have verified all the scenarios described in this bug. Overall, the situation is significantly improved. 

Remaining issues to be tracked separately:

Bug 332473 - excess scroll space in editor sections when content is empty
Bug 332681 - Scroll bars flash briefly when reducing canvas width