-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add material icons for file list #33837
Conversation
|
c1f191a
to
318a317
Compare
773ec63
to
7990e65
Compare
12703f4
to
e240070
Compare
e240070
to
b23f073
Compare
Let's merge and try it. If there is any problem, there are chances to revert or improve in following PRs. |
Follow up fix: Fix material icon & diff highlight #33844 |
(cherry picked from commit 34e5df6)
Small question: What exactly changed since the last proposal by @yardenshoham? |
Okay, I just skimmed over the changes. |
* giteaofficial/main: Fix various Fomantic UI and htmx problems (go-gitea#33851) Add workflow_job webhook (go-gitea#33694) Fix file icon mapping (go-gitea#33855) Drop fomantic build (go-gitea#33845) Fix auto concurrency cancellation skips commit status updates (go-gitea#33764) Fix test code (go-gitea#33829) Remove "noscript" tag from html head (go-gitea#33846) Fix material icon & diff highlight (go-gitea#33844) Fix LFS URL (go-gitea#33840) Add material icons for file list (go-gitea#33837)
@@ -26,7 +26,6 @@ | |||
{{else}} | |||
{{if $entry.IsDir}} | |||
{{$subJumpablePathName := $entry.GetSubJumpablePathName}} | |||
{{svg "octicon-file-directory-fill"}} |
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.
Have you considered not removing this identifier for compatibility with other icon plugins, such as Catppuccin for GitHub File Explorer Icons
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.
TBH I don't know how these plugins work. And Gitea doesn't promise HTML layout / template compatibility between release. For example: before this PR, the "file list" has been heavily refactored in GitHub like repo home page #32213
If you have ideas about how to improve the layout and/or make plugins work, feel free to make some proposals/PRs.
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.
Just read the plugin's code briefly.
If you mean that "we need to add a special CSS name for directories to make it could be query-selected by the plugin", I think we can add it in renderFileIconSVG
function, it should be able to know whether the current entry is a dir or a file.
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.
You can make changes as you like, or ignore this review
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.
Sorry but I haven't got your point .....
Do you mean that it should keep octicon-file-directory-fill
? Or it could output something like this?
<svg class="svg ... icontype-dir">for a directory</svg>
<svg class="svg ...">for a file</svg>
?
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.
Yes, my opinion is that there is no need to modify this class attribute
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.
-> Add old svg class name to git entry icon #33884
This one should be good enough.
Doc: https://gitea.com/gitea/docs/pulls/181