Skip to content
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

default the RNTTestDetails to collapsed by default #44616

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react

import java.io.PrintWriter

object FBEndToEndDumpsysHelper {
fun maybeDump(prefix: String, writer: PrintWriter, args: Array<String>?) {
// no-op This is an empty implementation to stub out Meta's internal dumpsys helper.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
package com.facebook.react.uiapp

import android.os.Bundle
import com.facebook.react.FBEndToEndDumpsysHelper
import com.facebook.react.ReactActivity
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
import java.io.FileDescriptor
import java.io.PrintWriter

class RNTesterActivity : ReactActivity() {
class RNTesterActivityDelegate(val activity: ReactActivity, mainComponentName: String) :
Expand All @@ -37,4 +40,13 @@ class RNTesterActivity : ReactActivity() {
override fun createReactActivityDelegate() = RNTesterActivityDelegate(this, mainComponentName)

override fun getMainComponentName() = "RNTesterApp"

override fun dump(
prefix: String,
fd: FileDescriptor?,
writer: PrintWriter,
args: Array<String>?
) {
FBEndToEndDumpsysHelper.maybeDump(prefix, writer, args)
}
}
4 changes: 4 additions & 0 deletions packages/rn-tester/js/RNTesterAppShared.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ const RNTesterApp = ({
[dispatch],
);
React.useEffect(() => {
// Initial deeplink
Linking.getInitialURL()
.then(url => url != null && handleOpenUrlRequest({url: url}))
.catch(_ => {});
const subscription = Linking.addEventListener('url', handleOpenUrlRequest);
return () => subscription.remove();
}, [handleOpenUrlRequest]);
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/js/components/RNTTestDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function RNTTestDetails({
title: string,
theme: RNTesterTheme,
}): React.Node {
const [collapsed, setCollapsed] = React.useState(false);
const [collapsed, setCollapsed] = React.useState(true);

const content = (
<>
Expand Down