Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

prevent Dialog from being uncloseable with long text #8475

Merged
merged 2 commits into from
Apr 28, 2017
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
43 changes: 26 additions & 17 deletions app/renderer/components/common/messageBox.js
Original file line number Diff line number Diff line change
@@ -118,18 +118,20 @@ class MessageBox extends ImmutableComponent {
<div className={css(styles.body)} data-test-id='msgBoxMessage'>
{this.message}
</div>
{
this.showSuppress
? <SwitchControl
// TODO: refactor SwitchControl
className={css(commonStyles.noPaddingLeft)}
rightl10nId='preventMoreAlerts'
checkedOn={this.suppress}
onClick={this.onSuppressChanged} />
: null
}
<div className={css(styles.buttons)} data-test-id='msgBoxButtons'>
{this.messageBoxButtons}
<div className={css(this.showSuppress && styles.actions)}>
{
this.showSuppress
? <SwitchControl
// TODO: refactor SwitchControl
className={css(commonStyles.noPaddingLeft)}
rightl10nId='preventMoreAlerts'
checkedOn={this.suppress}
onClick={this.onSuppressChanged} />
: null
}
<div className={css(styles.buttons)} data-test-id='msgBoxButtons'>
{this.messageBoxButtons}
</div>
</div>
</div>
</Dialog>
@@ -142,24 +144,31 @@ const styles = StyleSheet.create({
},
container: {
outline: 'none',
display: 'block'
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between'
},
title: {
fontWeight: 'bold',
fontSize: '12pt',
marginBottom: globalStyles.spacing.dialogInsideMargin,
userSelect: 'text'
},
body: {
marginTop: globalStyles.spacing.dialogInsideMargin,
minWidth: '425px',
marginBottom: globalStyles.spacing.dialogInsideMargin,
userSelect: 'text'
userSelect: 'text',
maxHeight: 'calc(80vh - 220px)',
overflowY: 'auto',
overflowX: 'hidden'
},
actions: {
display: 'flex',
justifyContent: 'space-between'
},
buttons: {
display: 'flex',
justifyContent: 'flex-end',
marginTop: globalStyles.spacing.dialogInsideMargin
justifyContent: 'flex-end'
}
})

6 changes: 5 additions & 1 deletion app/renderer/components/styles/commonStyles.js
Original file line number Diff line number Diff line change
@@ -45,7 +45,11 @@ const styles = StyleSheet.create({
// Issue #7949
padding: `${globalStyles.spacing.dialogInsideMargin} 30px`,
position: 'absolute',
top: globalStyles.spacing.dialogTopOffset
top: globalStyles.spacing.dialogTopOffset,
// Issue #7930
boxSizing: 'border-box',
maxWidth: '600px',
maxHeight: `calc(80vh - ${globalStyles.spacing.downloadsBarHeight})`
},

// itemList.less
2 changes: 1 addition & 1 deletion app/renderer/components/styles/global.js
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ const globalStyles = {
buttonHeight: '25px',
buttonWidth: '25px',
navbarHeight: '36px',
downloadsBarHeight: '50px',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

looking at the component and at variables.less it actually never was 50px

downloadsBarHeight: '60px',
tabsToolbarHeight: '26px',
tabPagesHeight: '7px',
bookmarkHangerMaxWidth: '350px',