-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue where we were not applying flex end correctly when justifying #1487
Conversation
This pull request was exported from Phabricator. Differential Revision: D51383792 |
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
This pull request was exported from Phabricator. Differential Revision: D51383792 |
5ababfd
to
cc1445c
Compare
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 5b17d8503406d380d08a721e14ace22361c91cdf
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
This pull request was exported from Phabricator. Differential Revision: D51383792 |
cc1445c
to
ff59646
Compare
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 4454c7eb438b96f53a38f51d2f2180f00eb5da23
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
This pull request was exported from Phabricator. Differential Revision: D51383792 |
ff59646
to
1f015de
Compare
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 744b38b0851e843d18540d5526c506f4b29862c6
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
This pull request was exported from Phabricator. Differential Revision: D51383792 |
1f015de
to
1ff7b97
Compare
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 5addbc2fd23ac10923533f51431212e3702bcd14
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
This pull request was exported from Phabricator. Differential Revision: D51383792 |
1ff7b97
to
45d80be
Compare
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: de8fe7c172a96da7aa6dbf29fa5cd5b5a2e428a4
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
This pull request was exported from Phabricator. Differential Revision: D51383792 |
86307e5
to
0ca8725
Compare
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: d5fa5d5d0785535cb20831c8f6e705c5c369e7ad
This pull request was exported from Phabricator. Differential Revision: D51383792 |
0ca8725
to
37e72c1
Compare
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 4aaf909bfc702417ea8f83f2f288b159921c7929
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792
…ng absolute node's position Summary: Absolute nodes can be laid out by themselves and do not have to care about what is happening to their siblings. Because of this we can make `positionAbsoluteChild` the sole place where we handle this logic. Right now that is scattered around algorithm with many `if (child is absolute)` cases everywhere. This makes implementing position static a lot harder since we are relying on the CB to do all this work, not the parent. With this change the only time we set position for an absolute node and it matter (i.e. not overwritten) is in `positionAbsoluteChild` Reviewed By: NickGerleman Differential Revision: D51290723 fbshipit-source-id: d888f28edee9b5e6cdf635f8f1d109bd8f4d550a
Summary: Pull Request resolved: facebook#1482 X-link: facebook/react-native#41685 This is the final step (that I know of) to get the core features of static working. Here we turn on all of the tests and pass down the correct owner size for the call to `calculateLayoutInternal` that is in `layoutAbsoluteChild` Differential Revision: https://www.internalfb.com/diff/D51293606?entry_point=27 fbshipit-source-id: e4b0b46c984210c0c4b066046917aa67c63e7bce
…ox (facebook#1485) Summary: Pull Request resolved: facebook#1485 X-link: facebook/react-native#41686 The size of the containing block is the size of the padding box of the containing node for absolute nodes. We were looking at `containingNode->getLayout().measuredDimension(Dimension::Width)` which is the border box. So we need to subtract the border from this. Added a test that was failing before this change as well Differential Revision: https://www.internalfb.com/diff/D51330526?entry_point=27 fbshipit-source-id: d4b9a54594f83f022c48a176d91e42cc6b30c087
Differential Revision: https://www.internalfb.com/diff/D51333812?entry_point=27 fbshipit-source-id: 374d470fe405c13ae5d9921028243af5ad672d25
Summary: Tsia. Added test and accounted for parent padding Differential Revision: https://www.internalfb.com/diff/D51374086?entry_point=27 fbshipit-source-id: 6c5cde74db54681633a3373e4b6a2f67b8ac6d43
…rtain case Differential Revision: https://www.internalfb.com/diff/D51376309?entry_point=27 fbshipit-source-id: 0a7db7540d7f33854882bce1c1bceae8c3d8ee75
…ustifying Differential Revision: https://www.internalfb.com/diff/D51383625?entry_point=27 fbshipit-source-id: 34dc73ffdd04e155fa14ff8add67f4dca1fd34e6
…ng (facebook#1487) Summary: Pull Request resolved: facebook#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: bf19639b30c2376d7e28682f4b338a33041cdaf1
This pull request was exported from Phabricator. Differential Revision: D51383792 |
37e72c1
to
e69cd7a
Compare
Summary: X-link: facebook/yoga#1487 X-link: facebook/react-native#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 372835a44edff361dbd84dd92ff9f2ec844b9f9c
…ng (#41691) Summary: X-link: facebook/yoga#1487 Pull Request resolved: #41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 372835a44edff361dbd84dd92ff9f2ec844b9f9c
This pull request has been merged in b573f91. |
…ng (facebook#41691) Summary: X-link: facebook/yoga#1487 Pull Request resolved: facebook#41691 The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side. Reviewed By: NickGerleman Differential Revision: D51383792 fbshipit-source-id: 372835a44edff361dbd84dd92ff9f2ec844b9f9c
Summary:
X-link: facebook/react-native#41691
The code here was just wrong. I changed it to be the same logic as the Justify:FlexStart case, but with the flex end sides. Then I get the position for the opposite edge since we need to write to flex start side.
Reviewed By: NickGerleman
Differential Revision: D51383792