瀏覽代碼

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 <admin@oldschoolhack.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
tags/v1.19.0
wxiaoguang 1 年之前
父節點
當前提交
1254fc668a
No account linked to committer's email address
共有 3 個文件被更改,包括 3 次插入5 次删除
  1. 2
    1
      templates/repo/diff/box.tmpl
  2. 1
    0
      web_src/css/helpers.css
  3. 0
    4
      web_src/css/repository.css

+ 2
- 1
templates/repo/diff/box.tmpl 查看文件

@@ -161,7 +161,8 @@
{{end}}
</div>
{{if $showFileViewToggle}}
<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}">
{{/* 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" */}}
<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">
<table class="chroma gt-w-100">
{{if $isImage}}
{{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead}}

+ 1
- 0
web_src/css/helpers.css 查看文件

@@ -22,6 +22,7 @@
/* below class names match Tailwind CSS */
.gt-pointer-events-none { pointer-events: none !important; }
.gt-relative { position: relative !important; }
.gt-overflow-x-scroll { overflow-x: scroll !important; }

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

+ 0
- 4
web_src/css/repository.css 查看文件

@@ -3337,10 +3337,6 @@ td.blob-excerpt {
min-width: 100px;
}

.diff-file-body {
overflow-x: scroll;
}

.diff-stats-bar {
display: inline-block;
background-color: var(--color-red);

Loading…
取消
儲存