Skip to content

Commit

Permalink
Add mobile yoga tree captures (facebook#1640)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#1640

Added two captures that were captured from a mobile device.

**profile-ios**: A profile-like view with a central picture and some text information underneath. Captured on iOS device
**feed-android** A feed-like view with a scrollable list of images and text. Captured on Android device.

Fixed a bug that would not deserialize undefined values

Reviewed By: NickGerleman

Differential Revision: D55712235

fbshipit-source-id: ed32b393c088c695d8191149c729e51008df4e7e
  • Loading branch information
joevilches authored and facebook-github-bot committed Apr 5, 2024
1 parent 6f10656 commit 194f83d
Show file tree
Hide file tree
Showing 3 changed files with 12,297 additions and 0 deletions.
7 changes: 7 additions & 0 deletions benchmark/TreeDeserialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ static inline bool isAuto(json& j) {
return j.is_string() && j == "auto";
}

static inline bool isUndefined(json& j) {
return j.is_string() && j == "undefined";
}

static inline std::string invalidArgumentMessage(
const std::string& arg,
const std::string& enumName) {
Expand Down Expand Up @@ -142,6 +146,9 @@ YGUnit unitFromJson(json& j) {
if (isAuto(j)) {
return YGUnitAuto;
}
if (isUndefined(j)) {
return YGUnitUndefined;
}

std::string unit = j["unit"];
if (unit == "px") {
Expand Down
Loading

0 comments on commit 194f83d

Please sign in to comment.