Last 12 weeks · 23 commits
5 of 6 standards met
Summary: This commit introduces support for the CSS property in Yoga. The implementation includes the ability to set and get the value on Yoga nodes, which is preserved for host renderers but does not affect layout calculations. Changes include: New methods for setting and getting in C++, Java, and JavaScript emitters. Updates to the YogaNode and Style classes to handle the property. Tests to ensure correct functionality and serialization of values. Documentation updates to reflect the new property.
Fixes facebook/yoga#1934 YGPersistenceTest mixed_shared_and_owned_children used vector insert at begin plus one. GCC 16 with O2 or O3 reports a false array bounds warning, and the tests are built with warnings as errors. The test now builds the three child pointers explicitly and passes that list to setChildren, which is the same layout without insert.
Closes #749 and possibly #1574 The current layout algorithm sometimes rounds down by a small value the size of text nodes, which makes the renderer (at least iOS) skip a line of text, resulting in buggy layout like this: I don't have a deep enough understanding of the algorithm to know if this fix is "correct", but what I can say is that: it didn't break existing tests we didn't get any bug reports while using it in a production app I only applied the change to the height calculation as I only encountered the issue on height, but I suppose width could benefit from a similar change.
Repository: react/yoga. Description: Yoga is an embeddable layout engine targeting web standards. Stars: 18888, Forks: 1554. Primary language: C++. Languages: C++ (48.3%), Java (23.1%), TypeScript (22.3%), HTML (2.6%), Kotlin (1.8%). License: MIT. Homepage: https://yogalayout.dev/ Latest release: v3.2.1 (1y ago). Open PRs: 63, open issues: 103. Last activity: 19h ago. Community health: 62%. Top contributors: NickGerleman, vjeux, davidaurelio, joevilches, SidharthGuglani-zz, priteshrnandgaonkar, woehrl01, splhack, passy, d16r and others.