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

Bug 428084

Summary: Difference between layout in RCP and RAP, when group is excluded dynamically
Product: [RT] RAP Reporter: Joachim Butz <joachim.butz>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ivan
Version: 2.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
snippet for reproducing layout problem in RAP
none
snippet for reproducing layout problem in RCP
none
snippet screenshot - group2 is visible
none
snippet screenshot - group2 excluded in RAP
none
snippet screenshot - group2 excluded in RCP none

Description Joachim Butz CLA 2014-02-13 05:42:05 EST
Under some conditions there is a difference in RCP and RAP, when a group is dynamically excluded from a GridLayout (via exclude flag).
In RCP the layout shrinks, so that the excluded group does not occupy space.
In RAP the layout does not shrink, there remains an empty space.

Details

1) Three groups (group1, group2, group3) are placed in three rows in a GridLayout, group2 is dynamically excluded (via flag exclude)
=> Layout shrinks in RCP and RAP, ok

2) same setting as in 1), but group2 is placed within another composite with marginHeight=0
=> Layout shrinks in RCP, in RAP an empty space remains, not ok

3) same setting as in 2), but the composite has marginHeight=1
=> Layout shrinks in RCP and RAP, ok

I have attached two projects (rcp.zip, rap.zip), where this behavior is shown in a snippet.
Also I attached some screenshots of the snippets UI, setting 1) is shown on the left side, setting 2) in the middle and setting 3) on the right side.
group2_visible_rap.PNG     ... group2 is visible
group2_excluded_rap.PNG    ... group2 is excluded, an empty space remains in RAP
group2_excluded_rcp.PNG    ... group2 is excluded, in RCP the layout shrinks


additional Environment Information:
OS: Microsoft Windows XP, Professional, Version 2002, Service Pack 3
RAP Version: 2.2.0.20142111934
I have tried it out and could reproduce the behavior on the following browsers:
Internet Explorer 8.0.6001.18702, Firefox 16.0.2, Chrome 32.0.1700.107 m
Comment 1 Joachim Butz CLA 2014-02-13 05:44:03 EST
Created attachment 239901 [details]
snippet for reproducing layout problem in RAP
Comment 2 Joachim Butz CLA 2014-02-13 05:45:17 EST
Created attachment 239902 [details]
snippet for reproducing layout problem in RCP
Comment 3 Joachim Butz CLA 2014-02-13 05:46:24 EST
Created attachment 239903 [details]
snippet screenshot - group2 is visible
Comment 4 Joachim Butz CLA 2014-02-13 05:49:55 EST
Created attachment 239904 [details]
snippet screenshot - group2 excluded in RAP
Comment 5 Joachim Butz CLA 2014-02-13 05:50:41 EST
Created attachment 239905 [details]
snippet screenshot - group2 excluded in RCP
Comment 6 Ivan Furnadjiev CLA 2014-02-13 08:32:39 EST
I *can't* reproduce it with your snippet and RAP from master (2.3M1+) on:
- Windows 7 with IE11, Chrome 33.0.1750.91, Opera 19 and Firefox 27
- Windows XP SP3 with 8.0.6001.18702, Firefox 4, Opera 12.16
Comment 7 Joachim Butz CLA 2014-02-13 11:51:31 EST
I have attached a screenshot "snippet screenshot - group2 excluded in RAP", where you can see, that there remains an empty space when "Group 2" is excluded.

What happens, when you click on the "exclude/include Group 2" toggle button in the RAP snippet (in middle part labeled "Space remains in RAP")?
Does the layout shrink or does there remain an empty space?
Comment 8 Ivan Furnadjiev CLA 2014-02-13 13:02:50 EST
(In reply to Joachim Butz from comment #7)
> I have attached a screenshot "snippet screenshot - group2 excluded in RAP",
> where you can see, that there remains an empty space when "Group 2" is
> excluded.
> 
> What happens, when you click on the "exclude/include Group 2" toggle button
> in the RAP snippet (in middle part labeled "Space remains in RAP")?
> Does the layout shrink or does there remain an empty space?

Yes... the layout shrinks and no empty space left in all the tested by me browsers.
Comment 9 Joachim Butz CLA 2014-02-13 13:40:39 EST
I have tried it now with target rap-2.3.0-M1-20140127-1357 and with this it works.
Comment 10 Ivan Furnadjiev CLA 2014-02-13 13:51:49 EST
(In reply to Joachim Butz from comment #9)
> I have tried it now with target rap-2.3.0-M1-20140127-1357 and with this it
> works.

Strange... I don't remember any change related to layouting between 2.2 release and 2.3M1. I'll close it as WORKSFORME. Please reopen if the issue persists.
Comment 11 Joachim Butz CLA 2014-02-14 04:10:45 EST
In rap-2.2.0-R-20131204-0942 the issue persists. Is there a chance, that it is fixed in a rap-2.2 service release?
Comment 12 Ivan Furnadjiev CLA 2014-02-14 04:18:38 EST
We do not plan any service release for RAP 2.2 at the moment.
Comment 13 Joachim Butz CLA 2014-02-14 04:24:36 EST
Ok, then I wait for the 2.3 release.
Comment 14 Ivan Furnadjiev CLA 2014-02-14 04:31:34 EST
(In reply to comment #13)
> Ok, then I wait for the 2.3 release.
I'll close it again. Please reopen if the issue persists with RAP 2.3M1+.