Commit adf5bb7f authored by Phil Hughes's avatar Phil Hughes

Merge branch 'gt-remove-tooltip-on-sidebar-text-buttons' into 'master'

Remove tooltip on sidebar text buttons

Closes #8089

See merge request gitlab-org/gitlab-ee!8021
parents 47e4778e 6f2d7fa9
...@@ -48,6 +48,9 @@ export default { ...@@ -48,6 +48,9 @@ export default {
buttonLabel() { buttonLabel() {
return this.isTodo ? MARK_TEXT : TODO_TEXT; return this.isTodo ? MARK_TEXT : TODO_TEXT;
}, },
buttonTooltip() {
return !this.collapsed ? undefined : this.buttonLabel;
},
collapsedButtonIconClasses() { collapsedButtonIconClasses() {
return this.isTodo ? 'todo-undone' : ''; return this.isTodo ? 'todo-undone' : '';
}, },
...@@ -67,7 +70,7 @@ export default { ...@@ -67,7 +70,7 @@ export default {
<button <button
v-tooltip v-tooltip
:class="buttonClasses" :class="buttonClasses"
:title="buttonLabel" :title="buttonTooltip"
:aria-label="buttonLabel" :aria-label="buttonLabel"
:data-issuable-id="issuableId" :data-issuable-id="issuableId"
:data-issuable-type="issuableType" :data-issuable-type="issuableType"
......
---
title: Remove tooltip on sidebar text buttons
merge_request: 8021
author: George Tsiolis
type: other
...@@ -116,7 +116,7 @@ describe('SidebarTodo', () => { ...@@ -116,7 +116,7 @@ describe('SidebarTodo', () => {
const dataAttributes = { const dataAttributes = {
issuableId: '1', issuableId: '1',
issuableType: 'epic', issuableType: 'epic',
originalTitle: 'Mark todo as done', originalTitle: '',
placement: 'left', placement: 'left',
container: 'body', container: 'body',
boundary: 'viewport', boundary: 'viewport',
...@@ -130,6 +130,10 @@ describe('SidebarTodo', () => { ...@@ -130,6 +130,10 @@ describe('SidebarTodo', () => {
}); });
}); });
it('check button label computed property', () => {
expect(vm.buttonLabel).toEqual('Mark todo as done');
});
it('renders button label element when `collapsed` prop is `false`', () => { it('renders button label element when `collapsed` prop is `false`', () => {
const buttonLabelEl = vm.$el.querySelector('span.issuable-todo-inner'); const buttonLabelEl = vm.$el.querySelector('span.issuable-todo-inner');
......
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