From a9c041704e975777cb0c621ed1c09a2a50274542 Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Mon, 14 May 2018 18:03:43 +0900 Subject: Remove extra spaces from MR discussion notes --- .../diffs/components/inline_diff_comment_row.vue | 7 +++---- app/assets/javascripts/notes.js | 2 +- app/assets/javascripts/notes/components/diff_with_note.vue | 7 +++---- app/assets/stylesheets/pages/notes.scss | 14 -------------- app/views/discussions/_diff_discussion.html.haml | 3 +-- app/views/discussions/_parallel_diff_discussion.html.haml | 12 ++++-------- 6 files changed, 12 insertions(+), 33 deletions(-) (limited to 'app') diff --git a/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue b/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue index caf84dc9573..6348f32d36d 100644 --- a/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue +++ b/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue @@ -44,10 +44,9 @@ export default { class="notes_holder" > - + class="notes_content" + colspan="3" + >
'; + '
'; // In parallel view, look inside the correct left/right pane if (this.isParallelView()) { lineTypeSelector = `.${lineType}`; diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index 27ff7dea909..802be022ba6 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -148,10 +148,9 @@ export default { - + class="notes_content" + colspan="3" + > diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index dbe9f0c03fb..b1e33196049 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -334,20 +334,6 @@ ul.notes { border: 1px solid $white-normal; 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 { background-color: $gray-light; border-width: 1px 0; diff --git a/app/views/discussions/_diff_discussion.html.haml b/app/views/discussions/_diff_discussion.html.haml index 4b6c4581eb3..6b8dd156874 100644 --- a/app/views/discussions/_diff_discussion.html.haml +++ b/app/views/discussions/_diff_discussion.html.haml @@ -4,7 +4,6 @@ -# Text diff discussions - expanded = local_assigns.fetch(:expanded, true) %tr.notes_holder{ class: ('hide' unless expanded) } - %td.notes_line{ colspan: 2 } - %td.notes_content + %td.notes_content{ colspan: 3 } .content{ class: ('hide' unless expanded) } = render partial: "discussions/notes", collection: discussions, as: :discussion, locals: { disable_collapse_class: true } diff --git a/app/views/discussions/_parallel_diff_discussion.html.haml b/app/views/discussions/_parallel_diff_discussion.html.haml index 079d9083dff..2e621c4082d 100644 --- a/app/views/discussions/_parallel_diff_discussion.html.haml +++ b/app/views/discussions/_parallel_diff_discussion.html.haml @@ -1,21 +1,17 @@ - expanded = [*discussions_left, *discussions_right].any?(&:expanded?) %tr.notes_holder{ class: ('hide' unless expanded) } - if discussions_left - %td.notes_line.old - %td.notes_content.parallel.old + %td.notes_content.parallel.old{ colspan: 2 } .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 } - else - %td.notes_line.old= ("") - %td.notes_content.parallel.old + %td.notes_content.parallel.old{ colspan: 2 } .content - if discussions_right - %td.notes_line.new - %td.notes_content.parallel.new + %td.notes_content.parallel.new{ colspan: 2 } .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 } - else - %td.notes_line.new= ("") - %td.notes_content.parallel.new + %td.notes_content.parallel.new{ colspan: 2 } .content -- cgit v1.2.3