feat: RCTConvert to support UIModalPresentationStyle#43297
Conversation
cipolleschi
left a comment
There was a problem hiding this comment.
Hi @vonovak, thanks for the contribution. If we can make it non breaking, it would be better, I left a comment in the file.
There was a problem hiding this comment.
We can make it non-breaking by leaving this import here, right?
There was a problem hiding this comment.
@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
UIModalPresentationStyleis 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