mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 11:16:06 +08:00
Updated RedBox screen (#22242)
Summary: [Re: RedBox screen is a bit scary - Discussions and Proposals](https://github.com/react-native-community/discussions-and-proposals/issues/42) Per hramos: > The RedScreen was inspired by Ruby on Rails's error screen > I do see the RedBox screen could be made less jarring while still successfully displaying all the information we need. Hence jamonholmgren came up with the idea that only the header & footer of the RedBox screen could be red. This makes the content a bit more readable as well as makes the screen a little less intimidating. Also frantic made the suggestion that since the bottom buttons are not as important, they don't need to stand out. Hence only the header of the RedBox screen which displays the error is made red. Screenshots: ---------- <div style="flex-direction: row"> <img width="325" alt="orginal" src="https://user-images.githubusercontent.com/7840686/48322916-b4958b80-e5de-11e8-9276-33378d1b41c5.png"> <img width="320" alt="redbox_v2_ios" src="https://user-images.githubusercontent.com/7840686/48665300-cce32b80-ea60-11e8-8e8f-88f74bad30ca.png"> </div> <div style="flex-direction: row"> <img width="300" alt="original_android" src="https://user-images.githubusercontent.com/7840686/48322958-d5f67780-e5de-11e8-891c-1b20bd00e67b.png"> <img width="300" alt="redbox_v2_android" src="https://user-images.githubusercontent.com/7840686/48665312-f13f0800-ea60-11e8-9fb6-47e03c809789.png"> </div> Pull Request resolved: https://github.com/facebook/react-native/pull/22242 Reviewed By: hramos Differential Revision: D13564287 Pulled By: cpojer fbshipit-source-id: fcb6ba5e20d863f4b957d20f3787f5b7a365bfdb
This commit is contained in:
committed by
Facebook Github Bot
parent
abfd563b47
commit
7fbccdea22
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item>
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="#1A1A1A" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:bottom="-2dp" android:right="-2dp" android:left="-2dp">
|
||||
<shape>
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#B3B3B3" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -19,7 +19,7 @@
|
||||
android:id="@+id/rn_frame_file"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#E6B8B8"
|
||||
android:textColor="#B3B3B3"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="monospace"
|
||||
/>
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:background="#D01926"
|
||||
/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#E80000"
|
||||
android:background="#1A1A1A"
|
||||
>
|
||||
<ListView
|
||||
android:id="@+id/rn_redbox_stack"
|
||||
@@ -53,6 +53,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/redbox_top_border_background"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/rn_redbox_dismiss_button"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<string name="catalyst_dismiss_button" project="catalyst" translatable="false">Dismiss\n(ESC)</string>
|
||||
<string name="catalyst_reload_button" project="catalyst" translatable="false">Reload\n(R,\u00A0R)</string>
|
||||
<string name="catalyst_poke_sampling_profiler" project="catalyst" translatable="false">Start/Stop Sampling Profiler</string>
|
||||
<string name="catalyst_copy_button" project="catalyst" translatable="false">Copy</string>
|
||||
<string name="catalyst_copy_button" project="catalyst" translatable="false">Copy\n</string>
|
||||
<string name="catalyst_report_button" project="catalyst" translatable="false">Report</string>
|
||||
<string name="catalyst_loading_from_url" project="catalyst" translatable="false">Loading from %1$s…</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user