Don't show hover styling when a line can't be commented on

- outside of reviews
- when there is already a comment on that line
This commit is contained in:
Rūdolfs Ošiņš
2025-03-19 09:00:59 +01:00
committed by Sebastian Martinez
parent 7b28e4202f
commit a3c143070e
+9 -4
View File
@@ -273,10 +273,13 @@
position: relative;
cursor: cell;
}
.left:hover,
.right:hover,
.left:active,
.right:active {
.selection-disabled {
cursor: default;
}
.left:hover:not(.selection-disabled),
.right:hover:not(.selection-disabled),
.left:active:not(.selection-disabled),
.right:active:not(.selection-disabled) {
color: var(--color-foreground-contrast);
}
.sign {
@@ -356,6 +359,7 @@
isSelected(filePath(file, "left"), hunkIdx, lineIdx)}>
<div
class="left"
class:selection-disabled={!codeComments || thread}
class:marker={selection?.start.side === "left" &&
selection.start.lineNumber === lineNumber(line, "left")}
onpointerdown={e => {
@@ -368,6 +372,7 @@
<div
class="right"
class:selection-disabled={!codeComments || thread}
class:marker={selection?.start.side === "right" &&
selection.start.lineNumber === lineNumber(line, "right")}
onpointerdown={e => {