Repository navigation
Add Modal.dimAmount for Android (#60388) - #60388
Open
evankatz14 wants to merge 1 commit into
Open
evankatz14 wants to merge 1 commit into
evankatz14 wants to merge 1 commit into
Conversation
|
@evankatz14 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125038408. |
javache
requested changes
Nov 30, 2026
javache
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Abbondanzo
approved these changes
Nov 30, 2026
Abbondanzo
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
Modal.dimAmount for AndroidModal.dimAmount for Android (#60388)
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Nov 30, 2026
Summary:
Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent.
On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set.
Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version.
Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests.
Changelog:
[Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals.
[General][Deprecated] - Deprecate `Modal.backdropColor` without removing it.
Reviewed By: Abbondanzo
Differential Revision: D125038408
evankatz14
force-pushed
the
export-D125038408
branch
2 times, most recently
from
November 30, 2026 19:48
8b60f3f to
d5c5514
Compare
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Nov 30, 2026
Summary:
Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent.
On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set.
Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version.
Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests.
Changelog:
[Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals.
[General][Deprecated] - Deprecate `Modal.backdropColor` without removing it.
Reviewed By: Abbondanzo
Differential Revision: D125038408
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Nov 30, 2026
Summary:
Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent.
On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set.
Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version.
Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests.
Changelog:
[Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals.
[General][Deprecated] - Deprecate `Modal.backdropColor` without removing it.
Reviewed By: Abbondanzo
Differential Revision: D125038408
evankatz14
force-pushed
the
export-D125038408
branch
from
November 30, 2026 23:33
d5c5514 to
6b9d09f
Compare
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Nov 30, 2026
Summary: Pull Request resolved: react#60388 Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent. On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set. Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version. Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests. Changelog: [Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals. [General][Deprecated] - Deprecate `Modal.backdropColor` without removing it. Reviewed By: Abbondanzo Differential Revision: D125038408
Summary:
Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent.
On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set.
Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version.
Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests.
Changelog:
[Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals.
[General][Deprecated] - Deprecate `Modal.backdropColor` without removing it.
Reviewed By: Abbondanzo
Differential Revision: D125038408
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Dec 1, 2026
Summary:
Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent.
On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set.
Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version.
Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests.
Changelog:
[Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals.
[General][Deprecated] - Deprecate `Modal.backdropColor` without removing it.
Reviewed By: Abbondanzo
Differential Revision: D125038408
evankatz14
force-pushed
the
export-D125038408
branch
2 times, most recently
from
December 1, 2026 00:34
45a49fe to
6a99370
Compare
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Dec 1, 2026
Summary: Pull Request resolved: react#60388 Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent. On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set. Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version. Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests. Changelog: [Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals. [General][Deprecated] - Deprecate `Modal.backdropColor` without removing it. Reviewed By: Abbondanzo Differential Revision: D125038408
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Dec 1, 2026
Summary: Pull Request resolved: react#60388 Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent. On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set. Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version. Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests. Changelog: [Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals. [General][Deprecated] - Deprecate `Modal.backdropColor` without removing it. Reviewed By: Abbondanzo Differential Revision: D125038408
evankatz14
added a commit
to evankatz14/react-native
that referenced
this pull request
Dec 1, 2026
Summary: Pull Request resolved: react#60388 Add the Android-only `Modal.dimAmount` prop to control system dimming behind a non-transparent modal. The native value is clamped to `0–1` and defaults to `0.5` when omitted or reset. `transparent={true}` still disables system dimming and keeps the container transparent. On Android, explicitly setting `dimAmount` makes the JS container transparent unless an explicit `backdropColor` is provided. With `dimAmount` omitted, existing background behavior is unchanged: `transparent` takes precedence, then `backdropColor`, then `style.backgroundColor` or the white default. An explicit `dimAmount` also takes precedence over `style.backgroundColor` when neither `transparent` nor `backdropColor` is set. Deprecate `Modal.backdropColor` in the public prop types without changing its behavior. Prefer `style={{backgroundColor: ...}}` for custom container colors, except when combining a custom color with an explicit Android `dimAmount`: that combination still needs `backdropColor` in this version. Replace the duplicate Android dim-flag mask with the equivalent `addFlags(FLAG_DIM_BEHIND)` call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicit `backdropColor` precedence in the Modal integration tests. Changelog: [Android][Added] - Add `Modal.dimAmount` to configure system dimming behind non-transparent modals. [General][Deprecated] - Deprecate `Modal.backdropColor` without removing it. Reviewed By: Abbondanzo Differential Revision: D125038408
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Add the Android-only
Modal.dimAmountprop to control system dimming behind a non-transparent modal. The native value is clamped to0–1and defaults to0.5when omitted or reset.transparent={true}still disables system dimming and keeps the container transparent.On Android, explicitly setting
dimAmountmakes the JS container transparent unless an explicitbackdropColoris provided. WithdimAmountomitted, existing background behavior is unchanged:transparenttakes precedence, thenbackdropColor, thenstyle.backgroundColoror the white default. An explicitdimAmountalso takes precedence overstyle.backgroundColorwhen neithertransparentnorbackdropColoris set.Deprecate
Modal.backdropColorin the public prop types without changing its behavior. Preferstyle={{backgroundColor: ...}}for custom container colors, except when combining a custom color with an explicit AndroiddimAmount: that combination still needsbackdropColorin this version.Replace the duplicate Android dim-flag mask with the equivalent
addFlags(FLAG_DIM_BEHIND)call. Update the Android, C++, and JavaScript API snapshots, and cover prop forwarding and reset, transparent container defaults, and explicitbackdropColorprecedence in the Modal integration tests.Changelog:
[Android][Added] - Add
Modal.dimAmountto configure system dimming behind non-transparent modals.[General][Deprecated] - Deprecate
Modal.backdropColorwithout removing it.Reviewed By: Abbondanzo
Differential Revision: D125038408