Skip to content
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 issues with aligning absolute nodes #1490

Closed
wants to merge 9 commits into from

Conversation

joevilches
Copy link
Contributor

Summary:
X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 4, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches added a commit to joevilches/yoga that referenced this pull request Dec 4, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: aa8f36b86eec965d1efe7ea98dabc04b1f9ec53a
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches added a commit to joevilches/yoga that referenced this pull request Dec 5, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 8ed000cea9d22af7b48f564c1898cc50ae6d6c21
joevilches added a commit to joevilches/react-native that referenced this pull request Dec 5, 2023
Summary:
X-link: facebook/yoga#1490

Pull Request resolved: facebook#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 8bf62720539d658a003b8f312755f0573c940e67
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 5, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 6, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches added a commit to joevilches/yoga that referenced this pull request Dec 6, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 56561bbba175a51a5c146e8a16acfe17fa08c1bf
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 6, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 6, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 6, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches added a commit to joevilches/yoga that referenced this pull request Dec 6, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 2d376a16ee7e0354fdae30717615aa19968d2dfe
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 6, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 6, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches added a commit to joevilches/yoga that referenced this pull request Dec 6, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 05521ba4fde245fbe099fdee6f1e5969699d755c
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 7, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 7, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 7, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches added a commit to joevilches/yoga that referenced this pull request Dec 7, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 4aebfc4a33e28e3e80e27a0bd63d8aec76ede4d6
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 7, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 7, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches added a commit to joevilches/yoga that referenced this pull request Dec 7, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: ad79166735032345bba30bbd091680faac1bd33f
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

joevilches added a commit to joevilches/yoga that referenced this pull request Dec 7, 2023
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 37794cdf83bf508dc57272bcfb3630d6996732c3
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 7, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
joevilches pushed a commit to joevilches/react-native that referenced this pull request Dec 7, 2023
Summary:
X-link: facebook/yoga#1490


In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489
Joe Vilches and others added 9 commits December 7, 2023 14:43
…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: d8f00e5d171a1a8b68787c42afcdc3b058673c2a
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: e09fe3951b5a70668ab700c1a11f872a143ea5dd
…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: e193dae4e8de7e91ccc3d490a928b71b41bb550c
Differential Revision: https://www.internalfb.com/diff/D51333812?entry_point=27

fbshipit-source-id: e750d66ab90f6556088a0e8585dcf1ccadfe58f1
Summary: Tsia. Added test and accounted for parent padding

Differential Revision: https://www.internalfb.com/diff/D51374086?entry_point=27

fbshipit-source-id: 591addee40ff1c6d8f57978f54f4c32a739427b1
…rtain case

Differential Revision: https://www.internalfb.com/diff/D51376309?entry_point=27

fbshipit-source-id: d313b302ab97cc8a5ddd18f635b5ec4d08e67297
…ustifying

Differential Revision: https://www.internalfb.com/diff/D51383625?entry_point=27

fbshipit-source-id: 9fbec9d612232c40a6882dec00789695d176a7af
Differential Revision: https://www.internalfb.com/diff/D51383792?entry_point=27

fbshipit-source-id: 5383a53aebfa55922fe857d9141c3848d5ddff58
Summary:
Pull Request resolved: facebook#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: b0fef485be6aceca694829c00d068390003262c9
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51404489

facebook-github-bot pushed a commit to facebook/litho that referenced this pull request Dec 8, 2023
Summary:
X-link: facebook/yoga#1490

X-link: facebook/react-native#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 604495d651eb67cfdcca40df9d8d3a125c5741a8
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Dec 8, 2023
Summary:
X-link: facebook/yoga#1490

Pull Request resolved: #41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 604495d651eb67cfdcca40df9d8d3a125c5741a8
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in bc5dc2d.

Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
Summary:
X-link: facebook/yoga#1490

Pull Request resolved: facebook#41692

In the previous diffs I fixed problems with justifying absolute nodes. The same issues plague aligning so I fixed them in the same way. Added tests that were failing before but now passing

Reviewed By: NickGerleman

Differential Revision: D51404489

fbshipit-source-id: 604495d651eb67cfdcca40df9d8d3a125c5741a8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants