You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2021/07/21 10:02:18 UTC

[GitHub] [royale-asjs] estanglerbm opened a new pull request #1135: Spark dynamic container layout

estanglerbm opened a new pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135


   Improvements to Spark containers to better support more dynamic layouts and containers.
   
   These significant changes had several goals:
   
   - Properly handle layout when adding / removing elements.
   - Fix various static layout issues.
   - Simplify lots of legacy ad-hoc code for fixing layout problems, by finding what was really necessary.
   - Fix some SWF target issues.
   
   There's still lots to fix and improve, but these changes pass more tests.  (It might also break some, but hopefully not much.)
   
   Some notable changes:
   
   - Introduction of "displayView", which is either "contentView" or "skin".  While "contentView" is about holding elements, "displayView" is a more convenient way to work with what's displayed (which includes content and decorations of the skin, if applicable), especially for sizing.
   - Containers delegate some sizing functions (i.e. measuredWidth) to the "displayView".  While beforeLayout() and afterLayout() do sync sizing of host and "displayView", it's not productive to keep trying to make sure they are 100% in sync in sizing all the time.  The "displayView" is the single source of truth, if possible.
   - Introduction of interfaces ISparkLayoutHost (for "displayView") and ISparkContainer (for "layout").
   - Changes for JS to SparkTextButtonItemRenderer to help measure before it's shown.
   
   Future potential work:
   
   - **SkinnableDataContainer**.  Still needs a fix or two to pass some tests that SkinnableContainer is passing.  In the meantime, for many uses, Spark DataGroup can be a more suitable choice.
   - **MeasurementBead in MX / Spark**.  MX UIComponent should delegate measuredWidth / measuredHeight to UIBase.measurementBead (IMeasurementBead).  MX UIComponent currently gets IMeasuredBead functions, directly, through IFlexDisplayObject.
   - **Application.setActualSize()**.  Due to Royale's lack of Flex's [commit-measure-layout cycle](https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/managers/LayoutManager.html) (and for good reason), Application.setActualSize() has to set explicit sizes on the contentView (displayView).  These are sticky, but unfortunately necessary, to avoid being clobbered by LayoutBase.layout() doing measurement.  This is just for Application without any explicit or percent sizes, which is a weird case.  Might find some better thing to do here, instead of making the explicit sizes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw commented on pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
yishayw commented on pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#issuecomment-945702474


   @estanglerbm , I would very much like to merge this PR, or ChildResize into dev so it's there for version 0.9.9. All the bugs referenced above are working both for this PR and for ChildResize. Can you think of a problem this PR solves that ChildResize does not?
   
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] estanglerbm commented on pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
estanglerbm commented on pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#issuecomment-946284656


   @yishayw Well, I haven't had time to review exactly what's in ChildResize, but there were a lot more fundamental layout problems in SparkRoyale / MXRoyale than just what handling child resize events would fix.  (I explain some of it in the description above.)  I haven't had time yet to review all my tests to tell you exactly the differences in behavior between the two.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw commented on a change in pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
yishayw commented on a change in pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#discussion_r739856757



##########
File path: frameworks/projects/SparkRoyale/src/main/royale/spark/components/SkinnableContainer.as
##########
@@ -991,9 +973,7 @@ public class SkinnableContainer extends SkinnableContainerBase implements IConta
         
         dispatchEvent(new Event("beadsAdded"));
         dispatchEvent(new Event("initComplete"));
-        if ((isHeightSizedToContent() || !isNaN(explicitHeight)) &&
-            (isWidthSizedToContent() || !isNaN(explicitWidth)))
-            dispatchEvent(new Event("layoutNeeded"));

Review comment:
       Why are these conditions no longer necessary?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] estanglerbm commented on pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
estanglerbm commented on pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#issuecomment-957112457


   Merged develop, except the parts not needed on spark-dynamic-layout.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] estanglerbm commented on pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
estanglerbm commented on pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#issuecomment-957112457


   Merged develop, except the parts not needed on spark-dynamic-layout.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] estanglerbm commented on pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
estanglerbm commented on pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#issuecomment-946495696


   @yishayw I went through the bugs to examine them real quick... some of them are actually working on develop, and another is not.  There are some things that ChildResize does not fix, in my tests (I can post later).  I still need to spend some time going through other tests and examining what is in ChildResize vs. PR #1135.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw merged pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
yishayw merged pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] yishayw commented on pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
yishayw commented on pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#issuecomment-946574778


   Cool. As I said I’m really eager to have this merged because I know how problematic layout in emulation currently is. I just want to make sure we choose the most robust solution, and hopefully have it apply to both MX and Spark.
   
   From: ***@***.***>
   Sent: Tuesday, October 19, 2021 11:46 AM
   To: ***@***.***>
   Cc: ***@***.***>; ***@***.***>
   Subject: Re: [apache/royale-asjs] Spark dynamic container layout (#1135)
   
   
   @yishayw<https://github.com/yishayw> I went through the bugs to examine them real quick... some of them are actually working on develop, and another is not. There are some things that ChildResize does not fix, in my tests (I can post later). I still need to spend some time going through other tests and examining what is in ChildResize vs. PR #1135<https://github.com/apache/royale-asjs/pull/1135>.
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub<https://github.com/apache/royale-asjs/pull/1135#issuecomment-946495696>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAQBE7LABKLHG6X3EV4TVOTUHUV5NANCNFSM5AXT5SAA>.
   Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] estanglerbm commented on pull request #1135: Spark dynamic container layout

Posted by GitBox <gi...@apache.org>.
estanglerbm commented on pull request #1135:
URL: https://github.com/apache/royale-asjs/pull/1135#issuecomment-957112457


   Merged develop, except the parts not needed on spark-dynamic-layout.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org