Problems with table layout in 5.x

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with table layout in 5.x

Squeak - Dev mailing list
After finish all the features for version 1.0.0  in my port of Pronterface in squeak 4.5:
I am trying to test in squeak 5.3 but I encounter problems with BobsUI who is the framework I am using.

BobsUI use a lot of nested UIAlignmentMorphs and the layout of that is mostly OK, but the problem appears in a UIGroupBoxMorph, in this morph the top submorph are only two: a label (UIStringMorph) and a container (UIMorph) who have the submorphs of the widgets of the group, this image show the problem between squeak 4.5 and 5.3, this is using the basic example of BobsUi called ExampleRolodex:
Tracing the execution of the creation of the morphs I find the problem in Morph>>adjustLayoutBounds reverting the version "mt 8/22/2019" to "ar 11/12/2000" restore the view (mostly) to the version 5.2.

From the tracing I see changes in the order of the selectors who are used to evaluate the size of the tree of submorphs; appears to be that the old version (4.5) always wait to obtain the size of the "leaves" of the tree of submorphs before updating the top submorphs, I think the actual version fix some sizes prematurely.

This is also apparent in other problem who is present in 5.2 and 5.3 but not in 4.5, 5.1, this image show the top of the UIWindowMorph (4.5 and 5.2):

appears the title (UITitleBarMorph) size is fixed before the (last) UIGroupBoxMorph of the window is evaluated.

Also in 5.3 (not in 5.2 and before) there is a lot of extra space around the widgets, the UIWindowMorph size are:
4.5 429 × 337 pixels
5,1 438 × 363 pixels, appears to be a change of fonts in the system
5.2 428 × 333 pixels
5.3 500 × 479 pixels

this is worse in the title of 5.3 because the extra space move te title down the proper position:

Finally I find the bounds and fullBound of the submorphs in 5.x are absolute where in 4.5 was relative to the window, in my probable naive opinion, I think is a lot of updates when a window move versus a single update to the top morph, for example ExampleRolodex have 77 submorphs, sqPronterface have 158.

For reproducing the results, you can copy BobsUI/BobsUI-jdr.7.mcz (177KB) from the repository and create the window with:

ExampleRolodex open

beware that BobsUI, intentionally, suppress the halos, so you need to use Crtl-click or equivalent to inspect it, delete, ....




Reply | Threaded
Open this post in threaded view
|

Re: Problems with table layout in 5.x

marcel.taeumel
Hi Javier,

this is most likely a configuration issue and thus easy to fix in your code. I will take a look at BobsUI/BobsUI-jdr.7.mcz and "ExampleRolodex open".

In 5.3, we added tests for TableLayout and fixed several bugs. Yet, some "unexpected behavior" might have changed, which client code maybe relied on until now -- to be addressed in that client code. But maybe there are more bugs to fix and tests to write. :-)

Best,
Marcel

Am 18.01.2021 22:29:00 schrieb Javier Diaz-Reinoso via Squeak-dev <[hidden email]>:

After finish all the features for version 1.0.0  in my port of Pronterface in squeak 4.5:
I am trying to test in squeak 5.3 but I encounter problems with BobsUI who is the framework I am using.

BobsUI use a lot of nested UIAlignmentMorphs and the layout of that is mostly OK, but the problem appears in a UIGroupBoxMorph, in this morph the top submorph are only two: a label (UIStringMorph) and a container (UIMorph) who have the submorphs of the widgets of the group, this image show the problem between squeak 4.5 and 5.3, this is using the basic example of BobsUi called ExampleRolodex:
Tracing the execution of the creation of the morphs I find the problem in Morph>>adjustLayoutBounds reverting the version "mt 8/22/2019" to "ar 11/12/2000" restore the view (mostly) to the version 5.2.

From the tracing I see changes in the order of the selectors who are used to evaluate the size of the tree of submorphs; appears to be that the old version (4.5) always wait to obtain the size of the "leaves" of the tree of submorphs before updating the top submorphs, I think the actual version fix some sizes prematurely.

This is also apparent in other problem who is present in 5.2 and 5.3 but not in 4.5, 5.1, this image show the top of the UIWindowMorph (4.5 and 5.2):

appears the title (UITitleBarMorph) size is fixed before the (last) UIGroupBoxMorph of the window is evaluated.

Also in 5.3 (not in 5.2 and before) there is a lot of extra space around the widgets, the UIWindowMorph size are:
4.5 429 × 337 pixels
5,1 438 × 363 pixels, appears to be a change of fonts in the system
5.2 428 × 333 pixels
5.3 500 × 479 pixels

this is worse in the title of 5.3 because the extra space move te title down the proper position:

Finally I find the bounds and fullBound of the submorphs in 5.x are absolute where in 4.5 was relative to the window, in my probable naive opinion, I think is a lot of updates when a window move versus a single update to the top morph, for example ExampleRolodex have 77 submorphs, sqPronterface have 158.

For reproducing the results, you can copy BobsUI/BobsUI-jdr.7.mcz (177KB) from the repository and create the window with:

ExampleRolodex open

beware that BobsUI, intentionally, suppress the halos, so you need to use Crtl-click or equivalent to inspect it, delete, ....




Reply | Threaded
Open this post in threaded view
|

Re: Problems with table layout in 5.x

marcel.taeumel
Hi Javier,

until then: Take a look at the 5.3 release notes under "compatibility notes".

Best,
Marcel

Am 19.01.2021 11:11:23 schrieb Marcel Taeumel <[hidden email]>:

Hi Javier,

this is most likely a configuration issue and thus easy to fix in your code. I will take a look at BobsUI/BobsUI-jdr.7.mcz and "ExampleRolodex open".

In 5.3, we added tests for TableLayout and fixed several bugs. Yet, some "unexpected behavior" might have changed, which client code maybe relied on until now -- to be addressed in that client code. But maybe there are more bugs to fix and tests to write. :-)

Best,
Marcel

Am 18.01.2021 22:29:00 schrieb Javier Diaz-Reinoso via Squeak-dev <[hidden email]>:

After finish all the features for version 1.0.0  in my port of Pronterface in squeak 4.5:
I am trying to test in squeak 5.3 but I encounter problems with BobsUI who is the framework I am using.

BobsUI use a lot of nested UIAlignmentMorphs and the layout of that is mostly OK, but the problem appears in a UIGroupBoxMorph, in this morph the top submorph are only two: a label (UIStringMorph) and a container (UIMorph) who have the submorphs of the widgets of the group, this image show the problem between squeak 4.5 and 5.3, this is using the basic example of BobsUi called ExampleRolodex:
Tracing the execution of the creation of the morphs I find the problem in Morph>>adjustLayoutBounds reverting the version "mt 8/22/2019" to "ar 11/12/2000" restore the view (mostly) to the version 5.2.

From the tracing I see changes in the order of the selectors who are used to evaluate the size of the tree of submorphs; appears to be that the old version (4.5) always wait to obtain the size of the "leaves" of the tree of submorphs before updating the top submorphs, I think the actual version fix some sizes prematurely.

This is also apparent in other problem who is present in 5.2 and 5.3 but not in 4.5, 5.1, this image show the top of the UIWindowMorph (4.5 and 5.2):

appears the title (UITitleBarMorph) size is fixed before the (last) UIGroupBoxMorph of the window is evaluated.

Also in 5.3 (not in 5.2 and before) there is a lot of extra space around the widgets, the UIWindowMorph size are:
4.5 429 × 337 pixels
5,1 438 × 363 pixels, appears to be a change of fonts in the system
5.2 428 × 333 pixels
5.3 500 × 479 pixels

this is worse in the title of 5.3 because the extra space move te title down the proper position:

Finally I find the bounds and fullBound of the submorphs in 5.x are absolute where in 4.5 was relative to the window, in my probable naive opinion, I think is a lot of updates when a window move versus a single update to the top morph, for example ExampleRolodex have 77 submorphs, sqPronterface have 158.

For reproducing the results, you can copy BobsUI/BobsUI-jdr.7.mcz (177KB) from the repository and create the window with:

ExampleRolodex open

beware that BobsUI, intentionally, suppress the halos, so you need to use Crtl-click or equivalent to inspect it, delete, ....




Reply | Threaded
Open this post in threaded view
|

Re: Problems with table layout in 5.x

marcel.taeumel
Hmm.... "BobsUI" uses a mix of layout policies and overrides through custom implementations of #extent: or #width: or #height:. Hmpf. Sometimes even in the same morph that actually uses such a policy. It also looks like that BobsUI fixes several layout bugs from 5.2 and before through subclassing. Unfortunately, one would have to go through all UI* classes and remove all those changes (or hacks).

I do not have the resources to do that now. :-( What needs to be done is to replace all hacks in #width: and #height: (etc.) with proper configuration of layout properties (i.e., #hResizing, #vResizing, ...)

The one thing you can easily fix is to replace all "#cellInset:" calls with "#cellGap:", which is explained in the Squeak 5.3 release notes.

Best,
Marcel

Am 19.01.2021 11:21:46 schrieb Marcel Taeumel <[hidden email]>:

Hi Javier,

until then: Take a look at the 5.3 release notes under "compatibility notes".

Best,
Marcel

Am 19.01.2021 11:11:23 schrieb Marcel Taeumel <[hidden email]>:

Hi Javier,

this is most likely a configuration issue and thus easy to fix in your code. I will take a look at BobsUI/BobsUI-jdr.7.mcz and "ExampleRolodex open".

In 5.3, we added tests for TableLayout and fixed several bugs. Yet, some "unexpected behavior" might have changed, which client code maybe relied on until now -- to be addressed in that client code. But maybe there are more bugs to fix and tests to write. :-)

Best,
Marcel

Am 18.01.2021 22:29:00 schrieb Javier Diaz-Reinoso via Squeak-dev <[hidden email]>:

After finish all the features for version 1.0.0  in my port of Pronterface in squeak 4.5:
I am trying to test in squeak 5.3 but I encounter problems with BobsUI who is the framework I am using.

BobsUI use a lot of nested UIAlignmentMorphs and the layout of that is mostly OK, but the problem appears in a UIGroupBoxMorph, in this morph the top submorph are only two: a label (UIStringMorph) and a container (UIMorph) who have the submorphs of the widgets of the group, this image show the problem between squeak 4.5 and 5.3, this is using the basic example of BobsUi called ExampleRolodex:
Tracing the execution of the creation of the morphs I find the problem in Morph>>adjustLayoutBounds reverting the version "mt 8/22/2019" to "ar 11/12/2000" restore the view (mostly) to the version 5.2.

From the tracing I see changes in the order of the selectors who are used to evaluate the size of the tree of submorphs; appears to be that the old version (4.5) always wait to obtain the size of the "leaves" of the tree of submorphs before updating the top submorphs, I think the actual version fix some sizes prematurely.

This is also apparent in other problem who is present in 5.2 and 5.3 but not in 4.5, 5.1, this image show the top of the UIWindowMorph (4.5 and 5.2):

appears the title (UITitleBarMorph) size is fixed before the (last) UIGroupBoxMorph of the window is evaluated.

Also in 5.3 (not in 5.2 and before) there is a lot of extra space around the widgets, the UIWindowMorph size are:
4.5 429 × 337 pixels
5,1 438 × 363 pixels, appears to be a change of fonts in the system
5.2 428 × 333 pixels
5.3 500 × 479 pixels

this is worse in the title of 5.3 because the extra space move te title down the proper position:

Finally I find the bounds and fullBound of the submorphs in 5.x are absolute where in 4.5 was relative to the window, in my probable naive opinion, I think is a lot of updates when a window move versus a single update to the top morph, for example ExampleRolodex have 77 submorphs, sqPronterface have 158.

For reproducing the results, you can copy BobsUI/BobsUI-jdr.7.mcz (177KB) from the repository and create the window with:

ExampleRolodex open

beware that BobsUI, intentionally, suppress the halos, so you need to use Crtl-click or equivalent to inspect it, delete, ....




Reply | Threaded
Open this post in threaded view
|

Re: Problems with table layout in 5.x

Squeak - Dev mailing list

On 19 Jan 2021, at 06:50, Marcel Taeumel <[hidden email]> wrote:

Hmm.... "BobsUI" uses a mix of layout policies and overrides through custom implementations of #extent: or #width: or #height:. Hmpf. Sometimes even in the same morph that actually uses such a policy. It also looks like that BobsUI fixes several layout bugs from 5.2 and before through subclassing. Unfortunately, one would have to go through all UI* classes and remove all those changes (or hacks).

I do not have the resources to do that now. :-( What needs to be done is to replace all hacks in #width: and #height: (etc.) with proper configuration of layout properties (i.e., #hResizing, #vResizing, ...)

The one thing you can easily fix is to replace all "#cellInset:" calls with "#cellGap:", which is explained in the Squeak 5.3 release notes.

Best,
Marcel

[... cut ...]

You are blaming indeterminate hacks in BobosUi for the problems, al least for the UIGroupBoxMorph problem that is not correct. I now extracted that morph from BobsUi to  UISimpleGroupBoxMorph removing all instances and selectors who are not involves in the initialization, also recreated by hand the tree of morphsusing only regular morphs, this is in the workspace 'test UISimpleGroupBox.text', the result of evaluating is:



who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

As for the other problems with the UITitleBarMorph and the extra spaces, I think is also produced by bugs in the same area, after all BobsUI are not changing that area.








Screen Shot 2021-01-22 at 11.48.06.png (15K) Download Attachment
test UISimpleGroupBox.text (859 bytes) Download Attachment
UISimpleGroupBoxMorph.st (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems with table layout in 5.x

marcel.taeumel
You are blaming indeterminate hacks in BobosUi for the problems

Sorry. I was just saying, that BobsUI subclassed almost all UI classes in Morphic and made changes that override many things in the base system. For this, of course, it assumes a certain behavior (or misbhevior) in the base system. Consequently, compatibility issues could arise anywhere. :-/

>who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

Reverting this method produces many bugs. 5 tests in TableLayout fail, for example.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

Thank you, for reproducing the behavior. I will take a look at it.

Best,
Marcel

Am 22.01.2021 18:16:29 schrieb Javier Diaz-Reinoso via Squeak-dev <[hidden email]>:


On 19 Jan 2021, at 06:50, Marcel Taeumel <[hidden email]> wrote:

Hmm.... "BobsUI" uses a mix of layout policies and overrides through custom implementations of #extent: or #width: or #height:. Hmpf. Sometimes even in the same morph that actually uses such a policy. It also looks like that BobsUI fixes several layout bugs from 5.2 and before through subclassing. Unfortunately, one would have to go through all UI* classes and remove all those changes (or hacks).

I do not have the resources to do that now. :-( What needs to be done is to replace all hacks in #width: and #height: (etc.) with proper configuration of layout properties (i.e., #hResizing, #vResizing, ...)

The one thing you can easily fix is to replace all "#cellInset:" calls with "#cellGap:", which is explained in the Squeak 5.3 release notes.

Best,
Marcel

[... cut ...]

You are blaming indeterminate hacks in BobosUi for the problems, al least for the UIGroupBoxMorph problem that is not correct. I now extracted that morph from BobsUi to  UISimpleGroupBoxMorph removing all instances and selectors who are not involves in the initialization, also recreated by hand the tree of morphsusing only regular morphs, this is in the workspace 'test UISimpleGroupBox.text', the result of evaluating is:


who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

As for the other problems with the UITitleBarMorph and the extra spaces, I think is also produced by bugs in the same area, after all BobsUI are not changing that area.





Reply | Threaded
Open this post in threaded view
|

Re: Problems with table layout in 5.x

marcel.taeumel
Hi Javier.

Since UISimpleGroupBoxMorph manages the layout of label and contents, it needs a TableLayoutPolicy. Then it works as expected:



Still, I wonder why #adjustLayoutBounds does not wrap around the misaligned submorphs when not having that layout:



At least, I would expect this:


Hmmm.....

Best,
Marcel

Am 25.01.2021 12:46:14 schrieb Marcel Taeumel <[hidden email]>:

You are blaming indeterminate hacks in BobosUi for the problems

Sorry. I was just saying, that BobsUI subclassed almost all UI classes in Morphic and made changes that override many things in the base system. For this, of course, it assumes a certain behavior (or misbhevior) in the base system. Consequently, compatibility issues could arise anywhere. :-/

>who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

Reverting this method produces many bugs. 5 tests in TableLayout fail, for example.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

Thank you, for reproducing the behavior. I will take a look at it.

Best,
Marcel

Am 22.01.2021 18:16:29 schrieb Javier Diaz-Reinoso via Squeak-dev <[hidden email]>:


On 19 Jan 2021, at 06:50, Marcel Taeumel <[hidden email]> wrote:

Hmm.... "BobsUI" uses a mix of layout policies and overrides through custom implementations of #extent: or #width: or #height:. Hmpf. Sometimes even in the same morph that actually uses such a policy. It also looks like that BobsUI fixes several layout bugs from 5.2 and before through subclassing. Unfortunately, one would have to go through all UI* classes and remove all those changes (or hacks).

I do not have the resources to do that now. :-( What needs to be done is to replace all hacks in #width: and #height: (etc.) with proper configuration of layout properties (i.e., #hResizing, #vResizing, ...)

The one thing you can easily fix is to replace all "#cellInset:" calls with "#cellGap:", which is explained in the Squeak 5.3 release notes.

Best,
Marcel

[... cut ...]

You are blaming indeterminate hacks in BobosUi for the problems, al least for the UIGroupBoxMorph problem that is not correct. I now extracted that morph from BobsUi to  UISimpleGroupBoxMorph removing all instances and selectors who are not involves in the initialization, also recreated by hand the tree of morphsusing only regular morphs, this is in the workspace 'test UISimpleGroupBox.text', the result of evaluating is:


who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

As for the other problems with the UITitleBarMorph and the extra spaces, I think is also produced by bugs in the same area, after all BobsUI are not changing that area.





Reply | Threaded
Open this post in threaded view
|

Re: Problems with table layout in 5.x

marcel.taeumel
Hi Javier.

I backported that #shrinkWrap fix to 5.3. Maybe this helps a little bit. Still, UISimpleGroupBoxMorph should really have its own table layout. :-)

Best,
Marcel

Am 25.01.2021 13:41:52 schrieb Marcel Taeumel <[hidden email]>:

Hi Javier.

Since UISimpleGroupBoxMorph manages the layout of label and contents, it needs a TableLayoutPolicy. Then it works as expected:



Still, I wonder why #adjustLayoutBounds does not wrap around the misaligned submorphs when not having that layout:



At least, I would expect this:


Hmmm.....

Best,
Marcel

Am 25.01.2021 12:46:14 schrieb Marcel Taeumel <[hidden email]>:

You are blaming indeterminate hacks in BobosUi for the problems

Sorry. I was just saying, that BobsUI subclassed almost all UI classes in Morphic and made changes that override many things in the base system. For this, of course, it assumes a certain behavior (or misbhevior) in the base system. Consequently, compatibility issues could arise anywhere. :-/

>who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

Reverting this method produces many bugs. 5 tests in TableLayout fail, for example.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

Thank you, for reproducing the behavior. I will take a look at it.

Best,
Marcel

Am 22.01.2021 18:16:29 schrieb Javier Diaz-Reinoso via Squeak-dev <[hidden email]>:


On 19 Jan 2021, at 06:50, Marcel Taeumel <[hidden email]> wrote:

Hmm.... "BobsUI" uses a mix of layout policies and overrides through custom implementations of #extent: or #width: or #height:. Hmpf. Sometimes even in the same morph that actually uses such a policy. It also looks like that BobsUI fixes several layout bugs from 5.2 and before through subclassing. Unfortunately, one would have to go through all UI* classes and remove all those changes (or hacks).

I do not have the resources to do that now. :-( What needs to be done is to replace all hacks in #width: and #height: (etc.) with proper configuration of layout properties (i.e., #hResizing, #vResizing, ...)

The one thing you can easily fix is to replace all "#cellInset:" calls with "#cellGap:", which is explained in the Squeak 5.3 release notes.

Best,
Marcel

[... cut ...]

You are blaming indeterminate hacks in BobosUi for the problems, al least for the UIGroupBoxMorph problem that is not correct. I now extracted that morph from BobsUi to  UISimpleGroupBoxMorph removing all instances and selectors who are not involves in the initialization, also recreated by hand the tree of morphsusing only regular morphs, this is in the workspace 'test UISimpleGroupBox.text', the result of evaluating is:


who show the same bug, also this test work in 5.2 ans with the revert of Morph>>adjustLayoutBounds.

So I think this is a "clean" bug created for the changes in the table layout in 5.3.

As for the other problems with the UITitleBarMorph and the extra spaces, I think is also produced by bugs in the same area, after all BobsUI are not changing that area.