Skip to content
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

Add ImageSource and ImageRequest to generate custom NativeState #34910

Closed
wants to merge 2 commits into from

Conversation

cipolleschi
Copy link
Contributor

Summary:
This Diff adds supports on the CustomState generation for ImageSource and ImageRequests, to enable NativeComponents to use the ImageSource loading provided by React Native.

To achieve this, I also had to fox some errors in the imports and to introduce some functions to decorate parameters.

This diff also introduces the tests for thise additional types in both generators and parsers.

Changelog

[General][Added] - add support for ImageSource and ImageRequest in the State.

Reviewed By: cortinico

Differential Revision: D39884889

Riccardo Cipolleschi and others added 2 commits October 9, 2022 11:16
Summary:
Pull Request resolved: facebook#34796

This diff introduces the generation of custom native states using basic types as we do with the Props.

To make it work, the custom types are already writte in the Props.h file, therefore the State.h file must import that other file to have access to the required types.

This diff adds and updates the tests for the State.

## Changelog
[General][Added] - Generate custom Native State

Differential Revision: https://internalfb.com/D39816763

fbshipit-source-id: 2753722abd0272140c03fc4b8e8313b47649a23a
Summary:
This Diff adds supports on the CustomState generation for ImageSource and ImageRequests, to enable NativeComponents to use the ImageSource loading provided by React Native.

To achieve this, I also had to fox some errors in the imports and to introduce some functions to decorate parameters.

This diff also introduces the tests for thise additional types in both generators and parsers.

## Changelog
[General][Added] - add support for ImageSource and ImageRequest in the State.

Reviewed By: cortinico

Differential Revision: D39884889

fbshipit-source-id: 91701ffde71a8fe1f60e33f9099b93a7770d216e
@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 fb-exported labels Oct 9, 2022
@facebook-github-bot
Copy link
Contributor

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

@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Oct 9, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,747,600 -11
android hermes armeabi-v7a 7,149,388 -7
android hermes x86 8,058,592 +4
android hermes x86_64 8,029,509 -15
android jsc arm64-v8a 9,608,504 -14
android jsc armeabi-v7a 8,373,772 +4
android jsc x86 9,555,786 +2
android jsc x86_64 10,148,316 -8

Base commit: 7227bde
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 7227bde
Branch: main

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cipolleschi in d7c4136.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 10, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
…book#34910)

Summary:
Pull Request resolved: facebook#34910

This Diff adds supports on the CustomState generation for ImageSource and ImageRequests, to enable NativeComponents to use the ImageSource loading provided by React Native.

To achieve this, I also had to fox some errors in the imports and to introduce some functions to decorate parameters.

This diff also introduces the tests for thise additional types in both generators and parsers.

## Changelog
[General][Added] - add support for ImageSource and ImageRequest in the State.

Reviewed By: cortinico

Differential Revision: D39884889

fbshipit-source-id: ae3d2d51dfe6a4fe688dc78fec83f428beb8d443
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 Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants