Commit 187488fa authored by jboyson's avatar jboyson

Fix incorrect tooltip when drag comments enabled

parent 1252d865
...@@ -99,10 +99,10 @@ export default { ...@@ -99,10 +99,10 @@ export default {
}); });
}, },
addCommentTooltipLeft() { addCommentTooltipLeft() {
return utils.addCommentTooltip(this.line.left); return utils.addCommentTooltip(this.line.left, this.glFeatures.dragCommentSelection);
}, },
addCommentTooltipRight() { addCommentTooltipRight() {
return utils.addCommentTooltip(this.line.right); return utils.addCommentTooltip(this.line.right, this.glFeatures.dragCommentSelection);
}, },
emptyCellRightClassMap() { emptyCellRightClassMap() {
return { conflict_their: this.line.left?.type === CONFLICT_OUR }; return { conflict_their: this.line.left?.type === CONFLICT_OUR };
......
...@@ -50,11 +50,11 @@ export const classNameMapCell = ({ line, hll, isLoggedIn, isHover }) => { ...@@ -50,11 +50,11 @@ export const classNameMapCell = ({ line, hll, isLoggedIn, isHover }) => {
]; ];
}; };
export const addCommentTooltip = (line) => { export const addCommentTooltip = (line, dragCommentSelectionEnabled = false) => {
let tooltip; let tooltip;
if (!line) return tooltip; if (!line) return tooltip;
tooltip = gon.drag_comment_selection tooltip = dragCommentSelectionEnabled
? __('Add a comment to this line or drag for multiple lines') ? __('Add a comment to this line or drag for multiple lines')
: __('Add a comment to this line'); : __('Add a comment to this line');
const brokenSymlinks = line.commentsDisabled; const brokenSymlinks = line.commentsDisabled;
......
---
title: Fix tooltip when drag comment selection is enabled
merge_request: 52595
author:
type: fixed
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