Skip to content

Expose dirtied func in Javascript bindings#842

Closed
rmhartog wants to merge 3 commits into
react:masterfrom
rmhartog:js-dirtied-func
Closed

Expose dirtied func in Javascript bindings#842
rmhartog wants to merge 3 commits into
react:masterfrom
rmhartog:js-dirtied-func

Conversation

@rmhartog

Copy link
Copy Markdown

Yoga currently has the concept of a 'dirtied func', which is called when a Node becomes dirty, which can be useful to trigger a repaint. This PR exposes that functionality in the Javascript bindings.

@rmhartog

Copy link
Copy Markdown
Author

Hello @davidaurelio I see that you've been actively working on some things in this project, do you think you could have a look at this? CI is failing, but that's unrelated (fixed in #843). Let me know if it's not okay to tag you like this and if there is a better way to get some eyes on these PRs 😄

@davidaurelio

Copy link
Copy Markdown
Contributor

ok, let’s merge it. Which way did you test this?

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidaurelio has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@rmhartog

Copy link
Copy Markdown
Author

I ported the YGDirtiedTest to JavaScript, but had not included in the PR for some reason, my apologies. It replicates the bahaviour of the YGDirtiedTest.cpp.

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidaurelio has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@rmhartog

Copy link
Copy Markdown
Author

Noticed that the m_dirtiedFunc should also be cleaned up when the node is reset, same as the measure function, added those changes to the branch.

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidaurelio has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

openvela-robot pushed a commit to open-vela/external_yoga that referenced this pull request Jul 23, 2025
Summary:
Yoga currently has the concept of a 'dirtied func', which is called when a Node becomes dirty, which can be useful to trigger a repaint. This PR exposes that functionality in the Javascript bindings.
Pull Request resolved: react/yoga#842

Reviewed By: SidharthGuglani

Differential Revision: D13847093

Pulled By: davidaurelio

fbshipit-source-id: 41913abd6eedc46ee7d66929140e08a084f23972
liujinye-sys pushed a commit to open-vela/external_yoga that referenced this pull request Dec 16, 2025
Summary:
Yoga currently has the concept of a 'dirtied func', which is called when a Node becomes dirty, which can be useful to trigger a repaint. This PR exposes that functionality in the Javascript bindings.
Pull Request resolved: react/yoga#842

Reviewed By: SidharthGuglani

Differential Revision: D13847093

Pulled By: davidaurelio

fbshipit-source-id: 41913abd6eedc46ee7d66929140e08a084f23972
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants