-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ui bug in wiki commit page #12089
Conversation
templates/repo/diff/box.tmpl
Outdated
@@ -79,7 +79,7 @@ | |||
</h4> | |||
</div> | |||
{{else}} | |||
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}" id="diff-{{.Index}}"> | |||
<div class="diff-file-box diff-box file-content {{if $.Editorconfig}}{{TabSizeClass $.Editorconfig $file.Name}}{{else}}tab-size-8{{end}}" id="diff-{{.Index}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div class="diff-file-box diff-box file-content {{if $.Editorconfig}}{{TabSizeClass $.Editorconfig $file.Name}}{{else}}tab-size-8{{end}}" id="diff-{{.Index}}"> | |
<div class="diff-file-box diff-box file-content {{if $.Editorconfig}}{{TabSizeClass $.Editorconfig $file.Name}}{{else}}tab-size-4{{end}}" id="diff-{{.Index}}"> |
I think 4 is a better default. 8 is rather archaic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, It is kept same with TabSizeClass
define now. Maybe your change is meaningful, but I don't like to change it in this pr, because it's not the main aim of this pr. Thanks.
ref:
gitea/modules/templates/helper.go
Lines 177 to 178 in e3b7198
} | |
return "tab-size-8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, yeah keep it at 8 for now.
Can we make the Maybe it should take a |
TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com>
Good idea, Thanks |
Should this PR be backport? |
I think it's necessary. Thanks |
make lg-tm work |
please send backport |
* Fix ui bug in wiki commit page TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com> * fix a small nit Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Fix ui bug in wiki commit page TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com> * fix a small nit Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Fix ui bug in wiki commit page TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com> * fix a small nit Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
Detail: If the repo is empty but the wiki is not empty. The commit ui will be broken. I'm not sure if
TabSizeClass
will become a bug in other places, maybe should have more check.view:
TODO: Maybe we should allow wiki to have its own
.editorconfig
file.