Closed Bug 1045934 Opened 10 years ago Closed 10 years ago

Emit warning when gaia selects an apple-touch-icon to show web content

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: daleharvey, Assigned: daleharvey)

References

Details

(Whiteboard: [systemsfe])

Attachments

(2 files)

Follow up to https://bugzilla.mozilla.org/show_bug.cgi?id=921014, this will require adding rel to the mozbrowser api, plus a warning gaia side when its used
To make it more explicit. 

Basically we implemented a *fallback* for sites which didn't have rel="icon" with appropriates sizes for homescreen. Now the browser will also look for apple-touch icons in the absence of the "sizes" ones. Because it is something that Web developers should NOT rely on when we will be getting rid of this fallback, we need a message in the Web Console warning them that there are missing icons.

Something along:

"Warning: The apple-touch icons are being used as a fallback only. They will be deprecated in the future. See @@link to MDN@@"

Message to refine.
Depends on: 921014
We should definitely do this.

Dale, can you please provide some text for the messages?  Thanks!
Flags: needinfo?(dale)
Depends on: 1045974
Yup sorry was supposed to take this as I opened

Karl who can be responsible for the message + MDN page, once those are in place I can implement it
Assignee: nobody → dale
Flags: needinfo?(dale) → needinfo?(kdubost)
(In reply to Dale Harvey (:daleharvey) from comment #3)
> Yup sorry was supposed to take this as I opened
> 
> Karl who can be responsible for the message + MDN page, once those are in
> place I can implement it

The closest we have so far in MDN, we do have:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link
https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/places_favicon
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/mozIAsyncFavicons

Maybe I missed it, but if not, we need to write something on how to make a good icon page with best practices. Some input from the bugs and from mathias bynen page.
http://mathiasbynens.be/notes/touch-icons

I could help create it and I'm pretty sure Chris could help me to straighten it a bit. 
Chris, which section of the wiki would be good?

Chris also for the message, I'm pretty sure you will be able to turn my prose in a better straightforward messge.
> Warning: The apple-touch icons are being used as a fallback only. They will be deprecated in the future. See @@link to MDN@@
Flags: needinfo?(kdubost)
Flags: needinfo?(dale)
Flags: needinfo?(cmills)
We have this page:

https://developer.mozilla.org/en-US/Apps/Build/installable_apps/Icon_implementation_for_apps

Which is at a nascent stage, but is intended to be a one stop shop for everything you'd want to know about icon implementation. I think this sounds like a good place - more content much appreciated!
Flags: needinfo?(cmills)
> https://developer.mozilla.org/en-US/Apps/Build/installable_apps/Icon_implementation_for_apps 

Wouldnt really be suitable, we only use apple-touch-icons to display icons for web content, if its an installed app then the manifest icons are used.

It would need to be a plain Icons for web content article or something
Flags: needinfo?(dale)
(In reply to Dale Harvey (:daleharvey) from comment #6)
> > https://developer.mozilla.org/en-US/Apps/Build/installable_apps/Icon_implementation_for_apps 
> 
> Wouldnt really be suitable, we only use apple-touch-icons to display icons
> for web content, if its an installed app then the manifest icons are used.
> 
> It would need to be a plain Icons for web content article or something

Well, the app zone is supposed to be about web apps in general, including installable (Firefox OS) apps. Although I see I've got this under the "Installable apps" node in the tree. If I moved it out of this node into somewhere more general and included a "General icons for web content" section, it could go in there?
Yup that sounds perfect
(In reply to Dale Harvey (:daleharvey) from comment #8)
> Yup that sounds perfect

Here you go:

https://developer.mozilla.org/en-US/Apps/Build/Icon_implementation_for_apps#General_icons_for_web_apps
(In reply to Dale Harvey (:daleharvey) from comment #8)
> Yup that sounds perfect

Here you go:

https://developer.mozilla.org/en-US/Apps/Build/Icon_implementation_for_apps#General_icons_for_web_apps
Whiteboard: [systemsfe]
Gaia side of this patch, Chris I took the message from https://bugzilla.mozilla.org/show_bug.cgi?id=1045934#c1, mention if it needs changed, also the url is currently TBD
Attachment #8493372 - Flags: review?(kgrandon)
Attachment #8493372 - Flags: feedback?(cmills)
Attached patch 1045934.patchSplinter Review
Attachment #8493374 - Flags: review?(fabrice)
Comment on attachment 8493372 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/24307

Seems fine to me. I left a note about localization, not sure if it's important or not as it's just targeted towards developers looks like. Also wonder if we should change the component of this bug.
Attachment #8493372 - Flags: review?(kgrandon) → review+
Attachment #8493374 - Flags: review?(fabrice) → review+
Attachment #8493372 - Flags: feedback?(cmills)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: