Commit a48f8b08 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch '249801_replace_bs_tooltip' into 'master'

Replace BSTooltip with GlTooltip

See merge request gitlab-org/gitlab!45028
parents f71c1719 6c963e6d
...@@ -125,9 +125,6 @@ export default class ActivityCalendar { ...@@ -125,9 +125,6 @@ export default class ActivityCalendar {
this.renderMonths(); this.renderMonths();
this.renderDayTitles(); this.renderDayTitles();
this.renderKey(); 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 // Add extra padding for the last month label if it is also the last column
...@@ -191,7 +188,8 @@ export default class ActivityCalendar { ...@@ -191,7 +188,8 @@ export default class ActivityCalendar {
stamp.count !== 0 ? this.color(Math.min(stamp.count, 40)) : '#ededed', stamp.count !== 0 ? this.color(Math.min(stamp.count, 40)) : '#ededed',
) )
.attr('title', stamp => formatTooltipText(stamp)) .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') .attr('data-container', 'body')
.on('click', this.clickDay); .on('click', this.clickDay);
} }
...@@ -279,9 +277,10 @@ export default class ActivityCalendar { ...@@ -279,9 +277,10 @@ export default class ActivityCalendar {
.attr('x', (color, i) => this.daySizeWithSpace * i) .attr('x', (color, i) => this.daySizeWithSpace * i)
.attr('y', 0) .attr('y', 0)
.attr('fill', color => color) .attr('fill', color => color)
.attr('class', 'js-tooltip') .attr('class', 'has-tooltip')
.attr('title', (color, i) => keyValues[i]) .attr('title', (color, i) => keyValues[i])
.attr('data-container', 'body'); .attr('data-container', 'body')
.attr('data-html', true);
} }
initColor() { initColor() {
......
...@@ -42,7 +42,7 @@ RSpec.describe 'Contributions Calendar', :js do ...@@ -42,7 +42,7 @@ RSpec.describe 'Contributions Calendar', :js do
"#{contributions} #{'contribution'.pluralize(contributions)}" "#{contributions} #{'contribution'.pluralize(contributions)}"
end end
"#{get_cell_color_selector(contributions)}[data-original-title='#{contribution_text}<br />#{date}']" "#{get_cell_color_selector(contributions)}[title='#{contribution_text}<br />#{date}']"
end end
def push_code_contribution 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