apache / royale-asjs

Apache Royale ASJS
Apache License 2.0
373 stars 116 forks source link

MXRoyale layouts issues #849

Open greg-dove opened 4 years ago

greg-dove commented 4 years ago

This issue extends from a dev list discussion and relates to MXRoyale layouts emulation.

Attached are 3 file sets.

  1. A Flex minimal reference example. This contains a single mxml applicaiton file and the results of a local build of that file (so it can be run without building if preferred)

  2. An equivalent of the Flex example, built with the current (unchanged) MXRoyale lib.

  3. An equivalent of the Flex example, built with a locally modified MXRoyale lib. The local MXRoyale modifications are also included in the zip file as the subset of files with modification (not a patch, full files). This means that it should be possible to overwrite these files into the MXRoyale lib and achieve the same results when building.

Quick explanation. The example contains: a. A minimal Grid/GridRow/GridItem test b. A couple of Horizontal Layout tests (one of which is a solitary GridItem which is a horizontal container, the second one is a nested HBox setup with a sibling)

c. A very basic Grid layout without any complexity whatsoever.

The main tests are the first 2 which allow adding buttons programmatically inside their target containers which have percentage dimensions. These tests also allow removal of the buttons. They are just to observe the layout responsiveness within the containers and also at the parent level.

Zip Fileset 3 (up top) gets closest to the original Flex and I am using it so far without issue in some deeply nested layouts in a client app. But it certainly does not address all layout issues (there are still some layout issues in GridRow/GridItem which can be observed and which I intend to come back to, for example).

This issue is posted for review, consideration and feedback. FlexTest_Reference.zip royale_without_changes.zip royale_with_MXRoyale_changes.zip

greg-dove commented 4 years ago

I have added here another fileset which includes the mxroyale changes as a 'monkeypatch' in the application files. in case that is helpful. It might be easier for testing purposes. It does have some additional minor changes in code for GridRow and GridItem, but they are not relevant (in terms of helping address issues) for the example. royale.zip