Android: Add new configuration for DevSupportManager#53557
Closed
coado wants to merge 1 commit into
Closed
Conversation
j-piasecki
reviewed
Sep 3, 2025
Contributor
Contributor
cortinico
requested changes
Sep 8, 2025
Contributor
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
6989bf2 to
ba4068e
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D81684310 |
Contributor
2f31339 to
d0bd284
Compare
Contributor
d0bd284 to
e51e0c5
Compare
Contributor
e51e0c5 to
95a2b75
Compare
Contributor
95a2b75 to
a750bad
Compare
Contributor
a750bad to
dc623ee
Compare
Contributor
dc623ee to
417830c
Compare
Contributor
417830c to
f0b6713
Compare
Contributor
f0b6713 to
c25c1bd
Compare
c25c1bd to
8a31acb
Compare
cortinico
approved these changes
Oct 17, 2025
Contributor
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
8a31acb to
52c9985
Compare
52c9985 to
05417df
Compare
Summary: Following the [RFC](react-native-community/discussions-and-proposals#925), this PR adds new `DevMenuConfiguration` object and extends `ReactHost` API for passing settings to the particular `DevSupportManager`. The `DevMenuConfiguration` includes: - isDevMenuEnabled, - isShakeGestureEnabled, - areKeyboardShortcutsEnabled, ## Changelog: [ANDROID][ADDED] - Add new configuration for `RCTDevMenu` Test Plan: Tested with different configuration on `DevMenuConfiguration`: <details> <summary>Click to view code</summary> ```kt override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) fullyDrawnReporter.addReporter() maybeUpdateBackgroundColor() reactDelegate?.reactHost?.let { reactHost -> val devMenuConfiguration = DevMenuConfiguration( isDevMenuEnabled = true, isShakeGestureEnabled = false, areKeyboardShortcutsEnabled = false, ) reactHost.setDevMenuConfiguration(devMenuConfiguration) } // register insets listener to update margins on the ReactRootView to avoid overlap w/ system // bars reactDelegate?.reactRootView?.let { rootView -> val insetsType: Int = WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout() val windowInsetsListener = { view: View, windowInsets: WindowInsetsCompat -> val insets = windowInsets.getInsets(insetsType) (view.layoutParams as FrameLayout.LayoutParams).apply { setMargins(insets.left, insets.top, insets.right, insets.bottom) } WindowInsetsCompat.CONSUMED } ViewCompat.setOnApplyWindowInsetsListener(rootView, windowInsetsListener) } } ``` </details> Reviewed By: cortinico Differential Revision: D81684310 Pulled By: coado
05417df to
b92451e
Compare
Collaborator
|
This pull request was successfully merged by @coado in 4ddf2ce When will my fix make it into a release? | How to file a pick request? |
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:
Following the RFC, this PR adds new
DevMenuConfigurationobject and extendsReactHostAPI for passing settings to the particularDevSupportManager. TheDevMenuConfigurationincludes:Changelog:
[ANDROID][ADDED] - Add new configuration for
RCTDevMenuTest Plan:
Tested with different configuration on
DevMenuConfiguration:Click to view code