Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360918 - [RBD] Properties - properties changes don't reflect in Design view
Summary: [RBD] Properties - properties changes don't reflect in Design view
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Huo Zhen Zhong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-14 02:44 EDT by Yu Hao CLA
Modified: 2017-02-23 14:19 EST (History)
5 users (show)

See Also:


Attachments
fix (3.68 KB, patch)
2011-11-03 03:30 EDT, Huo Zhen Zhong CLA
lasher: iplog+
Details | Diff
new fix (2.92 KB, patch)
2011-11-03 06:14 EDT, Huo Zhen Zhong CLA
lasher: iplog+
Details | Diff
fix with name refactoring (2.03 KB, patch)
2011-11-03 21:42 EDT, Huo Zhen Zhong CLA
lasher: iplog+
Details | Diff
fix for div condition (4.57 KB, patch)
2011-11-04 05:18 EDT, Huo Zhen Zhong CLA
lasher: iplog+
Details | Diff
Button with and without padding (12.63 KB, image/png)
2011-11-16 15:30 EST, Brian Svihovec CLA
lasher: iplog+
Details
fix for button (2.03 KB, patch)
2011-11-17 04:24 EST, Huo Zhen Zhong CLA
huozz: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Hao CLA 2011-10-14 02:44:34 EDT
Build Identifier: 201110130940

DnD a TextField into a handler and change its padding. The display in Design view is incorrect. But it display correctly in preview.

Reproducible: Always
Comment 1 Huo Zhen Zhong CLA 2011-10-28 06:51:42 EDT
It works well in the latest build, please try it again.
Comment 2 Yu Hao CLA 2011-11-02 02:05:09 EDT
The TextField in VE is still not displayed correctly. This should be an VE issue.
Forest , Could you please have a look?
Comment 3 Huo Zhen Zhong CLA 2011-11-02 22:34:01 EDT
It occurs on IE 8, the firefox is fine
Comment 4 Huo Zhen Zhong CLA 2011-11-02 22:39:16 EDT
also occurs on RBD with IE 8
Comment 5 Huo Zhen Zhong CLA 2011-11-03 03:30:09 EDT
Created attachment 206381 [details]
fix
Comment 6 Huo Zhen Zhong CLA 2011-11-03 03:31:54 EDT
It is caused by the difference of boxing model between IE and FF, fix by adding padding and border width to the whole width and height of widget in IE.
Comment 7 Huo Zhen Zhong CLA 2011-11-03 06:14:46 EDT
Created attachment 206390 [details]
new fix
Comment 8 Huo Zhen Zhong CLA 2011-11-03 07:00:02 EDT
Xiao Bin, please check in the first fix, the second one has problem.
Comment 9 Brian Svihovec CLA 2011-11-03 16:17:48 EDT
Can you describe the need for the 'isContainer' function?  Is there no need to add the additional padding information for 'containers'?  Will this check work for all types of 'containers', and not just our GridLayout or Box?

Assuming we need 'isContainer', can we rename getOuterHeightInPixels2 and getOuterWidthInPixels2 to something more descriptive like 'getOuterHeightInPixelsNonContainer'?
Comment 10 Huo Zhen Zhong CLA 2011-11-03 21:42:42 EDT
Created attachment 206439 [details]
fix with name refactoring
Comment 11 Huo Zhen Zhong CLA 2011-11-03 21:47:45 EDT
Hi, Brian
IE calculate the width and height of table differently than others, so we need the function to handle different situation. I have changed "isContainer" to "isTable" and "getOuterHeightInPixels2" to "getOuterHeightInPixelsNonTable".
Comment 12 Huo Zhen Zhong CLA 2011-11-04 05:18:31 EDT
Created attachment 206453 [details]
fix for div condition
Comment 13 Huo Zhen Zhong CLA 2011-11-04 05:19:06 EDT
I have did a fully test of all the widget selection in VE, and made a new fix for DIV condition.
Comment 14 Brian Svihovec CLA 2011-11-05 15:33:45 EDT
Please remove the alerts from egl_develompent.js.

I don't see the function isTable being used.  Is this still needed?  

The function isIESpecialWidget appears to be hard coded for Box widgets and Dojo widgets.  This probably will not work for users who are writing their own widgets and do not have access to this code.  We may need to add something to the VEWidget annotation to resolve this issue in the future (is the 'isContainer' field of the VEWidget annotation enough?)

I am reopening this defect so that we can remove the alerts and isTable function.  I am defering this fix until 'future' where we can enhance the isIESpecialWidget function to cover widgets not written by the EDT team.  We can leave the rest of the fix as is for .7.
Comment 15 Huo Zhen Zhong CLA 2011-11-16 01:13:50 EST
have removed the alert and did some refatoring
Comment 16 Brian Svihovec CLA 2011-11-16 15:30:14 EST
Created attachment 207115 [details]
Button with and without padding
Comment 17 Brian Svihovec CLA 2011-11-16 15:30:40 EST
I am not sure if the RUI Widgets's claro.css file was updated for this
particular defect, but the change to the padding is affecting how Buttons are
rendered.  According to CVS history, the following lines were removed by Yun
Feng for this fix:

    padding:2px 8px 5px 7px;
    *padding: 1px 1px 2px;
    _padding: 1px 1px 1px;


See attached screen shot for how this affects buttons.  The image on the left
is a RUI Button  (top) and a Dojo Button (bottom) before the padding was
removed.  The image on the right is a RUI Button (top) and a Dojo Button
(bottom) before the padding was removed.
Comment 18 Huo Zhen Zhong CLA 2011-11-17 04:24:58 EST
Created attachment 207130 [details]
fix for button
Comment 19 Huo Zhen Zhong CLA 2011-11-17 04:26:40 EST
Hi, Brian
Only roll back the padding in CSS will cause VE selection problem, so another change in egl_developement.js also needed. I have attached the patch for you to review. Thanks
Comment 20 Brian Svihovec CLA 2011-11-21 08:15:25 EST
What is the 'Div' condition mentioned in comment 13?  The padding in claro.css was set to the following when the project was first created:

padding:2px 8px 5px 7px;
	*padding: 1px 0 2px;
	_padding: 2px 6px 3px;

The latest patch has:

+	padding:2px 8px 5px 7px;
+    *padding: 1px 1px 2px;
+    _padding: 1px 1px 1px;


With the changes being made for the 'div' condition in comment 13.  

Unless the 'div' condition is a big issue, we should put the padding back to the way that it was when the project was created.  Also, what do the '*' and "_" values mean in the padding attribute names?

I am ok with committing the change to isIESpecialWidget to only run if the browser is IE.  

If the patch will be changed to the padding from RBD and an update to isIESpecialWidget, it can be committed to CVS.  If the padding cannot be changed back to the values used in RBD, we will need to discuss the patch again.
Comment 21 Huo Zhen Zhong CLA 2011-11-21 21:56:23 EST
"*" and "_" are hack for IE 6 and 7 in CSS, the problem only occurs in IE 8, so I have change them back to the same as RBD.
Condition for "div" means that the widget will render to a div. Now we hard code the widgets name as Comment 14 said, and will consider to add a new annotation to solve it in future EDT release.
I have checked in the patch which will be changed to the padding from RBD and an update to isIESpecialWidget,and change to P3 for further enhancement in Comment 14.
Comment 22 Brian Svihovec CLA 2011-11-21 22:55:36 EST
Go ahead and open an enhancement for comment 14 and let's resolve this one.
Comment 23 Huo Zhen Zhong CLA 2011-11-22 00:59:02 EST
enhancement 364435 is created for comment 14.
Comment 24 Yu Hao CLA 2011-11-28 20:58:33 EST
Please refer to enhancement https://bugs.eclipse.org/bugs/show_bug.cgi?id=364435