Update YGNodeStyleGetGap to return YGValue #1753

Closed
heoblitz wants to merge 2 commits from feature/gap-ygvalue into main
heoblitz commented 2024-11-26 04:36:10 -08:00 (Migrated from github.com)

Gap can be styled using both points and percentages, but YGNodeStyleGetGap currently returns a float value.

To maintain alignment with the padding and margin functionalities and allow it to be handled in bridging code, this function has been updated to return YGValue.

Gap can be styled using both `points` and `percentages`, but YGNodeStyleGetGap currently returns a float value. To maintain alignment with the `padding` and `margin` functionalities and allow it to be handled in bridging code, this function has been updated to return YGValue.
vercel[bot] commented 2024-11-26 04:36:15 -08:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yoga-website Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 3:25am
[vc]: #l7KgvMSVTP5KWNiVbbKDOb2RhhD7pPebUD0QZRgK4eM=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ5b2dhLXdlYnNpdGUiLCJyb290RGlyZWN0b3J5Ijoid2Vic2l0ZSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9mYm9wZW5zb3VyY2UveW9nYS13ZWJzaXRlLzdaNER6RUZYMmVzY3c2dGEzNUpqclpxWGJwMzMiLCJwcmV2aWV3VXJsIjoieW9nYS13ZWJzaXRlLWdpdC1mb3JrLWhlb2JsaXR6LWZlYXR1cmUtZ2FwLXlndmFsdWUtZmJvcGVuc291cmNlLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoieW9nYS13ZWJzaXRlLWdpdC1mb3JrLWhlb2JsaXR6LWZlYXR1cmUtZ2FwLXlndmFsdWUtZmJvcGVuc291cmNlLnZlcmNlbC5hcHAifX1dfQ== **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more) | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yoga-website** | ✅ Ready ([Inspect](https://vercel.com/fbopensource/yoga-website/7Z4DzEFX2escw6ta35JjrZqXbp33)) | [Visit Preview](https://yoga-website-git-fork-heoblitz-feature-gap-ygvalue-fbopensource.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/yoga-website-git-fork-heoblitz-feature-gap-ygvalue-fbopensource.vercel.app?via=pr-comment-feedback-link) | Dec 9, 2024 3:25am |
NickGerleman (Migrated from github.com) approved these changes 2024-11-26 12:31:13 -08:00
NickGerleman (Migrated from github.com) left a comment

Oof. Thanks for noticing this.

It will end up being a breaking change, but we just cut a branch, and I think it would be better to do this then to introduce a new overlap for having the right behavior.

Oof. Thanks for noticing this. It will end up being a breaking change, but we just cut a branch, and I think it would be better to do this then to introduce a new overlap for having the right behavior.
facebook-github-bot commented 2024-11-26 12:31:37 -08:00 (Migrated from github.com)

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D66513236).
heoblitz commented 2024-11-26 16:36:39 -08:00 (Migrated from github.com)

@NickGerleman I accidentally closed the PR while rebasing.

I've combined the previous commits into one. Please take a look when you have time. Thank you.

@NickGerleman I accidentally closed the PR while rebasing. I've combined the previous commits into one. Please take a look when you have time. Thank you.
facebook-github-bot commented 2024-11-27 11:04:15 -08:00 (Migrated from github.com)

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D66513236).
NickGerleman commented 2024-11-27 12:19:14 -08:00 (Migrated from github.com)

We seem to be crashing in Java bindings with terminating due to uncaught exception of type facebook::yoga::vanillajni::YogaJniException: std::exception

Seems like we still need to update method descriptor for registerNatives? {"jni_YGNodeStyleGetGapJNI", "(JI)F", (void*)jni_YGNodeStyleGetGapJNI}, (it says it's returning a float right now).

We seem to be crashing in Java bindings with `terminating due to uncaught exception of type facebook::yoga::vanillajni::YogaJniException: std::exception` Seems like we still need to update method descriptor for `registerNatives`? `{"jni_YGNodeStyleGetGapJNI", "(JI)F", (void*)jni_YGNodeStyleGetGapJNI},` (it says it's returning a float right now).
heoblitz commented 2024-11-28 04:19:25 -08:00 (Migrated from github.com)

Oh, I missed that. I've corrected the method descriptor for registerNatives to align with the expected return type. Thank you for pointing it out.

Oh, I missed that. I've corrected the method descriptor for registerNatives to align with the expected return type. Thank you for pointing it out.
facebook-github-bot commented 2024-12-02 16:00:02 -08:00 (Migrated from github.com)

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D66513236).
facebook-github-bot commented 2024-12-09 13:48:33 -08:00 (Migrated from github.com)

@NickGerleman merged this pull request in facebook/yoga@ae2d06d0f5.

@NickGerleman merged this pull request in facebook/yoga@ae2d06d0f5056c5f28ef9732b00b9ca34a6e6c6c.

Pull request closed

Sign in to join this conversation.
No description provided.