Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix some file icon ui#36078

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
silverwind merged 7 commits intogo-gitea:mainfroma1012112796:zzc/dev/file_icon_ui
Dec 4, 2025

Conversation

@a1012112796
Copy link
Member

fix#36071

looks that's because if an svg in hiden env, it's color added byfill="url(#a)" will become not usefull. by ai helping, I think moving it out of page by position is a good solution. fell free creat a new pull request if you have a better soluton. Thanks.
image

fixgo-gitea#36071looks that's because if an svg in hiden env, it's coloradded by `fill="url(#a)"` will become not usefull. by ai helping,I think moving it out of page by position is a good solution.fell free creat a new pull request if you have a better soluton.Thanks.Signed-off-by: a1012112796 <1012112796@qq.com>
@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelDec 3, 2025
@github-actionsgithub-actionsbot added the modifies/goPull requests that update Go code labelDec 3, 2025
@a1012112796a1012112796 added the topic/uiChange the appearance of the Gitea UI labelDec 3, 2025
@silverwind
Copy link
Member

silverwind commentedDec 3, 2025
edited
Loading

Interesting bug. I can reproduce on Chrome and Safari, but not on Firefox. I think the root cause must be some obscure mechanism where some SVG elements like thislinearGradient inherit some CSS properties, like in this casedisplay: none.

I can't think of a better fix, but please move this CSS intoweb_src/css/base.css:

.hide-absolute {position: absolute;left:-9999px;}

@wxiaoguang
Copy link
Contributor

@silverwind
Copy link
Member

You mean the styling of.ui .form .autofill-dummy? It's not quite the same as this.

@wxiaoguang
Copy link
Contributor

wxiaoguang commentedDec 4, 2025
edited
Loading

You mean the styling of.ui .form .autofill-dummy? It's not quite the same as this.

I didn't say "same". I mean "similar":

  1. They are all caused by uncontrollable and unclear browser's behaviors
  2. They all need "not really hidden" but "visually not existing" elements
  3. They all have complex backgrounds and need comments to explain, otherwise the future readers won't understand

For this case, these styles work without magic number:

... {    position: absolute;    width: 0px;    height: 0px;    overflow: hidden;}

@silverwind
Copy link
Member

silverwind commentedDec 4, 2025
edited
Loading

Generally speaking I would avoid SVG "icon maps" withxlink. There are too many obscure browser behaviours/bugs related toxlink and rendering the SVG directly is best to avoid those.

@silverwind
Copy link
Member

@wxiaoguang
Copy link
Contributor

Generally speaking I would avoid SVG "icon maps" withxlink. There are too many obscure browser behaviours/bugs related toxlink and rendering the SVG directly is best to avoid those.

xlink was used to avoid duplicate SVG contents to reduce page size.

It should be easy to remove thexlink and render the icon directly. I am fine with either approach.

@silverwind
Copy link
Member

I don't think the size impact will really matter. On a big page, there may be 100 icons, which shouldn't be more than a few kBs.

@wxiaoguang
Copy link
Contributor

@wxiaoguang
Copy link
Contributor

wxiaoguang commentedDec 4, 2025
edited
Loading

I don't think the size impact will really matter. On a big page, there may be 100 icons, which shouldn't be more than a few kBs.

Not a few, but dozens of or hundreds of.

Detailsimage

@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsDec 4, 2025
@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsDec 4, 2025
@silverwindsilverwind merged commitee365f5 intogo-gitea:mainDec 4, 2025
23 checks passed
@GiteaBotGiteaBot added this to the1.26.0 milestoneDec 4, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull requestDec 4, 2025
fixgo-gitea#36071looks that's because if an svg in hiden env, it's color added by`fill="url(#a)"` will become not usefull. by ai helping, I think movingit out of page by position is a good solution. fell free creat a newpull request if you have a better soluton. Thanks.<img width="2198" height="1120" alt="image"src="https://github.com/user-attachments/assets/bbf7c171-0b7f-412a-a1bc-aea3f1629636"/>---------Signed-off-by: a1012112796 <1012112796@qq.com>Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBotGiteaBot added the backport/doneAll backports for this PR have been created labelDec 4, 2025
lunny pushed a commit that referenced this pull requestDec 4, 2025
Backport#36078 by@a1012112796fix#36071looks that's because if an svg in hiden env, it's color added by`fill="url(#a)"` will become not usefull. by ai helping, I think movingit out of page by position is a good solution. fell free creat a newpull request if you have a better soluton. Thanks.<img width="2198" height="1120" alt="image"src="https://github.com/user-attachments/assets/bbf7c171-0b7f-412a-a1bc-aea3f1629636"/>Signed-off-by: a1012112796 <1012112796@qq.com>Co-authored-by: a1012112796 <1012112796@qq.com>Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@a1012112796a1012112796 deleted the zzc/dev/file_icon_ui branchDecember 5, 2025 00:17
zjjhot added a commit to zjjhot/gitea that referenced this pull requestDec 5, 2025
* giteaofficial/main:  Add strikethrough button to markdown editor (go-gitea#36087)  Move commit related functions to gitrepo package (go-gitea#35600)  Fix the bug when ssh clone with redirect user or repository (go-gitea#36039)  fix some file icon ui (go-gitea#36078)  update golangci-lint to v2.7.0 (go-gitea#36079)  Use Golang net/smtp instead of gomail's smtp to send email (go-gitea#36055)  Fix edit user email bug in API (go-gitea#36068)  [skip ci] Updated translations via Crowdin
@xnoxxnox mentioned this pull requestDec 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@silverwindsilverwindsilverwind approved these changes

+1 more reviewer

@hiifonghiifonghiifong approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

backport/doneAll backports for this PR have been createdbackport/v1.25lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/frontendmodifies/goPull requests that update Go codetopic/uiChange the appearance of the Gitea UI

Projects

None yet

Milestone

1.26.0

Development

Successfully merging this pull request may close these issues.

File icon is not shown for *.kts and *.xml file

5 participants

@a1012112796@silverwind@wxiaoguang@hiifong@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp