diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-05-16 15:52:53 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-05-16 15:52:53 +0300 |
commit | 73289a8361aa6bb2cbd26873ccabe512fca6589b (patch) | |
tree | 6c6eaa6890f3b6f24a882f7ad8b6237286974a6e | |
parent | e5dc6b156ed032672fbefff33cfc84506cd21661 (diff) | |
parent | 77a925f4a6bff04f0b40255e4dced741818149d7 (diff) |
Merge branch 'move-disussion-actions-to-the-right' into 'master'
Move discussion and notes actions to the right
Closes #33645
See merge request gitlab-org/gitlab-ce!18476
5 files changed, 26 insertions, 30 deletions
diff --git a/app/assets/javascripts/notes/components/note_edited_text.vue b/app/assets/javascripts/notes/components/note_edited_text.vue index 4ddca918495..2dc39d1a186 100644 --- a/app/assets/javascripts/notes/components/note_edited_text.vue +++ b/app/assets/javascripts/notes/components/note_edited_text.vue @@ -32,17 +32,17 @@ export default { <template> <div :class="className"> {{ actionText }} - <time-ago-tooltip - :time="editedAt" - tooltip-placement="bottom" - /> <template v-if="editedBy"> - by + {{ s__('ByAuthor|by') }} <a :href="editedBy.path" class="js-vue-author author_link"> {{ editedBy.name }} </a> </template> + <time-ago-tooltip + :time="editedAt" + tooltip-placement="bottom" + /> </div> </template> diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue index c3d1ef1fcc6..7183d0b50b2 100644 --- a/app/assets/javascripts/notes/components/note_header.vue +++ b/app/assets/javascripts/notes/components/note_header.vue @@ -62,6 +62,21 @@ export default { <template> <div class="note-header-info"> + <div + v-if="includeToggle" + class="discussion-actions"> + <button + @click="handleToggle" + class="note-action-button discussion-toggle-button js-vue-toggle-button" + type="button"> + <i + :class="toggleChevronClass" + class="fa" + aria-hidden="true"> + </i> + {{ __('Toggle discussion') }} + </button> + </div> <a :href="author.path"> <span class="note-header-author-name">{{ author.name }}</span> <span class="note-headline-light"> @@ -95,20 +110,5 @@ export default { </i> </span> </span> - <div - v-if="includeToggle" - class="discussion-actions"> - <button - @click="handleToggle" - class="note-action-button discussion-toggle-button js-vue-toggle-button" - type="button"> - <i - :class="toggleChevronClass" - class="fa" - aria-hidden="true"> - </i> - Toggle discussion - </button> - </div> </div> </template> diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 6d5c6cb136f..42fe319b931 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -407,10 +407,6 @@ ul.notes { .note-header { display: flex; justify-content: space-between; - - @include notes-media('max', $screen-xs-max) { - flex-flow: row wrap; - } } .note-header-info { @@ -473,11 +469,6 @@ ul.notes { margin-left: 10px; color: $gray-darkest; - @include notes-media('max', $screen-md-max) { - float: none; - margin-left: 0; - } - .btn-group > .discussion-next-btn { margin-left: -1px; } diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml index e9589213f80..ebe8c327079 100644 --- a/app/views/discussions/_discussion.html.haml +++ b/app/views/discussions/_discussion.html.haml @@ -13,7 +13,7 @@ = icon("chevron-up") - else = icon("chevron-down") - Toggle discussion + = _('Toggle discussion') = link_to_member(@project, discussion.author, avatar: false) .inline.discussion-headline-light diff --git a/changelogs/unreleased/move-disussion-actions-to-the-right.yml b/changelogs/unreleased/move-disussion-actions-to-the-right.yml new file mode 100644 index 00000000000..b79c6f36585 --- /dev/null +++ b/changelogs/unreleased/move-disussion-actions-to-the-right.yml @@ -0,0 +1,5 @@ +--- +title: Move discussion actions to the right for small viewports +merge_request: 18476 +author: George Tsiolis +type: changed |