mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Tweak pause overlay design, remove Step Over button (#44119)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44119 Changelog: [Internal] TSIA - following design feedback from huntie. Reviewed By: hoxyq Differential Revision: D56193523 fbshipit-source-id: 89e9fc77702e40a2f39be719c700fe9ad400a8a2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
233da7dde7
commit
3426591bbe
@@ -1175,7 +1175,6 @@ public class com/facebook/react/bridge/ReactInstanceManagerInspectorTarget : jav
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactInstanceManagerInspectorTarget$TargetDelegate;)V
|
||||
public fun close ()V
|
||||
public fun sendDebuggerResumeCommand ()V
|
||||
public fun sendDebuggerStepOverCommand ()V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/bridge/ReactInstanceManagerInspectorTarget$TargetDelegate {
|
||||
@@ -2443,7 +2442,6 @@ public abstract interface class com/facebook/react/devsupport/interfaces/DevSupp
|
||||
|
||||
public abstract interface class com/facebook/react/devsupport/interfaces/DevSupportManager$PausedInDebuggerOverlayCommandListener {
|
||||
public abstract fun onResume ()V
|
||||
public abstract fun onStepOver ()V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/devsupport/interfaces/ErrorCustomizer {
|
||||
|
||||
-8
@@ -1516,14 +1516,6 @@ public class ReactInstanceManager {
|
||||
mInspectorTarget.sendDebuggerResumeCommand();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStepOver() {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
if (mInspectorTarget != null) {
|
||||
mInspectorTarget.sendDebuggerStepOverCommand();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -42,8 +42,6 @@ public class ReactInstanceManagerInspectorTarget implements AutoCloseable {
|
||||
|
||||
public native void sendDebuggerResumeCommand();
|
||||
|
||||
public native void sendDebuggerStepOverCommand();
|
||||
|
||||
public void close() {
|
||||
mHybridData.resetNative();
|
||||
}
|
||||
|
||||
+1
-3
@@ -1191,12 +1191,10 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
pausedText.setText(message);
|
||||
View resumeButton = Assertions.assertNotNull(dialogView.findViewById(R.id.resume_button));
|
||||
resumeButton.setOnClickListener((v) -> listener.onResume());
|
||||
View stepOverButton =
|
||||
Assertions.assertNotNull(dialogView.findViewById(R.id.step_over_button));
|
||||
stepOverButton.setOnClickListener((v) -> listener.onStepOver());
|
||||
Window dialogWindow = mPausedInDebuggerDialog.getWindow();
|
||||
if (dialogWindow != null) {
|
||||
dialogWindow.setGravity(Gravity.TOP);
|
||||
dialogWindow.setBackgroundDrawableResource(R.drawable.paused_in_debugger_background);
|
||||
}
|
||||
mPausedInDebuggerDialog.show();
|
||||
});
|
||||
|
||||
-2
@@ -125,7 +125,5 @@ public interface DevSupportManager : JSExceptionHandler {
|
||||
|
||||
public interface PausedInDebuggerOverlayCommandListener {
|
||||
public fun onResume()
|
||||
|
||||
public fun onStepOver()
|
||||
}
|
||||
}
|
||||
|
||||
-8
@@ -483,14 +483,6 @@ public class ReactHostImpl implements ReactHost {
|
||||
mReactHostInspectorTarget.sendDebuggerResumeCommand();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStepOver() {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
if (mReactHostInspectorTarget != null) {
|
||||
mReactHostInspectorTarget.sendDebuggerStepOverCommand();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -26,8 +26,6 @@ internal class ReactHostInspectorTarget(private val reactHostImpl: ReactHostImpl
|
||||
|
||||
public external fun sendDebuggerResumeCommand()
|
||||
|
||||
public external fun sendDebuggerStepOverCommand()
|
||||
|
||||
override fun close() {
|
||||
mHybridData.resetNative()
|
||||
}
|
||||
|
||||
-13
@@ -88,16 +88,6 @@ void ReactInstanceManagerInspectorTarget::sendDebuggerResumeCommand() {
|
||||
}
|
||||
}
|
||||
|
||||
void ReactInstanceManagerInspectorTarget::sendDebuggerStepOverCommand() {
|
||||
if (inspectorTarget_) {
|
||||
inspectorTarget_->sendCommand(HostCommand::DebuggerStepOver);
|
||||
} else {
|
||||
jni::throwNewJavaException(
|
||||
"java/lang/IllegalStateException",
|
||||
"Cannot send command while the Fusebox backend is not enabled");
|
||||
}
|
||||
}
|
||||
|
||||
void ReactInstanceManagerInspectorTarget::registerNatives() {
|
||||
registerHybrid({
|
||||
makeNativeMethod(
|
||||
@@ -105,9 +95,6 @@ void ReactInstanceManagerInspectorTarget::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"sendDebuggerResumeCommand",
|
||||
ReactInstanceManagerInspectorTarget::sendDebuggerResumeCommand),
|
||||
makeNativeMethod(
|
||||
"sendDebuggerStepOverCommand",
|
||||
ReactInstanceManagerInspectorTarget::sendDebuggerStepOverCommand),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ class ReactInstanceManagerInspectorTarget
|
||||
delegate);
|
||||
|
||||
void sendDebuggerResumeCommand();
|
||||
void sendDebuggerStepOverCommand();
|
||||
|
||||
static void registerNatives();
|
||||
|
||||
|
||||
-13
@@ -73,25 +73,12 @@ void JReactHostInspectorTarget::sendDebuggerResumeCommand() {
|
||||
}
|
||||
}
|
||||
|
||||
void JReactHostInspectorTarget::sendDebuggerStepOverCommand() {
|
||||
if (inspectorTarget_) {
|
||||
inspectorTarget_->sendCommand(HostCommand::DebuggerStepOver);
|
||||
} else {
|
||||
jni::throwNewJavaException(
|
||||
"java/lang/IllegalStateException",
|
||||
"Cannot send command while the Fusebox backend is not enabled");
|
||||
}
|
||||
}
|
||||
|
||||
void JReactHostInspectorTarget::registerNatives() {
|
||||
registerHybrid({
|
||||
makeNativeMethod("initHybrid", JReactHostInspectorTarget::initHybrid),
|
||||
makeNativeMethod(
|
||||
"sendDebuggerResumeCommand",
|
||||
JReactHostInspectorTarget::sendDebuggerResumeCommand),
|
||||
makeNativeMethod(
|
||||
"sendDebuggerStepOverCommand",
|
||||
JReactHostInspectorTarget::sendDebuggerStepOverCommand),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -54,7 +54,6 @@ class JReactHostInspectorTarget
|
||||
|
||||
static void registerNatives();
|
||||
void sendDebuggerResumeCommand();
|
||||
void sendDebuggerStepOverCommand();
|
||||
|
||||
jsinspector_modern::HostTarget* getInspectorTarget();
|
||||
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 764 B |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 439 B |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 908 B |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
+27
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="MissingDefaultResource"
|
||||
>
|
||||
<item>
|
||||
<inset
|
||||
android:insetTop="12dp"
|
||||
>
|
||||
<shape
|
||||
android:shape="rectangle"
|
||||
android:background="@android:color/transparent"
|
||||
>
|
||||
<solid
|
||||
android:color="#FFFFC1"
|
||||
/>
|
||||
<stroke
|
||||
android:color="#D0D0B8" android:width="2dp"
|
||||
/>
|
||||
<corners
|
||||
android:radius="12dp"
|
||||
/>
|
||||
</shape>
|
||||
</inset>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
+2
-16
@@ -5,12 +5,9 @@
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#ffffc1"
|
||||
android:divider="#cacaca"
|
||||
android:gravity="center"
|
||||
android:layoutDirection="ltr"
|
||||
android:orientation="horizontal"
|
||||
android:showDividers="middle"
|
||||
tools:ignore="MissingDefaultResource"
|
||||
>
|
||||
|
||||
@@ -18,10 +15,10 @@
|
||||
android:id="@+id/paused_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingStart="14dp"
|
||||
android:text=""
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:autoSizeTextType="uniform"
|
||||
/>
|
||||
@@ -36,15 +33,4 @@
|
||||
android:paddingVertical="8dp"
|
||||
android:src="@drawable/ic_resume"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/step_over_button"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/ripple_effect"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingVertical="8dp"
|
||||
android:src="@drawable/ic_step_over"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user