Skip to content

Make ModalHostViewUtils header private (#58883) - #58883

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

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

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

@meta-codesync meta-codesync Bot changed the title Make ModalHostViewUtils header private Make ModalHostViewUtils header private (#58883) Oct 6, 2026
@coado
coado force-pushed the export-D123601668 branch from 27b5869 to 454a0db Compare October 6, 2026 16:09
coado added a commit to coado/react-native that referenced this pull request Oct 6, 2026
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:
Pull Request resolved: react#58883

`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
@coado
coado force-pushed the export-D123601668 branch from 454a0db to 00b37b3 Compare October 6, 2026 16:17
@meta-codesync meta-codesync Bot closed this in 38bd21b Oct 8, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 8, 2026
@meta-codesync

meta-codesync Bot commented Oct 8, 2026

Copy link
Copy Markdown

This pull request has been merged in 38bd21b.

@facebook-github-tools

Copy link
Copy Markdown

This pull request has been reverted by db42fda.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant