Fix wrong min-width percentage calculation for child #1015
Reference in New Issue
Block a user
No description provided.
Delete Branch "woehrl01/fix-child-percent"
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?
This PR fixes #872 by using the correct parent values instead of the grandparents.
Unfortunately that fix reveals a bug which causes two existing tests to fail, which are false negatives.
percentage_flex_basis_cross_min_height
percentage_flex_basis_main_min_width
The underlying bug is a misbehavior from the specs (https://www.w3.org/TR/css-flexbox-1/#algo-main-item).
Sadly the current algorithm takes the clamping into account. As the generated tests also have changed based on using the latest (83) chrome, it also looks that this has been a previous bug in chrome, too.
Despite the fact this PR is still valid, it just reveals another existing bug. But as Yoga does not apply to the web basis specs all together I suggest having this fix in place instead of using the wrong values for calculation. As the underlying bug (including min values for flex basis) is more predictable.
I also moved one of the tests to a different file to not get overridden by the generator.
@SidharthGuglani I highly appreciate your opinion on that one.
@emilsjolander I know it's a long time, maybe you have an idea here, too. Perhaps I also have an oversight here.
Any chance of this being merged?
Ooh this explains the test failures I was seeing.
I do think we will want to fix this, but behind a flag. For React Native, we are planning on doing a push for layout conformance, where we know there will be enough changes to require apps to migrate themselves.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.