Bug 143840 - Web Inspector: Special Logs to Console that do not have an expression should be styled differently, looks like code
Summary: Web Inspector: Special Logs to Console that do not have an expression should ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-04-16 13:01 PDT by Joseph Pecoraro
Modified: 2015-07-09 14:55 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.93 KB, patch)
2015-07-09 11:23 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (4.01 KB, patch)
2015-07-09 11:39 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
After Patch is applied (16.94 KB, image/png)
2015-07-09 11:40 PDT, Devin Rousso
no flags Details
Patch (7.72 KB, patch)
2015-07-09 13:34 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-04-16 13:01:23 PDT
* SUMMARY
Special Logs to Console that do not have an expression should be styled differently, looks like code.

* STEPS TO REPRODUCe
1. Inspect <http://webkit.org>
2. Show DOM Tree
3. Right click <body> and "Log Element"
  => The "Selected Element" text in the console should be visually distinct, it looks identical to it having been code but it is not
Comment 1 Radar WebKit Bug Importer 2015-04-16 13:02:02 PDT
<rdar://problem/20575321>
Comment 2 Devin Rousso 2015-07-09 11:23:30 PDT
Created attachment 256492 [details]
Patch
Comment 3 Devin Rousso 2015-07-09 11:24:59 PDT
Comment on attachment 256492 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css:32
> +.console-user-command.special-user-log {

I am not sure that this is the best styling here, but it's a start and doesn't look to bad at that.
Comment 4 Timothy Hatcher 2015-07-09 11:27:36 PDT
Comment on attachment 256492 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css:32
>> +.console-user-command.special-user-log {
> 
> I am not sure that this is the best styling here, but it's a start and doesn't look to bad at that.

A token (rounded box with colored background) is something  we talked about doing here. Like email addresses in Mail.
Comment 5 Devin Rousso 2015-07-09 11:39:25 PDT
Created attachment 256495 [details]
Patch
Comment 6 Devin Rousso 2015-07-09 11:40:04 PDT
Created attachment 256496 [details]
After Patch is applied
Comment 7 Timothy Hatcher 2015-07-09 12:22:50 PDT
Comment on attachment 256495 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js:126
> -        var commandMessageView = new WebInspector.ConsoleCommandView(text);
> +        var commandMessageView = new WebInspector.ConsoleCommandView(text, "special-user-log");

Two called of appendImmediateExecutionWithResult actually pass a JS property path as the text, so those cases should not get "special-user-log". You likely need to add a parameter to appendImmediateExecutionWithResult to toggle this class as needed.

The callers do this:

        var text = isImpossible ? WebInspector.UIString("Selected Value") : propertyPath.displayPath(this.propertyPathType());
Comment 8 Devin Rousso 2015-07-09 13:34:30 PDT
Created attachment 256507 [details]
Patch
Comment 9 WebKit Commit Bot 2015-07-09 14:55:17 PDT
Comment on attachment 256507 [details]
Patch

Clearing flags on attachment: 256507

Committed r186634: <http://trac.webkit.org/changeset/186634>
Comment 10 WebKit Commit Bot 2015-07-09 14:55:21 PDT
All reviewed patches have been landed.  Closing bug.