Skip to content
Merged
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
7 changes: 4 additions & 3 deletions Libraries/YellowBox/UI/YellowBoxList.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class YellowBoxList extends React.Component<Props, State> {
}

const listStyle = {
width: Platform.OS === 'win32' ? '85%' : undefined,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's going wrong here that we need the width on win32 but not the other platforms?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On mobile, the Yellow Box covers the entire screen, and the Dismiss All button is rendered at the bottom.

On win32, somebody (probably Coates) made a change to show the maximum 3 warnings at the bottom of the UI. The Dismiss All button is rendered to the right. This is my hacky attempt to make sure the Dismiss All button is not covered by the warning texts.

height:
// Additional `0.5` so the (N + 1)th row can peek into view.
Math.min(items.length, MAX_ITEMS + 0.5) *
Expand Down Expand Up @@ -126,16 +127,16 @@ const styles = StyleSheet.create({
list: {
bottom: 0,
position: 'absolute',
width: Platform.OS === 'win32' ? 270 : '100%',
width: '100%',
},
dismissAll: {
bottom: Platform.OS === 'win32' ? undefined : '100%',
bottom: Platform.OS === 'win32' ? 0 : '100%',
flexDirection: 'row',
justifyContent: 'flex-end',
paddingBottom: 4,
paddingEnd: 4,
position: 'absolute',
width: Platform.OS === 'win32' ? 350 : '100%',
width: '100%',
},
safeArea: {
backgroundColor: YellowBoxStyle.getBackgroundColor(0.95),
Expand Down