Bug 209879 - Web Inspector: Use ECMAScript Numeric Separators for numbers with 5 or more digits
Summary: Web Inspector: Use ECMAScript Numeric Separators for numbers with 5 or more d...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-01 14:05 PDT by Nikita Vasilyev
Modified: 2020-04-01 15:51 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.96 KB, patch)
2020-04-01 14:08 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
Patch (8.50 KB, patch)
2020-04-01 15:13 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2020-04-01 14:05:19 PDT
Instead of `1000000` write `1_000_000` so it's easier to read.
Comment 1 Nikita Vasilyev 2020-04-01 14:08:15 PDT
Created attachment 395201 [details]
Patch
Comment 2 Joseph Pecoraro 2020-04-01 14:58:53 PDT
Comment on attachment 395201 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395201&action=review

Nice! Some comments

> Source/WebInspectorUI/UserInterface/Models/Geometry.js:569
> -        epsilon = epsilon || 0.0001;
> +        epsilon = epsilon || 0.000_1;

I don't like this one. But maybe that is just me?

> Source/WebInspectorUI/UserInterface/Models/ProfileNode.js:161
> +                if (this._selfTime < 0.000_1)

Ditto

> Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js:539
> +WI.TimelineRecording.TimestampThresholdForLegacyAssumedMilliseconds = 1_420_099_200_000; // Date.parse("Jan 1, 2015"). Milliseconds since epoch.

This is a very specific thing, not sure we even want to fake it being readable.

> Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js:392
> +        totalElement.textContent = Number.percentageString(percent === 1 ? percent : (percent - 0.000_5));

Ditto.
Comment 3 Nikita Vasilyev 2020-04-01 15:03:54 PDT
Comment on attachment 395201 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395201&action=review

>> Source/WebInspectorUI/UserInterface/Models/Geometry.js:569
>> +        epsilon = epsilon || 0.000_1;
> 
> I don't like this one. But maybe that is just me?

Yeah, I wasn't sure about this myself. I can revert.

>> Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js:539
>> +WI.TimelineRecording.TimestampThresholdForLegacyAssumedMilliseconds = 1_420_099_200_000; // Date.parse("Jan 1, 2015"). Milliseconds since epoch.
> 
> This is a very specific thing, not sure we even want to fake it being readable.

I agree. I simply found numbers with 5 or more digits. I'll revert this chunk if you think the rest is r+ worthy.
Comment 4 Joseph Pecoraro 2020-04-01 15:07:43 PDT
> I agree. I simply found numbers with 5 or more digits. I'll revert this
> chunk if you think the rest is r+ worthy.

Yep
Comment 5 Nikita Vasilyev 2020-04-01 15:13:37 PDT
Created attachment 395209 [details]
Patch
Comment 6 Joseph Pecoraro 2020-04-01 15:25:16 PDT
Comment on attachment 395209 [details]
Patch

r=me
Comment 7 EWS 2020-04-01 15:50:22 PDT
Committed r259368: <https://trac.webkit.org/changeset/259368>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395209 [details].
Comment 8 Radar WebKit Bug Importer 2020-04-01 15:51:19 PDT
<rdar://problem/61179192>