Commit e5100c33 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

First FE review changes

parent cc1e51ef
...@@ -23,30 +23,25 @@ class CloseReopenReportToggle { ...@@ -23,30 +23,25 @@ class CloseReopenReportToggle {
} }
updateButton(isClosed) { updateButton(isClosed) {
const action = isClosed ? this.showReopen : this.showClose; this.toggleButtonType(isClosed);
action.call(this);
this.button.blur(); this.button.blur();
} }
showClose() { toggleButtonType(isClosed) {
this.closeItem.classList.remove('hidden'); const [showItem, hideItem] = this.getButtonTypes(isClosed);
this.closeItem.classList.add('droplab-item-selected');
this.reopenItem.classList.add('hidden'); showItem.classList.remove('hidden');
this.reopenItem.classList.remove('droplab-item-selected'); showItem.classList.add('droplab-item-selected');
this.closeItem.click(); hideItem.classList.add('hidden');
} hideItem.classList.remove('droplab-item-selected');
showReopen() {
this.reopenItem.classList.remove('hidden');
this.reopenItem.classList.add('droplab-item-selected');
this.closeItem.classList.add('hidden'); showItem.click();
this.closeItem.classList.remove('droplab-item-selected'); }
this.reopenItem.click(); getButtonTypes(isClosed) {
return isClosed ? [this.reopenItem, this.closeItem] : [this.closeItem, this.reopenItem];
} }
setDisable(shouldDisable) { setDisable(shouldDisable) {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
color: $text; color: $text;
border-color: $border; border-color: $border;
> i { > .icon {
color: $text; color: $text;
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
border-color: $hover-border; border-color: $hover-border;
color: $hover-text; color: $hover-text;
> i { > .icon {
color: $hover-text; color: $hover-text;
} }
} }
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
border-color: $active-border; border-color: $active-border;
color: $hover-text; color: $hover-text;
> i { > .icon {
color: $hover-text; color: $hover-text;
} }
} }
......
...@@ -310,18 +310,27 @@ ...@@ -310,18 +310,27 @@
li { li {
padding-top: 6px; padding-top: 6px;
& > a { > a,
> button {
margin: 0; margin: 0;
padding: 0; padding: 0;
color: inherit;
border-radius: 0; border-radius: 0;
text-overflow: inherit; text-overflow: inherit;
background-color: inherit;
color: inherit;
border: inherit;
text-align: left;
&:hover, &:hover,
&:focus { &:focus {
background-color: inherit; background-color: inherit;
color: inherit; color: inherit;
} }
&.btn .fa:not(:last-child) {
margin-right: 0;
margin-left: 5px;
}
} }
&:hover, &:hover,
...@@ -334,12 +343,12 @@ ...@@ -334,12 +343,12 @@
visibility: visible; visibility: visible;
} }
i { .icon {
visibility: hidden; visibility: hidden;
} }
} }
i { .icon {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
padding-top: 2px; padding-top: 2px;
......
...@@ -70,6 +70,12 @@ ...@@ -70,6 +70,12 @@
.input-token { .input-token {
max-width: 200px; max-width: 200px;
&:hover,
&:focus {
background-color: inherit;
color: inherit;
}
} }
.input-token:only-child, .input-token:only-child,
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
.pull-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown .pull-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown
= link_to "#{display_button_action} #{display_issuable_type}", close_reopen_issuable_path(issuable), { method: button_method.to_s, class: "#{button_class} btn-#{button_action}", title: "#{display_button_action} #{display_issuable_type}" } = link_to "#{display_button_action} #{display_issuable_type}", close_reopen_issuable_path(issuable), { method: button_method.to_s, class: "#{button_class} btn-#{button_action}", title: "#{display_button_action} #{display_issuable_type}" }
= button_tag type: 'button', class: "#{toggle_class} btn-#{button_action}-color", data: { 'dropdown-trigger' => '#issuable-close-menu' }, 'aria-label' => 'Open close dropdown' do = button_tag type: 'button', class: "#{toggle_class} btn-#{button_action}-color", data: { 'dropdown-trigger' => '#issuable-close-menu' }, 'aria-label' => 'Toggle dropdown' do
= icon('caret-down', class: 'toggle-icon') = icon('caret-down', class: 'toggle-icon icon')
%ul#issuable-close-menu.js-issuable-close-menu.dropdown-menu{ class: button_responsive_class, data: { dropdown: true } } %ul#issuable-close-menu.js-issuable-close-menu.dropdown-menu{ class: button_responsive_class, data: { dropdown: true } }
%li.close-item{ class: "#{issuable.closed? ? 'hidden' : 'droplab-item-selected'}", data: { text: "Close #{display_issuable_type}", url: close_issuable_path(issuable), button_class: "#{button_class} btn-close", toggle_class: "#{toggle_class} btn-close-color", method: button_method } } %li.close-item{ class: "#{issuable.closed? ? 'hidden' : 'droplab-item-selected'}", data: { text: "Close #{display_issuable_type}", url: close_issuable_path(issuable), button_class: "#{button_class} btn-close", toggle_class: "#{toggle_class} btn-close-color", method: button_method } }
%a{ href: '#' } %button.btn.btn-transparent
= icon('check') = icon('check', class: 'icon')
.description .description
%strong %strong
Close Close
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
%p %p
%li.reopen-item{ class: "#{issuable.closed? ? 'droplab-item-selected' : 'hidden'}", data: { text: "Reopen #{display_issuable_type}", url: reopen_issuable_path(issuable), button_class: "#{button_class} btn-reopen", toggle_class: "#{toggle_class} btn-reopen-color", method: button_method } } %li.reopen-item{ class: "#{issuable.closed? ? 'droplab-item-selected' : 'hidden'}", data: { text: "Reopen #{display_issuable_type}", url: reopen_issuable_path(issuable), button_class: "#{button_class} btn-reopen", toggle_class: "#{toggle_class} btn-reopen-color", method: button_method } }
%a{ href: '#' } %button.btn.btn-transparent
= icon('check') = icon('check', class: 'icon')
.description .description
%strong %strong
Reopen Reopen
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
%li{ data: { text: 'Report abuse', url: new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)), button_class: "#{button_class} btn-close-color", toggle_class: "#{toggle_class} btn-close-color", method: '' } } %li{ data: { text: 'Report abuse', url: new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)), button_class: "#{button_class} btn-close-color", toggle_class: "#{toggle_class} btn-close-color", method: '' } }
%a{ href: '#' } %button.btn.btn-transparent
= icon('check') = icon('check', class: 'icon')
.description .description
%strong Report abuse %strong Report abuse
%p %p
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
%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}" } }
%a{ href: '#' } %button.btn.btn-transparent
= icon('check') = icon('check', class: 'icon')
.description .description
%strong Comment %strong Comment
%p %p
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
%li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => 'Start discussion', 'close-text' => "Start discussion & close #{noteable_name}", 'reopen-text' => "Start discussion & reopen #{noteable_name}" } } %li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => 'Start discussion', 'close-text' => "Start discussion & close #{noteable_name}", 'reopen-text' => "Start discussion & reopen #{noteable_name}" } }
%a{ href: '#' } %button.btn.btn-transparent
= icon('check') = icon('check', class: 'icon')
.description .description
%strong Start discussion %strong Start discussion
%p %p
......
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