Skip to content

Commit 1254fc6

Browse files
wxiaoguangKN4CK3Rtechknowlogick
authored
Fix review comment context menu clipped bug (#23523) (#23543)
Backport #23523, Close #23517 There is no "dropdown menu" for image/csv view, so we could only add the "overflow-x: scroll" to the image/csv view. Co-authored-by: KN4CK3R <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent 0982402 commit 1254fc6

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Diff for: templates/repo/diff/box.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
{{end}}
162162
</div>
163163
{{if $showFileViewToggle}}
164-
<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}">
164+
{{/* for image or CSV, it can have a horizontal scroll bar, there won't be review comment context menu (position absolute) which would be clipped by "overflow" */}}
165+
<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}} gt-overflow-x-scroll">
165166
<table class="chroma gt-w-100">
166167
{{if $isImage}}
167168
{{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead}}

Diff for: web_src/css/helpers.css

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/* below class names match Tailwind CSS */
2323
.gt-pointer-events-none { pointer-events: none !important; }
2424
.gt-relative { position: relative !important; }
25+
.gt-overflow-x-scroll { overflow-x: scroll !important; }
2526

2627
.gt-mono {
2728
font-family: var(--fonts-monospace) !important;

Diff for: web_src/css/repository.css

-4
Original file line numberDiff line numberDiff line change
@@ -3337,10 +3337,6 @@ td.blob-excerpt {
33373337
min-width: 100px;
33383338
}
33393339

3340-
.diff-file-body {
3341-
overflow-x: scroll;
3342-
}
3343-
33443340
.diff-stats-bar {
33453341
display: inline-block;
33463342
background-color: var(--color-red);

0 commit comments

Comments
 (0)