-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
gitea png to logo #13974
gitea png to logo #13974
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13974 +/- ##
=========================================
Coverage ? 42.26%
=========================================
Files ? 726
Lines ? 77684
Branches ? 0
=========================================
Hits ? 32830
Misses ? 39479
Partials ? 5375 Continue to review full report at Codecov.
|
It's kind breaking since lot of sites have customized there logo and have to change the path if merged ... |
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 don't think this is necessary. You can change the customized template to use your own logo.
@6543 Yes, this is likely a breaking change @lunny This simplifies the process and reduces the number of upstream conflicts in new forked projects. The idea here is twofold:
I'll leave it up to you and the rest of the maintainers whether a potentially breaking change for existing forks is worth it to reduce the number of breaking changes in future forks. I think so, but happy to close the PR if the team sees otherwise 👍 |
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.
Thanks for PR :)
Blocking until #13680 is merged due to potential merge conflicts that will arise from both PRs.
K, I can rebase when that gets merged. One solution to avoid the breaking change is to keep the This way, anyone referencing |
Rename is a good idea but I wonder if we can cut down the amount of different sizes. We could use SVG in HTML exclusively and it would be consistent with the favicon which we requires as SVG already. It would get harder to use raster images for customization but apparently it's not impossible to embed them in SVG and with the favicon already changed, we have already committed to requiring a vector image. |
+1 to svg, I'll likely use svg in my fork. If this is the accepted solution I'm happy to make this change. I would leave The only place |
Full conversation to SVG will need more consideration and testing, I guess we can do it another time. I think the primary blockers are mobile browsers which use the PNGs for the homescreen icon. I can't find any definitive info on SVG support for those but I'd expect some issues. For example Chrome devtools can not deal with https://bugs.chromium.org/p/chromium/issues/detail?id=1107123 |
I can at least update all of the template html references to svg and leave the manifest alone for now. It resolves my concern and removes a future breaking change. |
Yeah, HTML is always fine to update. |
I think https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/UI_considerations#How_an_icon_is_selected |
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.
Dismissing my blocking review.
Thanks for this PR :)
82a81b9
to
7623ac0
Compare
@techknowlogick You're very welcome. I've made some significant changes and rebased since you approved - can you take another look? |
CI failed seems unrelated. |
This PR should be all set to merge 👍 |
Thanks again :) |
As a next step, I think we should reduce the logos in use further, there is no reason to fetch Dimensions shouldn't matter for a SVG file but I recall keeping it at 32px for possible compatibilty for favicons. Also, we can possible cut down on the number of PNGs. |
Yeah, seen it. I disagree about the Followup PR: #14136 |
Closes #13969
More general usage for logo png files to make it easier for users to customize logo.
Users should now be able to replace the file
logo.svg
with a custom svg logo and runmake generate-images
to update the logo (no need to change the templates).Note: I've kept
gitea.svg
andgitea-192.png
for use in locations that should retain the gitea logo even after the fork logo is updated, such as the README files and webhook html templates. To regenerate these images, runTAGS="gitea" make generate-images
.Edit: After some discussion (see below), I've also updated most html template references to
logo.svg
instead of png.