Skip to content

feat: add RawPropsParser as optional parameter to Concrete-/ComponentDescriptor#48232

Closed
hannojg wants to merge 1 commit into
facebook:mainfrom
hannojg:feat/make-raw-props-parser-constructable-by-component-descriptor-2
Closed

feat: add RawPropsParser as optional parameter to Concrete-/ComponentDescriptor#48232
hannojg wants to merge 1 commit into
facebook:mainfrom
hannojg:feat/make-raw-props-parser-constructable-by-component-descriptor-2

Conversation

@hannojg
Copy link
Copy Markdown
Contributor

@hannojg hannojg commented Dec 12, 2024

Summary:

In this PR we introduced a new mechanism for RawPropsParser to construct its RawValues directly from jsi::Value instead of converting it to folly::dynamic first:

In this PR we added a parameter to RawPropsParser to opt-into using the above described mechanism:

Whats missing is that RawPropsParser was default constructed in ComponentProvider and there is no way to pass a custom instance (where you'd for example set the above described parameter). This PR adds support for that.

Changelog:

[INTERNAL] [ADDED] - Add RawPropsParser as optional parameter to Concrete-/ComponentDescriptor

Test Plan:

Internal change, just make sure all CI tests are passing.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 12, 2024
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Dec 12, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Dec 12, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@javache merged this pull request in 9dce262.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @hannojg in 9dce262

When will my fix make it into a release? | How to file a pick request?

facebook-github-bot pushed a commit that referenced this pull request Dec 12, 2024
Summary:
In this PR we added a change that allows the RawPropsParser to construct its RawValues directly from the `jsi::Value` instead of converting it to `folly::dynamic` first.
We added a global feature flag to turn this on, however, for migrations it might be better to use this functionality as an opt-in on a component basis. With this change `ComponentDescriptors` can now create their RawPropsParser instance with the `useRawPropsJsiValue` flag to opt into it.

(Note: a few more changes are needed to make this accessible to the `ComponentDescriptor`, for which I opened [this follow up PR here](#48232))

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [ADDED] - Added `useRawPropsJsiValue` parameter to `RawPropsParser` to opt into skipping folly::dynamic conversions during prop parsing.

Pull Request resolved: #48231

Test Plan: Internal change / just make sure all tests are passing.

Reviewed By: NickGerleman

Differential Revision: D67139641

Pulled By: javache

fbshipit-source-id: 5b243edb8149870aad0a5a1b3998ee67997783d7
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. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants