Skip to content

feat: RCTConvert to support UIModalPresentationStyle#43297

Closed
vonovak wants to merge 2 commits into
facebook:mainfrom
vonovak:feat/UIModalPresentationStyle-RCTConvert
Closed

feat: RCTConvert to support UIModalPresentationStyle#43297
vonovak wants to merge 2 commits into
facebook:mainfrom
vonovak:feat/UIModalPresentationStyle-RCTConvert

Conversation

@vonovak

@vonovak vonovak commented Mar 2, 2024

Copy link
Copy Markdown
Contributor

Summary:

Currently, the ability to convert JS values to UIModalPresentationStyle is not present directly on RCTConvert.

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 from RCTModalHostViewManager, 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

@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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Mar 2, 2024

@cipolleschi cipolleschi left a comment

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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. 👍

@vonovak vonovak force-pushed the feat/UIModalPresentationStyle-RCTConvert branch from f28cca5 to 589635a Compare March 5, 2024 21:49
@cipolleschi

Copy link
Copy Markdown
Contributor

To set expectations: I'm going to be on PTO from tomorrow until the 28th of March.
I'll not import this PR myself, so that our internal pinging tool can ping someone else that can champion this PR on my behalf.

Perhaps @dmytrorykun or @sammy-SC can help.

@dmytrorykun

dmytrorykun commented Mar 7, 2024

Copy link
Copy Markdown

@vonovak could you please rebase on the latest main. The CI failures seem unrelated to you changes, and will likely go away.

@vonovak vonovak force-pushed the feat/UIModalPresentationStyle-RCTConvert branch from 589635a to c0a1bd4 Compare March 7, 2024 13:45
@vonovak

vonovak commented Mar 7, 2024

Copy link
Copy Markdown
Contributor Author

@vonovak could you please rebase on the latest main. The CI failures seem unrelated to you changes, and will likely go away.

@dmytrorykun CI is now green

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@dmytrorykun 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 Mar 8, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@dmytrorykun merged this pull request in 2d547a3.

@vonovak vonovak deleted the feat/UIModalPresentationStyle-RCTConvert branch March 11, 2024 12:46
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