From 60799ae3f671ba9043ed8881cfed88e505d1c8ed Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 29 Feb 2016 10:45:49 -0500 Subject: [PATCH 1/7] Prevent content misalignment --- app/assets/stylesheets/pages/notes.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 19ead07c06a..688c4226df6 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -14,6 +14,14 @@ ul.notes { margin: 0px; padding: 0px; + .timeline-icon { + float: left; + } + + .timeline-content { + margin-left: 50px; + } + .system-note { font-size: 14px; padding-top: 10px; From 1a94a569cfbaf035c859a1e9454af085ccf38e5a Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 29 Feb 2016 10:49:48 -0500 Subject: [PATCH 2/7] Keep date in the same line --- app/assets/stylesheets/pages/notes.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 688c4226df6..9f426bb5218 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -22,6 +22,10 @@ ul.notes { margin-left: 50px; } + .note_created_ago { + white-space: nowrap; + } + .system-note { font-size: 14px; padding-top: 10px; From 9f2eb025d34c99c96a762615fe2f7ea7c8dc8e50 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 29 Feb 2016 10:50:35 -0500 Subject: [PATCH 3/7] Apply nice date when diff page loads --- app/assets/javascripts/merge_request_tabs.js.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee index 40cfa59a229..23a218b4c7d 100644 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ b/app/assets/javascripts/merge_request_tabs.js.coffee @@ -146,6 +146,7 @@ class @MergeRequestTabs url: "#{source}.json" + @_location.search success: (data) => document.querySelector("div#diffs").innerHTML = data.html + $('.js-timeago').timeago() $('div#diffs .js-syntax-highlight').syntaxHighlight() @expandViewContainer() if @diffViewType() is 'parallel' @diffsLoaded = true From fa1fa437ca5b894f5590ffbbd08c82e7e5aaea7a Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 29 Feb 2016 10:53:44 -0500 Subject: [PATCH 4/7] Keep edited time on the same line as well --- app/assets/stylesheets/pages/notes.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 9f426bb5218..e9ee659c95a 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -22,7 +22,7 @@ ul.notes { margin-left: 50px; } - .note_created_ago { + .note_created_ago, .note_edited_ago { white-space: nowrap; } From a0f440efd36a2a2039e89bc74219772c62f24105 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 29 Feb 2016 10:55:50 -0500 Subject: [PATCH 5/7] Increase padding --- app/assets/stylesheets/pages/notes.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index e9ee659c95a..ae9189811c7 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -19,7 +19,7 @@ ul.notes { } .timeline-content { - margin-left: 50px; + margin-left: 55px; } .note_created_ago, .note_edited_ago { From c4b9b2cfcfae5f7ce4e4c0fd41caf012812f58b1 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 29 Feb 2016 11:01:28 -0500 Subject: [PATCH 6/7] Wrap icon with edited time --- app/assets/stylesheets/pages/notes.scss | 2 +- app/views/projects/notes/_note.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index ae9189811c7..6cb6adb480c 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -22,7 +22,7 @@ ul.notes { margin-left: 55px; } - .note_created_ago, .note_edited_ago { + .note_created_ago, .note-updated-at { white-space: nowrap; } diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index e858c412836..52972576aff 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -28,7 +28,7 @@ %a{name: dom_id(note), href: "##{dom_id(note)}", title: 'Link here'} = time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note_created_ago') - if note.updated_at != note.created_at - %span + %span.note-updated-at · = icon('edit', title: 'edited') = time_ago_with_tooltip(note.updated_at, placement: 'bottom', html_class: 'note_edited_ago') From 45c29fa289bc27519a2fa076a155186d3ebf7b31 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 29 Feb 2016 11:02:57 -0500 Subject: [PATCH 7/7] Comment icon vertically aligned --- app/assets/stylesheets/pages/notes.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 6cb6adb480c..d5f9852ebed 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -163,6 +163,7 @@ ul.notes { border-left: none; &.notes_line { + vertical-align: middle; text-align: center; padding: 10px 0; background: #FFF;