Skip to content

(iOS) Add RCTUIStatusBarManager and properly retrieve StatusBar style and height#42241

Closed
okwasniewski wants to merge 3 commits into
react:mainfrom
okwasniewski:feat/statusbar-manager
Closed

(iOS) Add RCTUIStatusBarManager and properly retrieve StatusBar style and height#42241
okwasniewski wants to merge 3 commits into
react:mainfrom
okwasniewski:feat/statusbar-manager

Conversation

@okwasniewski

Copy link
Copy Markdown
Contributor

Summary:

This PR migrates from the deprecated way of retrieving the status bar info. It introduces a helper method RCTUIStatusBarManager which gets the UIStatusBarManager from the KeyWindow.

It also removes the unused getHeight method.

Changelog:

[IOS] [ADDED] - Add RCTUIStatusBarManager and properly retrieve StatusBar style and height
[IOS] [REMOVED] - Remove unused getHeight method from StatusBar

Test Plan:

CI Green, Ensure that preferredStatusBarStyle and preferredStatusBarHidden is properly retrieved for Modals

@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: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jan 11, 2024
@analysis-bot

Copy link
Copy Markdown
Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 16,769,499 -21,781
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 20,165,548 -21,069
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: cf4963f
Branch: main

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

I am not sure we can blidnly remove the getHeight methods. We might have components/apps that uses them internally.
I'll import and let our CI test them for us.

A part from that, it looks good.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@okwasniewski

okwasniewski commented Jan 12, 2024

Copy link
Copy Markdown
Contributor Author

Thanks! Let me know if I should bring it back

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 8, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in 3dfedbc.

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. p: Callstack Partner: Callstack Partner 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