Skip to content

Add codegen for DimensionType diffing #52242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

lenaic
Copy link

@lenaic lenaic commented Jun 24, 2025

Summary:
Codegen supports DimensionType props which represents a YGValue. This diff adds a conversion to folly::dynamic supporting all the existing value types YGValue can represent.

This completes codegen support for all allowed ReservedPropTypeAnnotation prop types.

Changelog: [Internal]

Differential Revision: D77234061

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jun 24, 2025
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

lenaic pushed a commit to lenaic/react-native-macos that referenced this pull request Jun 25, 2025
Summary:
Pull Request resolved: facebook#52242

Codegen supports `DimensionType` props which represents a YGValue. This diff adds a conversion to `folly::dynamic` supporting all the existing value types `YGValue` can represent.

This completes codegen support for all allowed `ReservedPropTypeAnnotation` prop types.

Changelog: [Internal]

Differential Revision: D77234061
@lenaic lenaic force-pushed the export-D77234061 branch from 83bcaf1 to f8249fe Compare June 25, 2025 01:07
Nick Lefever added 2 commits June 25, 2025 05:36
Summary:

Add support for converting string and int32 enum types to `folly::dynamic` and generating the correct property diffing for it conditionally adding the prop value to the prop diff result.

This diff updates the template to convert the enum back to the original string representation provided from the JS side based on the current generated C++ enum value.

The string enum re-uses the existing `toString` conversion. The number enum generates the switch-case mapping required to map back the C++ enum value to the original value assigned to it.

Changelog: [Internal]

Differential Revision: D77234070
Summary:

Codegen supports `DimensionType` props which represents a YGValue. This diff adds a conversion to `folly::dynamic` supporting all the existing value types `YGValue` can represent.

This completes codegen support for all allowed `ReservedPropTypeAnnotation` prop types.

Changelog: [Internal]

Differential Revision: D77234061
@lenaic lenaic force-pushed the export-D77234061 branch from f8249fe to 9ec286c Compare June 25, 2025 12:36
lenaic pushed a commit to lenaic/react-native-macos that referenced this pull request Jun 25, 2025
Summary:

Codegen supports `DimensionType` props which represents a YGValue. This diff adds a conversion to `folly::dynamic` supporting all the existing value types `YGValue` can represent.

This completes codegen support for all allowed `ReservedPropTypeAnnotation` prop types.

Changelog: [Internal]

Differential Revision: D77234061
@facebook-github-bot
Copy link
Contributor

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

lenaic pushed a commit to lenaic/react-native-macos that referenced this pull request Jun 25, 2025
Summary:

Codegen supports `DimensionType` props which represents a YGValue. This diff adds a conversion to `folly::dynamic` supporting all the existing value types `YGValue` can represent.

This completes codegen support for all allowed `ReservedPropTypeAnnotation` prop types.

Changelog: [Internal]

Differential Revision: D77234061
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 26, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 8c806ec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants