From 2f7520cec7031f885676685e111d9e43f0b5c0e4 Mon Sep 17 00:00:00 2001 From: Denys Mishunov Date: Tue, 4 Jun 2019 12:11:56 +0200 Subject: Refactored 'Toggle discussion' button On the small screens it should be placed below body to relate to expanded content. Onb the larger screens it is absolutely positioned just like note-actions for regular notes --- .../javascripts/notes/components/note_header.vue | 23 ---------------------- .../notes/components/noteable_discussion.vue | 17 +++++++++++++--- app/assets/stylesheets/pages/notes.scss | 16 +++++++++++---- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue index f59c3c0073f..8e7a7ddfdde 100644 --- a/app/assets/javascripts/notes/components/note_header.vue +++ b/app/assets/javascripts/notes/components/note_header.vue @@ -27,16 +27,6 @@ export default { required: false, default: null, }, - includeToggle: { - type: Boolean, - required: false, - default: false, - }, - expanded: { - type: Boolean, - required: false, - default: true, - }, noTruncate: { type: Boolean, required: false, @@ -44,9 +34,6 @@ export default { }, }, computed: { - toggleChevronClass() { - return this.expanded ? 'fa-chevron-up' : 'fa-chevron-down'; - }, noteTimestampLink() { return `#note_${this.noteId}`; }, @@ -75,16 +62,6 @@ export default { 'mr-0': noTruncate, }" > -
- -
@@ -347,6 +347,17 @@ Please check your network connection and try again.`; action-text="Last updated" class-name="discussion-headline-light js-discussion-headline" /> + +
+ +
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index f904d6d68b9..a7ad0a08a18 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -555,9 +555,6 @@ $note-form-margin-left: 72px; @media (min-width: map-get($grid-breakpoints, sm)) { margin-right: 200px; } - @media (min-width: map-get($grid-breakpoints, md)) { - margin-right: 0; - } } .note-header-author-name { @@ -573,6 +570,11 @@ $note-form-margin-left: 72px; .note-header-info { padding-bottom: 0; + margin-right: 0; + + @media (min-width: map-get($grid-breakpoints, md)) { + margin-right: 10em; + } } .timeline-content { @@ -648,14 +650,20 @@ $note-form-margin-left: 72px; */ .discussion-actions { - float: right; color: $gray-darkest; + padding-top: $gl-padding; @include media-breakpoint-down(xs) { width: 100%; margin: $gl-padding-8 0; } + @media (min-width: map-get($grid-breakpoints, md)) { + position: absolute; + top: 0; + right: $gl-padding; + } + .btn-group > .discussion-next-btn { margin-left: -1px; } -- cgit v1.2.1