Commit a062de4e authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '46340-remove-extra-spaces-from-mr-discussion-notes-after-vuejs' into 'master'

Remove extra spaces from MR discussion notes

Closes #46340

See merge request gitlab-org/gitlab-ce!21461
parents c2bbcd94 a9c04170
...@@ -44,10 +44,9 @@ export default { ...@@ -44,10 +44,9 @@ export default {
class="notes_holder" class="notes_holder"
> >
<td <td
class="notes_line" class="notes_content"
colspan="2" colspan="3"
></td> >
<td class="notes_content">
<div class="content"> <div class="content">
<diff-discussions <diff-discussions
v-if="discussions.length" v-if="discussions.length"
......
...@@ -1074,7 +1074,7 @@ export default class Notes { ...@@ -1074,7 +1074,7 @@ export default class Notes {
addForm = false; addForm = false;
let lineTypeSelector = ''; let lineTypeSelector = '';
rowCssToAdd = rowCssToAdd =
'<tr class="notes_holder js-temp-notes-holder"><td class="notes_line" colspan="2"></td><td class="notes_content"><div class="content"></div></td></tr>'; '<tr class="notes_holder js-temp-notes-holder"><td class="notes_content" colspan="3"><div class="content"></div></td></tr>';
// In parallel view, look inside the correct left/right pane // In parallel view, look inside the correct left/right pane
if (this.isParallelView()) { if (this.isParallelView()) {
lineTypeSelector = `.${lineType}`; lineTypeSelector = `.${lineType}`;
......
...@@ -148,10 +148,9 @@ export default { ...@@ -148,10 +148,9 @@ export default {
</tr> </tr>
<tr class="notes_holder"> <tr class="notes_holder">
<td <td
class="notes_line" class="notes_content"
colspan="2" colspan="3"
></td> >
<td class="notes_content">
<slot></slot> <slot></slot>
</td> </td>
</tr> </tr>
......
...@@ -334,20 +334,6 @@ ul.notes { ...@@ -334,20 +334,6 @@ ul.notes {
border: 1px solid $white-normal; border: 1px solid $white-normal;
border-left: 0; border-left: 0;
&.notes_line {
vertical-align: middle;
text-align: center;
padding: 10px 0;
background: $gray-light;
color: $text-color;
}
&.notes_line2 {
text-align: center;
padding: 10px 0;
border-left: 1px solid $note-line2-border !important;
}
&.notes_content { &.notes_content {
background-color: $gray-light; background-color: $gray-light;
border-width: 1px 0; border-width: 1px 0;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
-# Text diff discussions -# Text diff discussions
- expanded = local_assigns.fetch(:expanded, true) - expanded = local_assigns.fetch(:expanded, true)
%tr.notes_holder{ class: ('hide' unless expanded) } %tr.notes_holder{ class: ('hide' unless expanded) }
%td.notes_line{ colspan: 2 } %td.notes_content{ colspan: 3 }
%td.notes_content
.content{ class: ('hide' unless expanded) } .content{ class: ('hide' unless expanded) }
= render partial: "discussions/notes", collection: discussions, as: :discussion, locals: { disable_collapse_class: true } = render partial: "discussions/notes", collection: discussions, as: :discussion, locals: { disable_collapse_class: true }
- expanded = [*discussions_left, *discussions_right].any?(&:expanded?) - expanded = [*discussions_left, *discussions_right].any?(&:expanded?)
%tr.notes_holder{ class: ('hide' unless expanded) } %tr.notes_holder{ class: ('hide' unless expanded) }
- if discussions_left - if discussions_left
%td.notes_line.old %td.notes_content.parallel.old{ colspan: 2 }
%td.notes_content.parallel.old
.content{ class: ('hide' unless discussions_left.any?(&:expanded?)) } .content{ class: ('hide' unless discussions_left.any?(&:expanded?)) }
= render partial: "discussions/notes", collection: discussions_left, as: :discussion, line_type: 'old', locals: { disable_collapse_class: true } = render partial: "discussions/notes", collection: discussions_left, as: :discussion, line_type: 'old', locals: { disable_collapse_class: true }
- else - else
%td.notes_line.old= ("") %td.notes_content.parallel.old{ colspan: 2 }
%td.notes_content.parallel.old
.content .content
- if discussions_right - if discussions_right
%td.notes_line.new %td.notes_content.parallel.new{ colspan: 2 }
%td.notes_content.parallel.new
.content{ class: ('hide' unless discussions_right.any?(&:expanded?)) } .content{ class: ('hide' unless discussions_right.any?(&:expanded?)) }
= render partial: "discussions/notes", collection: discussions_right, as: :discussion, line_type: 'new', locals: { disable_collapse_class: true } = render partial: "discussions/notes", collection: discussions_right, as: :discussion, line_type: 'new', locals: { disable_collapse_class: true }
- else - else
%td.notes_line.new= ("") %td.notes_content.parallel.new{ colspan: 2 }
%td.notes_content.parallel.new
.content .content
---
title: Remove extra spaces from MR discussion notes
merge_request: 18946
author: Takuya Noguchi
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment