Skip to content

Commit afad68f

Browse files
rayklefacebook-github-bot
authored andcommitted
Change Wrapper of InspectorPanel from View to SafeAreaView (#34500)
Summary: Currently, the `InspectorPanel` component is wrapped in `View`, which is a little difficult to click the panel button when in a device with a notch screen. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Fixed] - Change Wrapper of `InspectorPanel` from `View` to `SafeAreaView` Pull Request resolved: #34500 Test Plan: **From:** <img alt="" height="500" src="https://user-images.githubusercontent.com/3097366/186088404-32cb2707-a4f1-45d6-9f83-f0992d5ba64d.png"> <img alt="" height="500" src="https://user-images.githubusercontent.com/3097366/186088438-863fd7da-b827-4cc1-b873-f0bf38764e83.png"> **To:** <img alt="" height="500" src="https://user-images.githubusercontent.com/3097366/186088518-6e131a8e-27ae-4eed-b97d-ee6f6ab5e669.png"> <img alt="" height="500" src="https://user-images.githubusercontent.com/3097366/186088550-35ce0512-ac4f-4ef1-b5db-f2a3ec434b24.png"> <img alt="" height="500" src="https://user-images.githubusercontent.com/3097366/186088579-ff42ee60-6b1c-4179-aae8-764f4d04e680.png"> Reviewed By: cipolleschi Differential Revision: D39175153 Pulled By: lunaleaps fbshipit-source-id: cba8b78a0dd3cbac27ee098dd1bb006d7af25987
1 parent 823f6b7 commit afad68f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Libraries/Inspector/InspectorPanel.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const StyleSheet = require('../StyleSheet/StyleSheet');
1919
const Text = require('../Text/Text');
2020
const TouchableHighlight = require('../Components/Touchable/TouchableHighlight');
2121
const View = require('../Components/View/View');
22+
import SafeAreaView from '../Components/SafeAreaView/SafeAreaView';
2223

2324
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
2425

@@ -84,7 +85,7 @@ class InspectorPanel extends React.Component<Props> {
8485
contents = <View style={styles.waiting}>{this.renderWaiting()}</View>;
8586
}
8687
return (
87-
<View style={styles.container}>
88+
<SafeAreaView style={styles.container}>
8889
{!this.props.devtoolsIsOpen && contents}
8990
<View style={styles.buttonRow}>
9091
<InspectorPanelButton
@@ -108,7 +109,7 @@ class InspectorPanel extends React.Component<Props> {
108109
onClick={this.props.setTouchTargeting}
109110
/>
110111
</View>
111-
</View>
112+
</SafeAreaView>
112113
);
113114
}
114115
}

0 commit comments

Comments
 (0)