Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
187488fa
Commit
187488fa
authored
Jan 26, 2021
by
jboyson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect tooltip when drag comments enabled
parent
1252d865
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
app/assets/javascripts/diffs/components/diff_row.vue
app/assets/javascripts/diffs/components/diff_row.vue
+2
-2
app/assets/javascripts/diffs/components/diff_row_utils.js
app/assets/javascripts/diffs/components/diff_row_utils.js
+2
-2
changelogs/unreleased/jdb-fix-drag-comment-tooltip.yml
changelogs/unreleased/jdb-fix-drag-comment-tooltip.yml
+5
-0
No files found.
app/assets/javascripts/diffs/components/diff_row.vue
View file @
187488fa
...
@@ -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
};
...
...
app/assets/javascripts/diffs/components/diff_row_utils.js
View file @
187488fa
...
@@ -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;
...
...
changelogs/unreleased/jdb-fix-drag-comment-tooltip.yml
0 → 100644
View file @
187488fa
---
title
:
Fix tooltip when drag comment selection is enabled
merge_request
:
52595
author
:
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment