Closed Bug 1961874 Opened 3 months ago Closed 3 months ago

Use Intl.ListFormat for netmonitor waterfall tooltip

Categories

(DevTools :: Netmonitor, task)

task

Tracking

(firefox139 fixed)

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: eemeli, Assigned: eemeli)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Currently, we're requiring localisers to specify a list item delimiter specifically for this string, including an escaped trailing space for many locales. We should rather use Intl.ListFormat, which already has the required data.

I put together a small patch for this, but I can't find a way to verify it -- is the devtools/client/netmonitor/src/components/request-list/RequestListColumnWaterfall.js component actually used any more, or has it been replaced by the new profiler?

Flags: needinfo?(odvarko)
Attached image tooltip

Hello eemeli, thanks for looking into this
There's actually a typo in this component that prevents the code you're modifying to be reached.
Applying the following diff, I can see that the localized string is being hit, and hovering the timing bar does show the result of timingTooltip (see screenshot)

diff --git a/devtools/client/netmonitor/src/components/request-list/RequestListColumnWaterfall.js b/devtools/client/netmonitor/src/components/request-list/RequestListColumnWaterfall.js
--- a/devtools/client/netmonitor/src/components/request-list/RequestListColumnWaterfall.js
+++ b/devtools/client/netmonitor/src/components/request-list/RequestListColumnWaterfall.js
@@ -183,7 +183,7 @@ module.exports = class RequestListColumn
     return dom.td(
       {
         className: "requests-list-column requests-list-waterfall",
-        onMouseOver: this.handeMouseOver,
+        onMouseOver: this.handleMouseOver,
       },
       div(
         {

Let us know if you have any other question

Flags: needinfo?(odvarko)

Ah, that does explain things. With that (now included in the patch) I could see my change working locally.

Pushed by earo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fdcfbd0f2e5a Use Intl.ListFormat for netmonitor waterfall tooltip. r=nchevobbe,devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: