Commit 06e7de40 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Review changes

parent 8325d3fd
import DropLab from '~/droplab/drop_lab'; import DropLab from './droplab/drop_lab';
import InputSetter from '~/droplab/plugins/input_setter'; import InputSetter from './droplab/plugins/input_setter';
class CommentTypeToggle { class CommentTypeToggle {
constructor(opts = {}) { constructor(opts = {}) {
......
...@@ -791,7 +791,7 @@ require('./task_list'); ...@@ -791,7 +791,7 @@ require('./task_list');
if (typeof gl.diffNotesCompileComponents !== 'undefined') { if (typeof gl.diffNotesCompileComponents !== 'undefined') {
var $commentBtn = form.find('comment-and-resolve-btn'); var $commentBtn = form.find('comment-and-resolve-btn');
$commentBtn.attr(':discussion-id', "'" + discussionID + "'"); $commentBtn.attr(':discussion-id', `'${discussionID}'`);
gl.diffNotesCompileComponents(); gl.diffNotesCompileComponents();
} }
......
...@@ -312,12 +312,20 @@ ...@@ -312,12 +312,20 @@
} }
.comment-type-dropdown { .comment-type-dropdown {
.dropdown-toggle .fa { .comment-btn {
width: auto;
}
.dropdown-toggle {
float: right;
.toggle-icon {
color: $white-light; color: $white-light;
padding-right: 2px; padding-right: 2px;
margin-top: 2px; margin-top: 2px;
pointer-events: none; pointer-events: none;
} }
}
.dropdown-menu { .dropdown-menu {
top: initial; top: initial;
...@@ -375,4 +383,21 @@ ...@@ -375,4 +383,21 @@
padding: 0; padding: 0;
border-top: $gray-darkest; border-top: $gray-darkest;
} }
@media (max-width: $screen-xs-max) {
display: flex;
width: 100%;
.comment-btn {
flex-grow: 1;
flex-shrink: 0;
width: auto;
}
.dropdown-toggle {
flex-grow: 0;
flex-shrink: 1;
width: auto;
}
}
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- if @note.can_be_discussion_note? - if @note.can_be_discussion_note?
= button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion js-disable-on-submit', data: { 'dropdown-trigger' => '#resolvable-comment-menu' }, 'aria-label' => 'Open comment type dropdown' do = button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion js-disable-on-submit', data: { 'dropdown-trigger' => '#resolvable-comment-menu' }, 'aria-label' => 'Open comment type dropdown' do
= icon('caret-down') = icon('caret-down', class: 'toggle-icon')
%ul#resolvable-comment-menu.dropdown-menu{ data: { dropdown: true } } %ul#resolvable-comment-menu.dropdown-menu{ data: { dropdown: true } }
%li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => 'Comment', 'close-text' => "Comment & close #{noteable_name}", 'reopen-text' => "Comment & reopen #{noteable_name}" } } %li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => 'Comment', 'close-text' => "Comment & close #{noteable_name}", 'reopen-text' => "Comment & reopen #{noteable_name}" } }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment