Closed Bug 1309347 Opened 3 years ago Closed Last year

Flickering extension icon animation when using chrome.browserAction.setIcon()

Categories

(WebExtensions :: Frontend, enhancement, P5)

51 Branch
x86_64
Linux
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: *moz, Unassigned)

References

Details

(Whiteboard: triaged)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce:

animate extension icon using chrome.browserAction.setIcon() in a loop

code is at https://www.git.taler.net/?p=wallet-webex.git;a=blob;f=lib/wallet/chromeBadge.ts
git clone git://taler.net/wallet-webex.git # lib/wallet/chromeBadge.ts

animation is running right after loading the extension

tested in firefox 50.0b4 and 51.0a2



Actual results:

animation is flickering


Expected results:

animation should not be flickering, just like in chrome/ium
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Summary: Flickering extension icon when animating it by passing ImageData to chrome.browserAction.setIcon() in a loop → Flickering extension icon animation when using chrome.browserAction.setIcon()
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Animated images for toolbar buttons are intentionally not supported.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Component: WebExtensions: General → WebExtensions: Frontend
Resolution: --- → WONTFIX
We have the following arguments for supporting this:

1) Compatibility. Chrome supports it, and we want to have the same look and feel for extensions across browsers.

2) We want users to know if our extension uses CPU (we do crypto) or the network (we have nothing to hide, and respect your privacy, so we don't "phone home", and if we do background work, we at least visualize it).
The animation is also very fast (we tested!) and not disruptive (the Taler logo is a T in a circle, and we put a tiny gap in the circle and move that around *while* the extension does work).
So while we agree that permanently flashing extension icons are not nice, they are sometimes (while an extension does work) useful indications to show the user that something is going on.


The extension we are developing is available for multiple browsers at https://taler.net/wallet

Edit: the correct web URL for the relevant code is
https://git.taler.net/wallet-webex.git/tree/lib/wallet/chromeBadge.ts
Status: RESOLVED → UNCONFIRMED
Resolution: WONTFIX → ---
For reference, the Chrome WebExtensions documentation specifically mentions "smooth animation" as a use case for icons, and also warns developers not to constantly animate the icon.
https://developer.chrome.com/extensions/browserAction
Priority: -- → P5
Whiteboard: triaged
https://i.imgur.com/iR5ctqw.gif

Flickering badge icon. Badge icon is updated every 1 second. Flickers only on first animation sequence. Subsequent animation sequences won't flicker.
Product: Toolkit → WebExtensions
Duplicate of this bug: 1429750
Animated icons, in general, tend to be abused by extension developers as an attention-grabbing mechanism, leading to poor user experiences. In addition, the technical reason behind the flickering (multi-process communication) would require a fair amount of engineering work to fix. So while some extensions could (and would) potentially take advantage of this in an appropriate way, there is no desire within Firefox to support smooth icon animations at this time.
Severity: normal → enhancement
Status: UNCONFIRMED → RESOLVED
Closed: 3 years agoLast year
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.