-
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 centering absolute nodes correctly when justifying #1489
Conversation
This pull request was exported from Phabricator. Differential Revision: D51383625 |
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
This pull request was exported from Phabricator. Differential Revision: D51383625 |
05bc3d5
to
dc0f33d
Compare
…ustifying (facebook#1489) Summary: Pull Request resolved: facebook#1489 X-link: facebook/react-native#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 234f6f0984217db26387ddef79fc4b2f8ba969f6
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
This pull request was exported from Phabricator. Differential Revision: D51383625 |
dc0f33d
to
4ce96fd
Compare
…ustifying (facebook#1489) Summary: Pull Request resolved: facebook#1489 X-link: facebook/react-native#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 129388409ffcf35e8c8c840f6fdb1daed748efc1
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
This pull request was exported from Phabricator. Differential Revision: D51383625 |
…ustifying (facebook#1489) Summary: Pull Request resolved: facebook#1489 X-link: facebook/react-native#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 68a55f3a690204eeb3ab495272a5f6bf0a35516b
4ce96fd
to
4192598
Compare
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
This pull request was exported from Phabricator. Differential Revision: D51383625 |
4192598
to
e776529
Compare
…ustifying (facebook#1489) Summary: Pull Request resolved: facebook#1489 X-link: facebook/react-native#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 54d33bbe10ac5a551e139f5aaca4ee6cd7f9018d
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
This pull request was exported from Phabricator. Differential Revision: D51383625 |
e776529
to
4109b38
Compare
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
This pull request was exported from Phabricator. Differential Revision: D51383625 |
a901cfc
to
953e306
Compare
…ustifying (facebook#1489) Summary: Pull Request resolved: facebook#1489 X-link: facebook/react-native#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 2a0a45aaf73949bfdc8daa1721f78eadaa7715ff
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625
…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: 2b88199d938bb0145eb492a9718ba2a57fee2c7f
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: 6837a5e6057f0bbce401f91c23989f5bc602800d
…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: 432d878ceecd9ff8dad16a6751a98a2d9b803037
Differential Revision: https://www.internalfb.com/diff/D51333812?entry_point=27 fbshipit-source-id: 5aff8bec70bcb0870424dfe0ce98db41456b7aa2
Summary: Tsia. Added test and accounted for parent padding Differential Revision: https://www.internalfb.com/diff/D51374086?entry_point=27 fbshipit-source-id: b3e67c5c27e8d1abb65aa81df3a3835f153300d4
…rtain case Differential Revision: https://www.internalfb.com/diff/D51376309?entry_point=27 fbshipit-source-id: 57e8c2a79fa1503e5969b5c26329bd425d88abb8
…ustifying (facebook#1489) Summary: Pull Request resolved: facebook#1489 X-link: facebook/react-native#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 9fc4507a79aa418489aa9beba09e7f64701bfb5e
This pull request was exported from Phabricator. Differential Revision: D51383625 |
953e306
to
a666120
Compare
…ustifying Summary: X-link: facebook/yoga#1489 X-link: facebook/react-native#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 6bbbace95689ef39c35303bea4b99505952df457
…ustifying (#41690) Summary: X-link: facebook/yoga#1489 Pull Request resolved: #41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 6bbbace95689ef39c35303bea4b99505952df457
This pull request has been merged in 897f9b7. |
…ustifying (facebook#41690) Summary: X-link: facebook/yoga#1489 Pull Request resolved: facebook#41690 Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child Reviewed By: NickGerleman Differential Revision: D51383625 fbshipit-source-id: 6bbbace95689ef39c35303bea4b99505952df457
Summary:
X-link: facebook/react-native#41690
Centering involves centering the margin box in the content box of the parent, and then getting the distance from the flex start edge of the parent to the child
Reviewed By: NickGerleman
Differential Revision: D51383625