Skip to content

Make ModalHostViewUtils header private - #58883

Open
coado wants to merge 1 commit into
react:mainfrom
coado:export-D123601668
Open

coado wants to merge 1 commit into
react:mainfrom
coado:export-D123601668

Conversation

@coado

@coado coado commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary:
react/renderer/components/modal/ModalHostViewUtils.h declares ModalHostViewScreenSize(), a per-platform helper that is only used to compute the default screen size of ModalHostViewState. Lower it from "for frameworks" to private.

It was reachable from the "for frameworks" API only because ModalHostViewState.h called it from an inline default constructor. Move that constructor out of line into ModalHostViewState.cpp, so ModalHostViewState.h no longer includes the utils header.

While here, ModalHostViewState.h now gets Float/Size from the <React/Graphics.h> umbrella instead of including the public react/renderer/graphics/Float.h directly (Size previously only arrived transitively through the utils header).

Changelog: [Internal]

Differential Revision: D123601668

Summary:
`react/renderer/components/modal/ModalHostViewUtils.h` declares `ModalHostViewScreenSize()`, a per-platform helper that is only used to compute the default screen size of `ModalHostViewState`. Lower it from "for frameworks" to private.

It was reachable from the "for frameworks" API only because `ModalHostViewState.h` called it from an inline default constructor. Move that constructor out of line into `ModalHostViewState.cpp`, so `ModalHostViewState.h` no longer includes the utils header.

While here, `ModalHostViewState.h` now gets `Float`/`Size` from the `<React/Graphics.h>` umbrella instead of including the public `react/renderer/graphics/Float.h` directly (`Size` previously only arrived transitively through the utils header).

Changelog: [Internal]

Differential Revision: D123601668
@meta-cla meta-cla 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 Oct 6, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 6, 2026
@meta-codesync

meta-codesync Bot commented Oct 6, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D123601668.

This branch has not been deployed

No deployments
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. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant