Skip to content

Commit

Permalink
Merge pull request jupyterlab#54 from ellisonbg/style-updates
Browse files Browse the repository at this point in the history
Minor styling updates.
  • Loading branch information
kgryte authored Nov 7, 2019
2 parents bb509b9 + 4dd3ca0 commit 0f91548
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/comments/commenting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class CommentingWidget extends ReactWidget {
className="jp-commenting-new-thread-button"
onClick={() => this.setNewThreadActive(true)}
>
<span className="jp-newThreadIcon jp-Icon" />
<span className="jp-comment-new-thread-icon jp-Icon jp-NbCommentIcon" />
<span className="jp-commenting-new-thread-label">Start New Thread</span>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/comments/components/AppBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class AppBody extends React.Component<IAppBodyProps> {
overflowX: 'hidden' as 'hidden',
boxSizing: 'border-box' as 'border-box',
justifyContent: 'center',
padding: '4px'
padding: '8px'
},
'jp-commenting-body-area-expanded': {
width: '100%',
Expand All @@ -82,7 +82,7 @@ export class AppBody extends React.Component<IAppBodyProps> {
overflowX: 'hidden' as 'hidden',
boxSizing: 'border-box' as 'border-box',
justifyContent: 'center',
padding: '4px'
padding: '8px'
}
};
}
13 changes: 6 additions & 7 deletions src/comments/components/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export class AppHeader extends React.Component<IAppHeaderProps> {
return (
<div style={this.styles['jp-commenting-app-header-area']}>
<div style={this.styles['jp-commenting-header-area']}>
<div style={this.styles['jp-commenting-back-arrow-area']}>
{this.props.cardExpanded && this.props.target !== undefined
? this.getBackButton()
: ''}
</div>
{this.props.cardExpanded && this.props.target !== undefined && (
<div style={this.styles['jp-commenting-back-arrow-area']}>
{this.getBackButton()}
</div>
)}
{this.getAppHeader(this.props.target)}
</div>
{this.shouldRenderOptions()}
Expand Down Expand Up @@ -272,7 +272,7 @@ export class AppHeader extends React.Component<IAppHeaderProps> {
display: 'flex',
flexShrink: 1,
flexDirection: 'row' as 'row',
padding: '4px',
padding: '8px',
minWidth: '52px'
},
'jp-commenting-back-arrow-area': {
Expand All @@ -293,7 +293,6 @@ export class AppHeader extends React.Component<IAppHeaderProps> {
display: 'flex',
flexDirection: 'row' as 'row',
minWidth: '52px',
paddingLeft: '8px',
flexShrink: 1
},
'jp-commenting-header-target-icon-area': {
Expand Down
10 changes: 6 additions & 4 deletions src/comments/components/AppHeaderOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,13 @@ export class AppHeaderOptions extends React.Component<
minWidth: '52px',

textAlign: 'right' as 'right',
paddingLeft: '4px'
paddingLeft: '8px',
paddingRight: '8px'
},
'jp-commenting-header-options-showResolved-label-enable': {
fontSize: 'var(--jp-ui-font-size1)',
color: 'var(--jp-ui-font-color1)'
color: 'var(--jp-ui-font-color1)',
fontWeight: '600'
},
'jp-commenting-header-options-showResolved-label-disable': {
fontSize: 'var(--jp-ui-font-size1)',
Expand All @@ -350,7 +352,7 @@ export class AppHeaderOptions extends React.Component<
height: '24px',
display: 'flex',
flexDirection: 'row' as 'row',
borderLeft: '1px solid var(--jp-border-color1)',
borderLeft: '1px solid var(--jp-border-color2)',
width: '50%',
minWidth: '50px',
flexShrink: 1
Expand All @@ -365,7 +367,7 @@ export class AppHeaderOptions extends React.Component<
whiteSpace: 'nowrap' as 'nowrap',

height: '24px',
paddingLeft: '4px',
paddingLeft: '8px',
paddingRight: '4px',
minWidth: '10px',
width: '100%'
Expand Down
6 changes: 2 additions & 4 deletions src/comments/components/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,13 @@ export class Comment extends React.Component<ICommentProps, ICommentStates> {
display: 'flex',
flexDirection: 'row' as 'row',
boxSizing: 'border-box' as 'border-box',
padding: '4px',
background: 'var(--jp-layout-color1)'
background: 'var(--jp-layout-color1)',
marginBottom: '8px'
},
'jp-commenting-annotation-upper-area-resolved': {
display: 'flex',
flexDirection: 'row' as 'row',
boxSizing: 'border-box' as 'border-box',
padding: '4px',
background: 'var(--jp-layout-color2)'
},
'jp-commenting-annotation-info-area': {
Expand All @@ -439,7 +438,6 @@ export class Comment extends React.Component<ICommentProps, ICommentStates> {
flexShrink: 1,
minWidth: '52px',
width: '100%',
paddingLeft: '4px',
boxSizing: 'border-box' as 'border-box'
},
'jp-commenting-annotation-photo-area': {
Expand Down
2 changes: 1 addition & 1 deletion src/comments/components/NewThreadCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class NewThreadCard extends React.Component<
},
'jp-commenting-text-input-area': {
display: 'flex',
padding: '4px',
padding: '8px',
width: '95%',
height: '80px'
},
Expand Down
6 changes: 3 additions & 3 deletions src/comments/notebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ export class NotebookIndicators extends Widget implements IndicatorWidget {

button.hidden = panel.activeCellIndex !== index;

button.style.minWidth = '20px';
button.style.minHeight = '20px';
button.style.backgroundSize = '20px';
button.style.minWidth = '16px';
button.style.minHeight = '16px';
button.style.backgroundSize = '16px';
button.style.padding = '4px';
button.style.cssFloat = 'right';
button.style.cursor = this._provider.getState('newThreadActive')
Expand Down
25 changes: 18 additions & 7 deletions style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
.jp-commenting-header-options-area {
display: flex;
flex-direction: column;
border-top: 1px solid var(--jp-border-color1);
border-top: 1px solid var(--jp-border-color2);
box-sizing: border-box;
}

Expand Down Expand Up @@ -180,11 +180,12 @@
border: 1px solid var(--jp-border-color2);
box-sizing: border-box;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
margin-top: 4px;
margin-top: 8px;
padding: 8px;
}

.jp-commenting-thread-area:hover {
box-shadow: var(--jp-elevation-z4);
box-shadow: var(--jp-elevation-z2);
}

.jp-commenting-thread-area-no-hover {
Expand All @@ -194,6 +195,8 @@
border: 1px solid var(--jp-border-color2);
box-sizing: border-box;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
margin-top: 8px;
padding: 8px;
}

/* New Thread */
Expand All @@ -208,17 +211,25 @@
background-size: contain;
}

.jp-comment-new-thread-icon {
width: 16px;
height: 16px;
margin-right: 8px;
background-size: 16px auto;
}

.jp-commenting-new-thread-button {
display: flex;
justify-content: space-between;
flex-direction: row;
border-radius: var(--jp-border-radius);
border-radius: 4px;
border: 1px solid var(--jp-border-color2);
box-sizing: border-box;
padding: 8px;
}

.jp-commenting-new-thread-button:hover {
box-shadow: var(--jp-elevation-z6);
box-shadow: var(--jp-elevation-z2);
}

.jp-commenting-new-thread-label {
Expand All @@ -228,9 +239,9 @@
overflow: hidden;
font-size: 13px;
color: var(--jp-ui-font-color1);
font-weight: bold;
text-overflow: ellipsis;
padding: 8px;
line-height: 20px;
height: 20px;
}

/* Text Area */
Expand Down

0 comments on commit 0f91548

Please sign in to comment.