Closed Bug 1545888 Opened 2 years ago Closed 1 year ago

Use template-styled message with placeholders as group header

Categories

(DevTools :: Console, task, P2)

task

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: Harald, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

Current group label: Content blocked messages

For blocked resources (separate groups filed in bug 1545887), this label should be use the message template, but with meaningful placeholders instead of the value (in most cases this just entails the <URL>):

The resource at <URL> was blocked because content blocking is enabled.

For groupable messages this will require us to change the message where they are logged – logging them as templates; so Console doesn't only get the final concatenated string but the message template with separate named arguments.

With Bug 1493361, we'll get error messages that looks like : The resource at %1$F was blocked because content blocking is enabled, which would help tackling this bug.

Depends on: 1493361
Type: defect → task
Priority: -- → P2

This allows to have more meaningful warning group messages, i.e.
"Content Blocking" is turned into something like "The resource at
'<URL>' was blocked because content blocking is enabled".

This is done by parsing the message of the first warning to put
in the group, and replacing the URL with a generic placeholder.

We take this as an opportunity to decouple content blocked messages
and storage access blocked ones, as they have slightly different
meanings and consequences.

Tests are updated to match the new labels, and a new test is
added to make sure that we can have multiple warning group in a
single "page navigation" session.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d218c415396f
Use template-styled message with placeholders as warning group labels. r=Honza.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Assignee: nobody → nchevobbe
Regressions: 1558692
You need to log in before you can comment on or make changes to this bug.