Skip to content

Commit 52b6b20

Browse files
chore: fix the position of diff open
1 parent 23b20e1 commit 52b6b20

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/styles/reportGenerator.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,13 @@ body {
322322

323323
.expandModalButton {
324324
position: absolute;
325-
top: 5px;
326-
right: 1.5rem;
325+
top: 8px;
326+
right: 8px;
327327
width: 30px;
328328
height: 30px;
329329
opacity: 0.7;
330330
display: none;
331+
z-index: 10;
331332
}
332333

333334
.report-wrapper {
@@ -601,9 +602,18 @@ td {
601602

602603
.diff-cell {
603604
min-width: 30rem;
605+
max-width: none !important;
606+
padding: 0 !important;
607+
overflow: visible !important;
604608
}
605609

606-
.diff-cell:hover .expandModalButton {
610+
.diff-content-wrapper {
611+
position: relative;
612+
display: block;
613+
width: 100%;
614+
}
615+
616+
.diff-content-wrapper:hover .expandModalButton {
607617
display: block;
608618
}
609619

src/utils/lwcparser/fileutils/FileDiffUtil.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export class FileDiffUtil {
1212
return '';
1313
}
1414
const diffArray: DiffPair[] = JSON.parse(diff) as DiffPair[];
15-
let result = '<div style="height: 120px; text-align: left; overflow-x: auto;">';
15+
// Wrap everything in a positioned container so button positions correctly within table cell
16+
let result = '<div class="diff-content-wrapper">';
17+
result += '<div style="height: 120px; text-align: left; overflow-x: auto; padding: 0.5rem;">';
1618
if (diffArray.length <= 6) {
1719
result += this.getDiffContent(diff) + '</div>';
1820
} else {
@@ -30,6 +32,7 @@ export class FileDiffUtil {
3032
</div>
3133
</div>`;
3234
}
35+
result += '</div>'; // Close diff-content-wrapper
3336
return result;
3437
}
3538

0 commit comments

Comments
 (0)