Commit 6c963e6d authored by Vasilii Iakliushin's avatar Vasilii Iakliushin

Replace BSTooltip with GlTooltip

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/249801

It replaces tooltip({}) to migrate a Bootstrap tooltip API call to the
GlTooltip API.
parent a32f5726
......@@ -125,9 +125,6 @@ export default class ActivityCalendar {
this.renderMonths();
this.renderDayTitles();
this.renderKey();
// Init tooltips
$(`${container} .js-tooltip`).tooltip({ html: true });
}
// Add extra padding for the last month label if it is also the last column
......@@ -191,7 +188,8 @@ export default class ActivityCalendar {
stamp.count !== 0 ? this.color(Math.min(stamp.count, 40)) : '#ededed',
)
.attr('title', stamp => formatTooltipText(stamp))
.attr('class', 'user-contrib-cell js-tooltip')
.attr('class', 'user-contrib-cell has-tooltip')
.attr('data-html', true)
.attr('data-container', 'body')
.on('click', this.clickDay);
}
......@@ -279,9 +277,10 @@ export default class ActivityCalendar {
.attr('x', (color, i) => this.daySizeWithSpace * i)
.attr('y', 0)
.attr('fill', color => color)
.attr('class', 'js-tooltip')
.attr('class', 'has-tooltip')
.attr('title', (color, i) => keyValues[i])
.attr('data-container', 'body');
.attr('data-container', 'body')
.attr('data-html', true);
}
initColor() {
......
......@@ -42,7 +42,7 @@ RSpec.describe 'Contributions Calendar', :js do
"#{contributions} #{'contribution'.pluralize(contributions)}"
end
"#{get_cell_color_selector(contributions)}[data-original-title='#{contribution_text}<br />#{date}']"
"#{get_cell_color_selector(contributions)}[title='#{contribution_text}<br />#{date}']"
end
def push_code_contribution
......
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