Make 'stretch' aligned children fill cross-axis in containers of undefined size in the cross-axis #171

Closed
jsendros wants to merge 1 commits from stretch-cross-axis into master
jsendros commented 2016-02-20 21:06:51 -08:00 (Migrated from github.com)

Summary: Fetched and rebased
https://github.com/facebook/css-layout/pull/145 and updated it to do 2
things:

  1. Make 'stretch' aligned children grow to fill their containers in the
    cross-axis if the cross-axis size is undefined. The added test might be
    the best explanation of this.
  2. Make sure this doesn’t decrease the frequency of the
    “simpleStackCross” optimization in a relatively complex sample
    environment.

Test Plan: Added a test: Container with 3 row directioned children and
no explicit height set. One child is of height 0, one of 0 height with
stretch alignment, and one of 150 height. Expected the 0 height child
remains of height 0, stretch grows to 150, and 150 stays the same.

Summary: Fetched and rebased https://github.com/facebook/css-layout/pull/145 and updated it to do 2 things: 1) Make 'stretch' aligned children grow to fill their containers in the cross-axis if the cross-axis size is undefined. The added test might be the best explanation of this. 2) Make sure this doesn’t decrease the frequency of the “simpleStackCross” optimization in a relatively complex sample environment. Test Plan: Added a test: Container with 3 row directioned children and no explicit height set. One child is of height 0, one of 0 height with stretch alignment, and one of 150 height. Expected the 0 height child remains of height 0, stretch grows to 150, and 150 stays the same.
lucasr commented 2016-02-22 06:53:57 -08:00 (Migrated from github.com)

Looks good, just needs the suggested cleanups. Please communicate about these changes here in #145 as this is based on his work.

Looks good, just needs the suggested cleanups. Please communicate about these changes here in #145 as this is based on his work.
jsendros commented 2016-02-22 09:55:02 -08:00 (Migrated from github.com)

The reason all the tests change in LayoutCachingTest.java is because they all have roots which are all default styled (flexDirection: column, alignItems: stretch). The width of the root changes, so the width of the leaves must change.

The reason all the tests change in LayoutCachingTest.java is because they all have roots which are all default styled (flexDirection: column, alignItems: stretch). The width of the root changes, so the width of the leaves must change.
lucasr commented 2016-02-23 04:07:59 -08:00 (Migrated from github.com)

Looks good but you should also land the generated code for each language in the repo.

Looks good but you should also land the generated code for each language in the repo.
lucasr commented 2016-02-23 05:15:55 -08:00 (Migrated from github.com)

Never mind, the commit code does have the generated code. One C# test is failing though.

Never mind, the commit code does have the generated code. One C# test is failing though.
lucasr commented 2016-03-01 15:07:42 -08:00 (Migrated from github.com)

Landed in #145

Landed in #145

Pull request closed

Sign in to join this conversation.
No description provided.