Update some Justify tests following Chrome changes
Some checks are pending
Label closed PR as merged and leave a comment / comment-and-label (push) Waiting to run
Publish Bumped Packages / publish_bumped_packages (push) Waiting to run
Update node modules cache / update_node_modules_cache (push) Waiting to run

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
This commit is contained in:
Joe Vilches 2024-11-19 15:43:04 -08:00 committed by Facebook GitHub Bot
parent 933356e2a6
commit a865975ce3

View File

@ -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;