-
Notifications
You must be signed in to change notification settings - Fork 138
RFC: New APIs to customise the DevMenu #925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
j-piasecki
wants to merge
9
commits into
react-native-community:main
Choose a base branch
from
j-piasecki:devmenu-customization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
RFC: New APIs to customise the DevMenu #925
j-piasecki
wants to merge
9
commits into
react-native-community:main
from
j-piasecki:devmenu-customization
+84
−0
Conversation
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
jvenene
reviewed
Aug 12, 2025
cortinico
reviewed
Aug 13, 2025
Co-authored-by: Nicola Corti <[email protected]>
Co-authored-by: Nicola Corti <[email protected]>
Co-authored-by: Nicola Corti <[email protected]>
Co-authored-by: Gabriel Donadel Dall'Agnol <[email protected]>
This was referenced Aug 29, 2025
coado
added a commit
to coado/react-native
that referenced
this pull request
Sep 11, 2025
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: vzaidman Differential Revision: D81684310 Pulled By: coado
coado
added a commit
to coado/react-native
that referenced
this pull request
Sep 15, 2025
Summary: Following the [RFC](react-native-community/discussions-and-proposals#925), this PR adds new `RCTDevMenu` configuration and extends `RCTReactNativeFactory` API for passing it to the particular `RCTHost`. The `RCTDevMenuConfiguration` includes: - isDevMenuEnabled, - isShakeGestureEnabled, - areKeyboardShortcutsEnabled ## Changelog: [IOS][ADDED] - Add new configuration for `RCTDevMenu` <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Test Plan: Tested with different configurations on `RCTDevMenuConfiguration`: <details> <summary>Click to view code</summary> ```objc - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.reactNativeFactory = [[RCTReactNativeFactory alloc] initWithDelegate:self]; #if USE_OSS_CODEGEN self.dependencyProvider = [RCTAppDependencyProvider new]; #endif RCTDevMenuConfiguration *devMenuConfiguration = [[RCTDevMenuConfiguration alloc] initWithDevMenuEnabled:true shakeGestureEnabled:false keyboardShortcutsEnabled:false]; [self.reactNativeFactory setDevMenuConfiguration:devMenuConfiguration]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; [self.reactNativeFactory startReactNativeWithModuleName:@"RNTesterApp" inWindow:self.window initialProperties:[self prepareInitialProps] launchOptions:launchOptions]; [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self]; return YES; } ``` </details> Differential Revision: D81684275 Pulled By: coado
coado
added a commit
to coado/react-native
that referenced
this pull request
Sep 15, 2025
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: vzaidman Differential Revision: D81684310 Pulled By: coado
coado
added a commit
to coado/react-native
that referenced
this pull request
Sep 15, 2025
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: vzaidman Differential Revision: D81684310 Pulled By: coado
coado
added a commit
to coado/react-native
that referenced
this pull request
Sep 17, 2025
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> Differential Revision: D81684310 Pulled By: coado
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.
Proposes new APIs that would allow frameworks to customize the DevMenu.
View the rendered RFC