Closed Bug 1534932 Opened 5 months ago Closed 3 months ago

Filtering warningGroup

Categories

(DevTools :: Console, enhancement, P1)

66 Branch
enhancement

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: [console-grouping-reserve])

Attachments

(1 file)

So, let's say we have the following console output:

10:00:00 ▼ ⚠️ Tracking Protection messages
10:00:00 | Request to access cookie or storage on “https://x.com/y.js” was blocked because it came from a tracker and content blocking is enabled | edition.cnn.com
10:00:01 | Request to access cookie or storage on “https://x.com/z.js” was blocked because it came from a tracker and content blocking is enabled | edition.cnn.com

If the user types Tracking Protection in the filter input, we should still get all 3 messages:

10:00:00 ▼ ⚠️ Tracking Protection messages
10:00:00 | Request to access cookie or storage on “https://x.com/y.js” was blocked because it came from a tracker and content blocking is enabled | edition.cnn.com
10:00:01 | Request to access cookie or storage on “https://x.com/z.js” was blocked because it came from a tracker and content blocking is enabled | edition.cnn.com

If the user types y.js in the filter input, we should get the messages about the script being blocked, inside the group

10:00:00 ▼ ⚠️ Tracking Protection messages
10:00:00 | Request to access cookie or storage on “https://x.com/y.js” was blocked because it came from a tracker and content blocking is enabled | edition.cnn.com

Meaning that if there's a message in a warningGroup, with at least one message matching the filter input, the group should be visible, and open if it wasn't.

Whiteboard: [console-group]
Priority: P2 → P3
Whiteboard: [console-group] → [console-grouping]
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P3 → P1

We want the warningGroup to be displayed if at least one of its
children will be visible.
We also want all the children if the warningGroup should be
visible.
This requires a few changes in the message reducers, mainly
in the getVisibility function. But we also modify
maybeSortVisibleMessages to place the messages in warningGroups
at the expected positions.

A complete mochitest is added to ensure the output always has
the expected messages in the expected order.

Depends on D31219

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/78571bb1f20e
Ensure filtering works with warningGroups. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Whiteboard: [console-grouping] → [console-grouping-reserve]
Regressions: 1559335
You need to log in before you can comment on or make changes to this bug.