YGPersistentNodeCloningTest #1813

Closed
NickGerleman wants to merge 1 commits from export-D75572762 into main
NickGerleman commented 2025-05-30 13:09:15 -07:00 (Migrated from github.com)

Summary:
This adds a unit test to Yoga, which emulates the model of "persistent Yoga nodes" and cloning used by React Fabric, including the private (but relied on) Yoga APIs.

It models the over-invalidation exposed in D75287261, which reproduces (due to Yoga incorrectly measuring flex-basis under fit-content, and that constraint changing when sibling changes) but this test for now sets a definite height on A, to show that we only clone what is neccesary, when measure constraints do not have to change.

Having a minimal version of Fabric's model in Yoga unit tests should make some of these interesting interactions a bit easier to debug.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D75572762

Summary: This adds a unit test to Yoga, which emulates the model of "persistent Yoga nodes" and cloning used by React Fabric, including the private (but relied on) Yoga APIs. It models the over-invalidation exposed in D75287261, which reproduces (due to Yoga incorrectly measuring flex-basis under fit-content, and that constraint changing when sibling changes) but this test for now sets a definite height on A, to show that we only clone what is neccesary, when measure constraints do not have to change. Having a minimal version of Fabric's model in Yoga unit tests should make some of these interesting interactions a bit easier to debug. Changelog: [Internal] Reviewed By: javache Differential Revision: D75572762
vercel[bot] commented 2025-05-30 13:09:18 -07:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yoga-website Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 2:04am
[vc]: #2soHsNOVe4MLh2dln6UpQzZ7vWZx7l4SlVr5dnI0Pb0=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ5b2dhLXdlYnNpdGUiLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vZmJvcGVuc291cmNlL3lvZ2Etd2Vic2l0ZS80NFlnNHZYYUJiWnM5OHF4Nzc5QWllS0NVemdHIiwicHJldmlld1VybCI6InlvZ2Etd2Vic2l0ZS1naXQtZm9yay1uaWNrZ2VybGVtYW4tZXhwb3J0LWQtZjJlNjU0LWZib3BlbnNvdXJjZS52ZXJjZWwuYXBwIiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6InlvZ2Etd2Vic2l0ZS1naXQtZm9yay1uaWNrZ2VybGVtYW4tZXhwb3J0LWQtZjJlNjU0LWZib3BlbnNvdXJjZS52ZXJjZWwuYXBwIn0sInJvb3REaXJlY3RvcnkiOiJ3ZWJzaXRlIn1dfQ== **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more) | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yoga-website** | ✅ Ready ([Inspect](https://vercel.com/fbopensource/yoga-website/44Yg4vXaBbZs98qx779AieKCUzgG)) | [Visit Preview](https://yoga-website-git-fork-nickgerleman-export-d-f2e654-fbopensource.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/yoga-website-git-fork-nickgerleman-export-d-f2e654-fbopensource.vercel.app?via=pr-comment-feedback-link) | Jun 3, 2025 2:04am |
facebook-github-bot commented 2025-05-30 13:09:22 -07:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D75572762

This pull request was **exported** from Phabricator. Differential Revision: [D75572762](https://www.internalfb.com/diff/D75572762)
facebook-github-bot commented 2025-06-02 17:15:58 -07:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D75572762

This pull request was **exported** from Phabricator. Differential Revision: [D75572762](https://www.internalfb.com/diff/D75572762)
facebook-github-bot commented 2025-06-02 19:02:28 -07:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D75572762

This pull request was **exported** from Phabricator. Differential Revision: [D75572762](https://www.internalfb.com/diff/D75572762)
facebook-github-bot commented 2025-06-02 19:35:40 -07:00 (Migrated from github.com)

This pull request has been merged in facebook/yoga@1232761571.

This pull request has been merged in facebook/yoga@123276157121f8d87d1245f94cf5f87edeeb18b6.

Pull request closed

Sign in to join this conversation.
No description provided.