-
-
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
Allow custom file icons #32331
base: main
Are you sure you want to change the base?
Allow custom file icons #32331
Conversation
It's better to have a configuration item on app.ini to switch the icon pack. |
Not in this PR but I would prefer to be able to select this as per-user option |
I think making icons as new storage is better so that icons can be put in Minio or S3 compatible places and can be cached with CDN or similar tools. |
Actually there are other attempts for this, for example, Add material icons for file list #26236 But there are still no agreements about:
|
Currently, I prefer to put these pack files as standalone files and managed by storage, so that they can be stored in S3 compatible places. I think this could be an experiment feature first. We can provide official icon packs in another repository and CI can publish it to dl.gitea.com so that users can download an archived file and extract it to gitea. Or we can provide a upload file UI in the admin panel, so users can upload them to storage. |
Then I think some maintainers who have infra access should take over Add material icons for file list #26236 and continue there. |
If you don't mind, I will create a new pull request from #26236 |
IMO definitely not as part of the Gitea repo. Those icon packs are often quite large and update frequently.
The docs should describe how icon packs should be created. Having a reference icon pack would be great as it will easily show the community how to create their own.
This PR is basically based on #26236 now with the difference of using plain files from a folder which seems to be extremely simple to me. I also thought of using an http proxy for icons. So it would call For shipping I would suggest to start with something simple. Just clone your icon pack into |
Feel free to do.
It (
Just FYI: Gitea has a messy "path" system (a lot of hacky patches in history). So what you see might not be what it is. Although I have fixed many legacy path problems, I didn't really "break" it to make it correct. An real example: there is a "custom path" for templates and "options(licenses, labels, etc)", and there is a "data path" for user's data (repositories, avatars). In docker, the "custom path" and "data path" is unfortunately mixed together, so you could see "data/templates" and "data/repositories" in the same "data" directory in docker, but that's not true for non-docker installations. So Update: and I can see there are some more problems in this PR.
TBH I think the "icon pack" solution could be continued by #26236 with a separate icon pack file. |
closes #11149
Based on the latest discussions this would be my suggestion for the custom file icons:
data/icons/<my-icon-pack>
folderWould be interested in feedback before continuing 😊
Sample icons: https://github.com/anbraten/gitea-icons
TODO
allow user to select an icon pack from a list configured by admin(skipped for now. could be easily added later on if required)