Closed Bug 1316668 Opened 8 years ago Closed 4 years ago

Improve the Developer Tools notification

Categories

(Web Compatibility :: Interventions, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: denschub, Unassigned)

References

Details

At the moment, due to platform limitations and/or our lack of understanding it, the Developer Tools notification is limited to letting developers know we changed something. In version 2 of our addon, we should provide more details: - A link to the webcompat/bugzilla issue which contains more information about the issue, how to resolve it, ... - A link to instructions on how to disable the overrides, so developers are able to test their stuff
See Also: 13082711307788
Add dependency to bug 1317772, if we can use way other than webextension in chrome mode to write notification to web console.
Undoing that. Bug 1317772 is for the responsive design mode. :)
No longer blocks: rdm-web-compat
Blocks: 1386807
No longer blocks: 1386807

Dennis, what is the current state of devtools notifications when an intervention is active?

Type: defect → enhancement
Flags: needinfo?(dschubert)
Priority: -- → P3

Unfortunately, it's more complicated after our webextension rewrite. In the case of JS injections, we can add a simple console.log() to our injection, because that JS is executed within the website itself. However, that does not work for CSS injections, or user agent overrides.

Running console.log() in the background script where UA overrides and injecting the CSS happens would result in the message being logged into the browser console. For our use case, this is pretty much useless, because web developers will not see the message there.

And unfortunately, there also is no way of "finding the proper console API to write directly to the tab", because of webextension framework limitations. The only way I can think of to do site-console logging at the moment is to add a content script into every single website, then pass some messages between the content script and the background script to see if any interventions got applied, and if so, log something to the console. However, this sounds like it will have a significant performance hit.

This needs more research, unfortunately. :(

Flags: needinfo?(dschubert)

Thanks for the reply Dennis.

Would a webext experimental API help us?

However, this sounds like it will have a significant performance hit.

We could measure this, I guess.

Follwing this commit, all interventions now get a very visible console notification.

Shipping this new feature will happen as part of v16 in bug 1663967, but since the PR is merged upstream, I'll close this as fixed!

Status: NEW → RESOLVED
Closed: 4 years ago
Depends on: 1663967
Resolution: --- → FIXED
Blocks: 1663967
No longer depends on: 1663967
You need to log in before you can comment on or make changes to this bug.