From 579d37ec2af595aca5dac3d52662b49b6ed9ca2d Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Tue, 19 Nov 2024 11:59:34 -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. Differential Revision: D66138361 --- .../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 ac4dfcde91e0..bb21fe5dcaf0 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;