summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2018-11-13 20:53:10 +0000
committerCindy Pallares <cindy@gitlab.com>2018-11-13 21:08:33 -0500
commit8389898db9cd811e012cf57f6ec856736b222396 (patch)
treee64d1b5bb7a5fee4c53e8bd9a567eb5e21d715d9
parentbfdf23ccdce37064301fdc69dd719bef6f16fc16 (diff)
downloadgitlab-ce-11-5-stable-prepare-rc8.tar.gz
Merge branch '53780-commit-discussion-ui' into 'master'11-5-stable-prepare-rc8
Fix broken UI on commit discussions Closes #53780 See merge request gitlab-org/gitlab-ce!22952
-rw-r--r--app/assets/stylesheets/pages/note_form.scss6
-rw-r--r--app/assets/stylesheets/pages/notes.scss50
-rw-r--r--app/views/projects/diffs/_text_file.html.haml2
-rw-r--r--app/views/shared/notes/_note.html.haml2
-rw-r--r--app/views/shared/notes/_notes_with_form.html.haml2
5 files changed, 40 insertions, 22 deletions
diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss
index 855d73a9939..45b921a2fbb 100644
--- a/app/assets/stylesheets/pages/note_form.scss
+++ b/app/assets/stylesheets/pages/note_form.scss
@@ -176,8 +176,10 @@
background-color: $white-light;
}
-.discussion-form-container {
- padding: $gl-padding-top $gl-padding $gl-padding;
+table {
+ .discussion-form-container {
+ padding: $gl-padding-top $gl-padding $gl-padding;
+ }
}
.discussion-notes .disabled-comment {
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index adcc3577a9c..35e01c9c807 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -13,12 +13,32 @@ $note-form-margin-left: 72px;
}
}
+@mixin outline-comment() {
+ margin: $gl-padding;
+ border: 1px solid $border-color;
+ border-radius: $border-radius-default;
+}
+
.note-wrapper {
padding: $gl-padding;
+
+ &.outlined {
+ @include outline-comment();
+ }
+}
+
+.main-notes-list {
+ @include vertical-line(39px);
}
-.issuable-discussion {
- .notes.timeline > .timeline-entry {
+.notes {
+ display: block;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ position: relative;
+
+ &.timeline > .timeline-entry {
border: 1px solid $border-color;
border-radius: $border-radius-default;
margin: $gl-padding 0;
@@ -51,18 +71,6 @@ $note-form-margin-left: 72px;
border-top: 1px solid $border-color;
}
}
-}
-
-.main-notes-list {
- @include vertical-line(36px);
-}
-
-.notes {
- display: block;
- list-style: none;
- margin: 0;
- padding: 0;
- position: relative;
> .note-discussion {
.card {
@@ -476,9 +484,7 @@ $note-form-margin-left: 72px;
}
.note-wrapper {
- margin: $gl-padding;
- border: 1px solid $border-color;
- border-radius: $border-radius-default;
+ @include outline-comment();
}
.discussion-reply-holder {
@@ -488,6 +494,16 @@ $note-form-margin-left: 72px;
}
}
+.commit-diff {
+ .notes {
+ @include vertical-line(52px);
+ }
+
+ .discussion-reply-holder {
+ border-top: 1px solid $border-color;
+ }
+}
+
.discussion-header,
.note-header-info {
a {
diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml
index e8a5e63e59e..bc9f6c71fa8 100644
--- a/app/views/projects/diffs/_text_file.html.haml
+++ b/app/views/projects/diffs/_text_file.html.haml
@@ -3,7 +3,7 @@
.suppressed-container
%a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show.
-%table.text-file.diff-wrap-lines.code.js-syntax-highlight{ data: diff_view_data, class: too_big ? 'hide' : '' }
+%table.text-file.diff-wrap-lines.code.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' }
= render partial: "projects/diffs/line",
collection: diff_file.highlighted_diff_lines,
as: :line,
diff --git a/app/views/shared/notes/_note.html.haml b/app/views/shared/notes/_note.html.haml
index 84adbd444c5..bc918430823 100644
--- a/app/views/shared/notes/_note.html.haml
+++ b/app/views/shared/notes/_note.html.haml
@@ -5,7 +5,7 @@
- note_editable = can?(current_user, :admin_note, note)
- note_counter = local_assigns.fetch(:note_counter, 0)
-%li.timeline-entry{ id: dom_id(note),
+%li.timeline-entry.note-wrapper.outlined{ id: dom_id(note),
class: ["note", "note-row-#{note.id}", ('system-note' if note.system)],
data: { author_id: note.author.id,
editable: note_editable,
diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml
index ec1e10bb0c1..4c4050c6054 100644
--- a/app/views/shared/notes/_notes_with_form.html.haml
+++ b/app/views/shared/notes/_notes_with_form.html.haml
@@ -8,7 +8,7 @@
- if can_create_note?
.notes.notes-form.timeline
- .timeline-entry
+ .timeline-entry.note-form
.timeline-entry-inner
.flash-container.timeline-content