Commit c1f022e7 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '229003-migrate-notifications-tooltip' into 'master'

Migrate collapsed notification tooltip

See merge request gitlab-org/gitlab!45453
parents eab7af21 a2686ff3
<script> <script>
import { GlIcon } from '@gitlab/ui'; import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import toggleButton from '~/vue_shared/components/toggle_button.vue'; import toggleButton from '~/vue_shared/components/toggle_button.vue';
import tooltip from '~/vue_shared/directives/tooltip';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
const ICON_ON = 'notifications'; const ICON_ON = 'notifications';
...@@ -13,7 +12,7 @@ const LABEL_OFF = __('Notifications off'); ...@@ -13,7 +12,7 @@ const LABEL_OFF = __('Notifications off');
export default { export default {
directives: { directives: {
tooltip, GlTooltip: GlTooltipDirective,
}, },
components: { components: {
GlIcon, GlIcon,
...@@ -110,12 +109,9 @@ export default { ...@@ -110,12 +109,9 @@ export default {
<div> <div>
<span <span
ref="tooltip" ref="tooltip"
v-tooltip v-gl-tooltip.viewport.left
class="sidebar-collapsed-icon"
:title="notificationTooltip" :title="notificationTooltip"
data-container="body" class="sidebar-collapsed-icon"
data-placement="left"
data-boundary="viewport"
@click="onClickCollapsedIcon" @click="onClickCollapsedIcon"
> >
<gl-icon <gl-icon
......
---
title: Migrate collapsed notification tooltip
merge_request: 45453
author: artychan
type: other
...@@ -94,7 +94,7 @@ describe('Subscriptions', () => { ...@@ -94,7 +94,7 @@ describe('Subscriptions', () => {
it('sets the correct display text', () => { it('sets the correct display text', () => {
expect(wrapper.find('.issuable-header-text').text()).toContain(subscribeDisabledDescription); expect(wrapper.find('.issuable-header-text').text()).toContain(subscribeDisabledDescription);
expect(wrapper.find({ ref: 'tooltip' }).attributes('data-original-title')).toBe( expect(wrapper.find({ ref: 'tooltip' }).attributes('title')).toBe(
subscribeDisabledDescription, subscribeDisabledDescription,
); );
}); });
......
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