Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Issue 2623143002: DevTools: insert console message decorations in order

Created:
3 years, 11 months ago by luoe
Modified:
3 years, 7 months ago
Reviewers:
pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: insert console message decorations in order Console messages can have decorations, which may be persistent, toggled via settings, or dependent on nesting level or repeat count. Before, they inserted themselves into the DOM, and only by change happened to appear in the order: Nesting level markers > Level icon > Timestamp / Repeat count(grows) Now, they will appear in deterministic order, as if they were columns: Timestamp > Level icon > Nesting level markers > Repeat count(grows) Please see comment #11 in the bug for screenshots. BUG=679815

Patch Set 1 #

Patch Set 2 : mm #

Patch Set 3 : cc #

Patch Set 4 : tests #

Patch Set 5 : a #

Patch Set 6 : testse #

Patch Set 7 : address design comments #

Total comments: 22

Patch Set 8 : ac #

Total comments: 3

Patch Set 9 : DevTools: update console timestamp style #

Patch Set 10 : upstreamed to timestamp cl #

Patch Set 11 : icons on the left #

Patch Set 12 : a #

Patch Set 13 : a #

Total comments: 2

Patch Set 14 : Options #

Patch Set 15 : DevTools: insert console message decorations in order #

Patch Set 16 : with tests #

Patch Set 17 : a #

Patch Set 18 : rebase #

Total comments: 4

Patch Set 19 : ac #

Patch Set 20 : a #

Patch Set 21 : a #

Patch Set 22 : a #

Total comments: 10

Patch Set 23 : ac with slots #

Patch Set 24 : a #

Patch Set 25 : a #

Total comments: 10

Patch Set 26 : a #

Total comments: 6

Patch Set 27 : build markers on waasShown #

Total comments: 6

Patch Set 28 : ac #

Patch Set 29 : rebase #

Patch Set 30 : timestamp margin #

Patch Set 31 : rebase now that wasShown is called less often #

Patch Set 32 : fix test, rebuild decorations after list updated #

Total comments: 4

Patch Set 33 : address comment #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+220 lines, -282 lines) Patch
M third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-links-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-stack-in-errors-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +21 lines, -21 lines 1 comment Download
M third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-object-preview-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +62 lines, -62 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-proxy-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-tests-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 8 chunks +3 lines, -44 lines 1 comment Download
M third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 9 chunks +92 lines, -99 lines 1 comment Download
M third_party/WebKit/Source/devtools/front_end/console/consoleView.css View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 7 chunks +29 lines, -43 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 48 (21 generated)
luoe
ptal for early review. test coming soon.
3 years, 11 months ago (2017-01-13 18:25:51 UTC) #3
luoe
ready for review
3 years, 11 months ago (2017-01-18 03:46:41 UTC) #4
luoe
caseq@, are you available to take a look?
3 years, 11 months ago (2017-01-18 19:32:54 UTC) #6
luoe
3 years, 11 months ago (2017-01-18 20:30:37 UTC) #8
luoe
There's a new screenshot in the crbug comment #6. Timestamps and context labels take up ...
3 years, 11 months ago (2017-01-19 01:33:00 UTC) #9
allada
looks good! https://codereview.chromium.org/2623143002/diff/120001/third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html File third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html (right): https://codereview.chromium.org/2623143002/diff/120001/third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html#newcode6 third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html:6: <script> nit: can we merge these two ...
3 years, 11 months ago (2017-01-19 02:38:08 UTC) #10
luoe
ptal https://codereview.chromium.org/2623143002/diff/120001/third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html File third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html (right): https://codereview.chromium.org/2623143002/diff/120001/third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html#newcode6 third_party/WebKit/LayoutTests/inspector/console/console-log-multiple-execution-contexts.html:6: <script> On 2017/01/19 02:38:07, allada wrote: > nit: ...
3 years, 11 months ago (2017-01-19 23:23:00 UTC) #11
dgozman
https://codereview.chromium.org/2623143002/diff/140001/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js File third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js (right): https://codereview.chromium.org/2623143002/diff/140001/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js#newcode461 third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js:461: this._versionId = ''; We cannot have versionId/versionStatus in ExecutionContext. ...
3 years, 11 months ago (2017-01-20 00:01:32 UTC) #12
luoe
I've reworked this CL to instead show icons for different contexts. Icons show up on ...
3 years, 10 months ago (2017-01-28 01:01:22 UTC) #15
dgozman
Let's explore removing error and warning icons entirely?
3 years, 10 months ago (2017-01-30 22:19:27 UTC) #16
luoe
As discussed offline, we will have more than one setting for the context icons. The ...
3 years, 10 months ago (2017-02-02 07:59:11 UTC) #20
dgozman
Overall looks good, but we now create all the decorations even if we haven't asked ...
3 years, 10 months ago (2017-02-03 21:16:43 UTC) #23
luoe
We only need decorations when there is content to decorate, so each update*() checks for ...
3 years, 10 months ago (2017-02-03 22:45:05 UTC) #24
pfeldman
https://codereview.chromium.org/2623143002/diff/420001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2623143002/diff/420001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode901 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:901: if (!this._nestingLevelMarkersElement && this._nestingLevel > 0) { The second ...
3 years, 10 months ago (2017-02-04 01:55:20 UTC) #26
luoe
As pfeldman mentioned, using, inserting, and deleting cached decorations is error-prone. Instead of inserting elements ...
3 years, 10 months ago (2017-02-06 19:51:55 UTC) #27
pfeldman
if we are viewported, we could actually create all columns and populate them with data ...
3 years, 10 months ago (2017-02-06 22:30:52 UTC) #28
luoe
Before, toggling timestamps used to build timestamps for all messages, even those offscreen. Now, it ...
3 years, 10 months ago (2017-02-07 00:50:33 UTC) #29
pfeldman
https://codereview.chromium.org/2623143002/diff/500001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2623143002/diff/500001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode82 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:82: this._rebuildTimestamp(); Why would we rebuild these slots over and ...
3 years, 10 months ago (2017-02-07 01:11:35 UTC) #30
luoe
I've addressed the comments with what we discussed offline. I think this CL is wrapping ...
3 years, 10 months ago (2017-02-07 17:33:05 UTC) #31
pfeldman
https://codereview.chromium.org/2623143002/diff/520001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2623143002/diff/520001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode97 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:97: _buildDecorations() { rebuildDecorations https://codereview.chromium.org/2623143002/diff/520001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode122 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:122: this._nestingLevelMarkers = []; You ...
3 years, 10 months ago (2017-02-07 18:50:29 UTC) #32
pfeldman
(i don't think your patch applies to ToT)
3 years, 10 months ago (2017-02-07 18:51:14 UTC) #33
luoe
Rebased, it should apply without conflicts now. ptal https://codereview.chromium.org/2623143002/diff/520001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2623143002/diff/520001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode97 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:97: _buildDecorations() ...
3 years, 10 months ago (2017-02-07 19:46:46 UTC) #34
pfeldman
lgtm, but let's follow-up to remove separate repeat count update.
3 years, 10 months ago (2017-02-07 23:02:52 UTC) #35
luoe
Now that the other wasShown() CL has landed, I've made a small number of changes: ...
3 years, 10 months ago (2017-02-18 02:53:30 UTC) #41
pfeldman
https://codereview.chromium.org/2623143002/diff/620001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2623143002/diff/620001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode104 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:104: this._decorationWrapper.createTextChild(''); Decorations should be a private details of the ...
3 years, 10 months ago (2017-02-21 19:26:04 UTC) #44
luoe
ptal https://codereview.chromium.org/2623143002/diff/620001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2623143002/diff/620001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode104 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:104: this._decorationWrapper.createTextChild(''); Back to private. updateMessageList() now calls updateMessageElement(), ...
3 years, 10 months ago (2017-02-21 23:56:42 UTC) #46
pfeldman
3 years, 10 months ago (2017-02-22 00:10:46 UTC) #47
We probably should take smaller steps in fixing it, maybe draft the use cases
and a rough plan?

https://codereview.chromium.org/2623143002/diff/640001/third_party/WebKit/Lay...
File
third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-stack-in-errors-expected.txt
(right):

https://codereview.chromium.org/2623143002/diff/640001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-stack-in-errors-expected.txt:66:
at foob.js:8 message-decoration-wrapper > message-level-icon >
message-repeat-count hidden > info > console-message > source-code >
console-message-anchor > devtools-link > console-message-text > devtools-link >
devtools-link
What are we dumping here exactly? It does not look like all these messages are
nested.

https://codereview.chromium.org/2623143002/diff/640001/third_party/WebKit/Sou...
File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
(right):

https://codereview.chromium.org/2623143002/diff/640001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:710:
this._visibleViewMessages.forEach(message => message.updateMessageElement());
This still does not make much sense to me! Why do we invalidate and also rebuild
all the messages in one call?

https://codereview.chromium.org/2623143002/diff/640001/third_party/WebKit/Sou...
File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
(right):

https://codereview.chromium.org/2623143002/diff/640001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:1008:
case SDK.ConsoleMessage.MessageLevel.Warning:
How come it is in a different location from updating the decorations?

Powered by Google App Engine
This is Rietveld 408576698