From a865975ce32e695b0e01e06b1561e0fe0a5784cf Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Tue, 19 Nov 2024 15:43:04 -0800 Subject: [PATCH] Update some Justify tests following Chrome changes Summary: X-link: https://github.com/facebook/yoga/pull/1746 Chrome made some changes for how overflowed row-reverse containers are laid out which was causing some issues on CI. I updated them here and skipped the new failing tests which we would want to followup on. For LTR, the differences are seen below |Before|After| |--| |{F1962694149} | {F1962694151}| The extra space is now extending past the flex start edge vs flex end. RTL is the opposite. NickGerleman had deviated from the spec back in the day to match Chrome and it seems they made the adjustment recently. T208209388 is tracking the followup to align with the spec again. Basically, there is a notion of fallback alignment when certain justification/alignment values cannot actually apply. Right now we are falling back to flex start in all cases but we should fallback to start sometimes. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D66138361 fbshipit-source-id: c46d2e9b0cd297069b9cc544e3bded995e4867a6 --- .../react-native/ReactCommon/yoga/yoga/algorithm/Align.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/ReactCommon/yoga/yoga/algorithm/Align.h b/packages/react-native/ReactCommon/yoga/yoga/algorithm/Align.h index ac4dfcde91e..bb21fe5dcaf 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/algorithm/Align.h +++ b/packages/react-native/ReactCommon/yoga/yoga/algorithm/Align.h @@ -37,8 +37,8 @@ constexpr Align fallbackAlignment(Align align) { case Align::Stretch: return Align::FlexStart; - // Fallback to safe center. TODO: This should be aligned to Start - // instead of FlexStart (for row-reverse containers) + // Fallback to safe center. TODO (T208209388): This should be aligned to + // Start instead of FlexStart (for row-reverse containers) case Align::SpaceAround: case Align::SpaceEvenly: return Align::FlexStart; @@ -59,8 +59,8 @@ constexpr Justify fallbackAlignment(Justify align) { // case Justify::Stretch: return Justify::FlexStart; - // Fallback to safe center. TODO: This should be aligned to Start - // instead of FlexStart (for row-reverse containers) + // Fallback to safe center. TODO (T208209388): This should be aligned to + // Start instead of FlexStart (for row-reverse containers) case Justify::SpaceAround: case Justify::SpaceEvenly: return Justify::FlexStart;