From 35f3335efc88efced75aa1db1bb379cf0872831a Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 6 Dec 2022 08:39:20 -0800 Subject: [PATCH] Fix `yg_positionType` ordinals (#1183) Summary: Fixes https://github.com/facebook/yoga/issues/1179 https://github.com/facebook/yoga/commit/fc88b2f774f0ab9090d7ca15de6680f26d7285ad shifted ordinals for the position enum, but only updated a limited set of code for the new values. Binding generation has since been fixed, but https://github.com/facebook/yoga/issues/1179 seems to be another case where the ordinal offsetting means that `yg_positionType` of a `YogaLayout` view does not work correctly. Update the ordinals in accordance with the ordering in YogaPositionType which the integer value is converted to. Using "static" (the new position type) directly gives a compilation error due to it being a reserved keyword, so I added it as "position_static" along with aliases to other properties with the same naming scheme for consistency. Pull Request resolved: https://github.com/facebook/yoga/pull/1183 Reviewed By: lunaleaps Differential Revision: D41741955 Pulled By: NickGerleman fbshipit-source-id: 2b035eb38d9efea19af652e5f05c02b0be402d54 --- .github/workflows/validate-android.yml | 2 +- android/src/main/res/values/attrs.xml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate-android.yml b/.github/workflows/validate-android.yml index 1850dbd6..4935fb27 100644 --- a/.github/workflows/validate-android.yml +++ b/.github/workflows/validate-android.yml @@ -22,4 +22,4 @@ jobs: uses: ./.github/actions/setup-android - name: Build - run: ./gradlew assemble${{ matrix.mode }} + run: ./gradlew assemble${{ matrix.mode }} --stacktrace diff --git a/android/src/main/res/values/attrs.xml b/android/src/main/res/values/attrs.xml index e30ba54f..3fca9997 100644 --- a/android/src/main/res/values/attrs.xml +++ b/android/src/main/res/values/attrs.xml @@ -2,7 +2,7 @@ @@ -130,8 +130,14 @@ - - + + + + + +