flexBasis
doesn't recalculate when rotating the screen
#1552
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Actual:
(red line denotes landscape mode height)
Expected:
Steps to reproduce
Run Expo go in landscape. Scan the QR code to open the app. Rotate phone. Bug. (Android)
React Native Version
0.72.9
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@szmarczak/crabby-orange-coffee
Screenshots and Videos
Yoga has known bug around flex basis invalidation that this might be running into. There have been a couple of different attempts to solve over the years from different people, but IIRC previous attempts led to breaks, either bc of implementation doing something wrong, or because product code relied on incorrectly stale flex basis.
Needs another look, since folks seem to run into this fairly regularly.
Code for reference.
be72b8e8aa/yoga/algorithm/CalculateLayout.cpp (L104)
Rolling out WebFlexBasis has caused breakage before on internal surfaces, but I this may be an implementation issue instead of breaking change. E.g. I think using generation count equality as the dirty test in ExperimentalWebFlexBasis is wrong, since we can compute the flex basis of the same node, under different constraints, in the same layout generation.
@rozele FYI