Skip to content

Commit 10de4c3

Browse files
author
Miguel Solorio
committed
Improve styling for reviews and comments, use brighter border
1 parent 283fbd6 commit 10de4c3

File tree

2 files changed

+36
-10
lines changed

2 files changed

+36
-10
lines changed

preview-src/index.css

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
:root {
7+
--border-color: var(--vscode-notifications-border);
8+
}
9+
610
.title {
711
display: flex;
812
align-items: flex-start;
913
margin-top: 20px;
10-
border-bottom: 1px solid var(--vscode-tab-inactiveBackground);
14+
border-bottom: 1px solid var(--border-color);
1115
}
1216

1317
#title:empty {
@@ -85,7 +89,7 @@ body .comment-container:last-child .comment {
8589
display: block;
8690
width: 2px;
8791
content: "";
88-
background-color: var(--vscode-tab-inactiveBackground);
92+
background-color: var(--border-color);
8993
} */
9094

9195
body .review-comment .review-comment-header {
@@ -186,7 +190,7 @@ body button.checkedOut svg {
186190
align-items: center;
187191
margin-top: 8px;
188192
padding-bottom: 16px;
189-
border-bottom: 1px solid var(--vscode-tab-inactiveBackground);
193+
border-bottom: 1px solid var(--border-color);
190194
}
191195

192196
.subtitle .avatar {
@@ -249,11 +253,11 @@ body .overview-title button {
249253
.comment-container {
250254
position: relative;
251255
padding: 20px 0;
252-
border-top: 1px solid var(--vscode-tab-inactiveBackground);
256+
border-top: 1px solid var(--border-color);
253257
}
254258

255259
.comment-container:last-of-type {
256-
border-bottom: 1px solid var(--vscode-tab-inactiveBackground);
260+
border-bottom: 1px solid var(--border-color);
257261
}
258262

259263
.comment-container[data-type="commit"] {
@@ -265,6 +269,25 @@ body .overview-title button {
265269
border-top: none;
266270
}
267271

272+
.comment-body div[data-type="review-comment"] {
273+
padding: 0 20px;
274+
border-right: 1px solid var(--vscode-notifications-background);
275+
border-left: 1px solid var(--vscode-notifications-background);
276+
border-bottom: 1px solid var(--vscode-notifications-background);
277+
}
278+
279+
.comment-body div[data-type="review-comment"] .comment-container {
280+
padding: 12px 0;
281+
}
282+
283+
.comment-body div[data-type="review-comment"] .comment-container:last-child {
284+
border-bottom: none;
285+
}
286+
287+
.comment-body div[data-type="review-comment"] .comment-container:last-child .comment {
288+
padding-bottom: 0;
289+
}
290+
268291
body .comment-form {
269292
padding: 20px 0 10px;
270293
}
@@ -316,7 +339,6 @@ body .comment-form .form-actions button {
316339
.comment-body img {
317340
max-width: 100%;
318341
max-height: 100%;
319-
margin-top: 8px;
320342
display: block;
321343
}
322344

@@ -392,7 +414,7 @@ body .comment-form .form-actions button {
392414
border-left-style: solid;
393415
}
394416

395-
.comment-body blockquote p{
417+
.comment-body blockquote p {
396418
margin: 8px 0;
397419
}
398420

@@ -463,12 +485,16 @@ body .comment-form .form-actions button {
463485
}
464486

465487
.diff {
466-
margin: 8px 0;
488+
margin: 40px 0 0px;
467489
border: 1px solid var(--vscode-notifications-background) !important;
468490
}
469491

492+
.diff:first-of-type {
493+
margin-top: 8px;
494+
}
495+
470496
.diff .diffHeader {
471-
padding: 2px 12px;
497+
padding: 6px 12px;
472498
line-height: 1.5;
473499
border-bottom: solid 1px var(--vscode-notifications-background);
474500
background-color: var(--vscode-editorGroupHeader-tabsBackground);

preview-src/pullRequestOverviewRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ export function renderReview(timelineEvent: ReviewEvent): string {
334334

335335
body += `
336336
${diffView}
337-
<div>${ comments && comments.length ? comments.map(comment => renderComment(comment)).join('') : ''}</div>
337+
<div data-type="review-comment">${ comments && comments.length ? comments.map(comment => renderComment(comment)).join('') : ''}</div>
338338
`;
339339
}
340340
return `<div class="comment-container" data-type="review">

0 commit comments

Comments
 (0)