-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 handling 'auto' checks in absolute layout #1689
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Could you please add tests? |
I've added three tests. The first one sets on component |
Looks like the JavaScript binding changes do not compile. See error here: https://github.com/facebook/yoga/actions/runs/10510442433/job/29131043181?pr=1689#logs |
Yay, that fixed the JavaScript build. But tests in JavaScript fail with an exception, indicating something isn't being bound correctly. https://github.com/facebook/yoga/actions/runs/10521212923/job/29151469086?pr=1689
|
Thanks! I pushed change that should fix JS tests |
|
||
final YogaNode root_child0 = createNode(config); | ||
root_child0.setPositionType(YogaPositionType.ABSOLUTE); | ||
root_child0.setPositionAuto(YogaEdge.LEFT, YogaConstants.AUTOf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More generally, I think these tests assume JNI bindings for the Java Node exist to the new API.
Annoyingly, we don't build or run Java tests in GitHub Actions right now, but it is run when we import it into Phabricator. It's usually pretty straightforward to pattern match these JNI bindings, and I can relay any build/test failures if they happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I can see that there is no setPositionAuto
function for Java too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! That and generating YogaConstants.AUTOf
(with the extraneous "f")
@NickGerleman I've pushed the fix for java. I am unsure if it works 😅 |
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: Regarding [issue](facebook#45817) with incorrect layout when `left` is set to `auto`. This PR introduces handling `auto` whenever inline or flex position is checked to be defined and it fixes above issue. ## Tests: I have run the provided unit tests and everything passes. X-link: facebook/yoga#1689 Differential Revision: D61737876 Pulled By: NickGerleman
@NickGerleman merged this pull request in 6d6f69b. |
Summary: Pull Request resolved: #46216 Regarding [issue](#45817) with incorrect layout when `left` is set to `auto`. This PR introduces handling `auto` whenever inline or flex position is checked to be defined and it fixes above issue. Changelog: [General][Fixed] - Fix handling 'auto' checks in absolute layout ## Tests: I have run the provided unit tests and everything passes. X-link: facebook/yoga#1689 Reviewed By: cipolleschi Differential Revision: D61737876 Pulled By: NickGerleman fbshipit-source-id: 531199a91c5e122b930b49725ea567cbb1d592ce
Summary: X-link: facebook/react-native#46216 Regarding [issue](facebook/react-native#45817) with incorrect layout when `left` is set to `auto`. This PR introduces handling `auto` whenever inline or flex position is checked to be defined and it fixes above issue. Changelog: [General][Fixed] - Fix handling 'auto' checks in absolute layout ## Tests: I have run the provided unit tests and everything passes. X-link: facebook/yoga#1689 Reviewed By: cipolleschi Differential Revision: D61737876 Pulled By: NickGerleman fbshipit-source-id: 531199a91c5e122b930b49725ea567cbb1d592ce
Summary:
Regarding issue with incorrect layout when
left
is set toauto
. This PR introduces handlingauto
whenever inline or flex position is checked to be defined and it fixes above issue.Tests:
I have run the provided unit tests and everything passes.