-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
feat: RCTConvert to support UIModalPresentationStyle #43297
feat: RCTConvert to support UIModalPresentationStyle #43297
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vonovak, thanks for the contribution. If we can make it non breaking, it would be better, I left a comment in the file.
@@ -5,16 +5,9 @@ | |||
* LICENSE file in the root directory of this source tree. | |||
*/ | |||
|
|||
#import <React/RCTConvert.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make it non-breaking by leaving this import here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cipolleschi yes, that works, I've put it back. 👍
f28cca5
to
589635a
Compare
To set expectations: I'm going to be on PTO from tomorrow until the 28th of March. Perhaps @dmytrorykun or @sammy-SC can help. |
@vonovak could you please rebase on the latest |
589635a
to
c0a1bd4
Compare
@dmytrorykun CI is now green |
@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@dmytrorykun merged this pull request in 2d547a3. |
Summary:
Currently, the ability to convert JS values to
UIModalPresentationStyle
is not present directly onRCTConvert
.In the RN code base itself, there's not a lot of need to do this type of conversion, but in community modules, presenting ViewControllers can be a fairly common scenario and it'd be nice to be able to use this conversion directly from
RCTConvert
, rather than fromRCTModalHostViewManager
, as it'd improve its "discoverability" and consistency.If someone relied on this, then it's technically speaking a breaking change but I'd say it's for the better, and searching#import <React/RCTModalHostViewManager.h>
on github doesn't reveal a lot of results.Changelog:
[IOS] [ADDED] - RCTConvert to support UIModalPresentationStyle
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Test Plan:
Tested using RN Tester
modal_presentation.mp4