Parent layout height issue with max - height and setUseWebDefaults in Yoga 3.2.0
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18.9k
- Forks
- 1.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Android Platform
I'm encountering an issue with the layout behavior in the Yoga library (version 3.2.0). Here's the scenario:
-
The parent layout has a height set to auto.
-
The child layout has a height of 700px and a max - height set to 500px.
When running, the observed result is that the parent layout has a height of 700px, while the child layout has a height of 500px as expected. I noticed that setting setUseWebDefaults seems to solve this issue. However, I'm not sure if setting it only on the parent node will cause any problems.
I also wanted to inquire if setting setUseWebDefaults to true in version 3.2.0 has any performance implications.
Thank you for your time and assistance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Android layout scenario in Yoga 3.2.0 with an auto-height parent and a child constrained from 700px to 500px. Compare behavior with setUseWebDefaults enabled on the parent and determine whether the result is intended, including any performance impact; done means a confirmed diagnosis and documented guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cpp
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100