Closed
Bug 1421495
Opened 7 years ago
Closed 7 years ago
Use full size SVG for a frequent site icon
Categories
(Webtools Graveyard :: Pontoon, enhancement, P4)
Webtools Graveyard
Pontoon
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: ravmn, Assigned: mathjazz)
References
Details
Attachments
(4 files)
For example, pontoon.mozilla.org uses a 512px × 512px SVG that is resized to 32px × 32px.
In the new tab, the tile is displayed as a thumbnail with the 32px icon.
Comment 1•7 years ago
|
||
Where do you see the svg on pontoon?
Reporter | ||
Comment 2•7 years ago
|
||
Sorry, a very big error. I mean SVG
https://pontoon.mozilla.org/static/img/logo.5b1f1c9f464d.svg
Summary: Use full size SVN for a frequent site icon → Use full size SVG for a frequent site icon
Reporter | ||
Comment 3•7 years ago
|
||
I got to the SVG using the "site info" window
Comment 4•7 years ago
|
||
Ah, looks like the svg is used as an image on the page and not as the page's icon:
<a href="/" class="logo"><img src="/static/img/logo.5b1f1c9f464d.svg" width="32" height="32"></a>
If I run the below in the web console from https://pontoon.mozilla.org/es-CL/
l = document.head.appendChild(document.createElement("link")); l.rel = "icon"; l.href = "https://pontoon.mozilla.org/static/img/logo.5b1f1c9f464d.svg";
I see the attached screenshot
Comment 5•7 years ago
|
||
Moving to pontoon to get the web pages updated to point to a svg icon.
Component: Activity Streams: Newtab → Pontoon
Product: Firefox → Webtools
Version: unspecified → other
Comment 6•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → m
Priority: -- → P4
Comment 7•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/pontoon
https://github.com/mozilla/pontoon/commit/bf181930c28cdd44b33793d75311437a5bdaee17
Fix bug 1421495: Add SVG favicon (#771)
Also add collectstatic to travis, incl. installing the required node packages.
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 8•7 years ago
|
||
Is this already deployed? I have tried to add Pontoon to activity stream (both in my own and in fresh Firefox profile) and I still see the page screenshot preview + small icon. Maybe you need to use '<link rel="apple-touch-icon">' or '<link rel="mask-icon">'.
Comment 9•7 years ago
|
||
It is deployed. The issue is caused by having the multiple <link rel=icon>s resulting in the last icon being used.
mak, the page could easily be adjusted to get Firefox to pick up the svg, but unclear if Firefox should be doing something smarter?
<link rel="icon" href="/static/img/logo.5b1f1c9f464d.svg">
<link rel="icon" href="/static/img/favicon.ee3981ed2a29.ico">
{
"iconUri":"https://pontoon.mozilla.org/static/img/logo.5b1f1c9f464d.svg",
"width":-1,
"isRichIcon":false,
"type":""
}
{
"iconUri":"https://pontoon.mozilla.org/static/img/favicon.ee3981ed2a29.ico",
"width":-1,
"isRichIcon":false,
"type":""
}
So we fall back to using the defaultIcon with no rich or preferred icons.
mak, independent of a Firefox fix, would you recommend mathjazz just add a sizes="any" or a type="image/svg+xml" or both?
Flags: needinfo?(mak77)
Comment 10•7 years ago
|
||
(In reply to Ed Lee :Mardak from comment #9)
> <link rel="icon" href="/static/img/logo.5b1f1c9f464d.svg">
> <link rel="icon" href="/static/img/favicon.ee3981ed2a29.ico">
>
> {
> "iconUri":"https://pontoon.mozilla.org/static/img/logo.5b1f1c9f464d.svg",
> "width":-1,
> "isRichIcon":false,
> "type":""
Ah yes, not defining a type is indeed a problem. We should try to guess the type from the extension in this case, it seems to make sense.
> mak, independent of a Firefox fix, would you recommend mathjazz just add a
> sizes="any" or a type="image/svg+xml" or both?
I think defining "type" would be a good idea, but we should really add type guessing to ContentLinkHandler.jsm. I filed bug 1422289, if anyone in your time has time to fix it that'd be great, otherwise I'll try to do that when I find some time. It should be trivial, it just needs a small test.
"Sizes" currently is used to pick a best icon for the screen res. That's not perfect yet, indeed we should probably always store both an svg AND the correct "sizes" icon when they are both present (bug 1419039). I don't think that sizes="any" helps in general and more particularly for our heuristics.
Flags: needinfo?(mak77)
Comment 11•7 years ago
|
||
Sorry, a typo: s/anyone in your time/anyone in your team/
Assignee | ||
Comment 12•7 years ago
|
||
Ed & Marco, thanks for hint!
I'll provide a patch which adds type to the SVG icon.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/pontoon
https://github.com/mozilla/pontoon/commit/14f9de9b020e45c375311181ed32e487e76d28f8
Fix bug 1421495: Define favicon type (#774)
Without the type defined, Firefox uses the last defined favicon. See
bug 1422289 for more details.
Updated•7 years ago
|
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
Resolution: --- → FIXED
Comment 15•7 years ago
|
||
Verified using latest Nightly 59.0a1
Build ID 20171205123322
Built from https://hg.mozilla.org/mozilla-central/rev/b4cef8d1dff06a1ec2b9bb17211c0c3c7f5b76fa
I see the original fix (which is the currently live version with:
> <link rel="icon" href="/static/img/logo.5b1f1c9f464d.svg">
> <link rel="icon" href="/static/img/favicon.ee3981ed2a29.ico">
Status: RESOLVED → VERIFIED
Updated•3 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•