Bug 66819 - Web Inspector: Directional arrow on element info box looks terrible
Summary: Web Inspector: Directional arrow on element info box looks terrible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on: 66926
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-23 16:15 PDT by Matt Lilek
Modified: 2011-08-25 03:33 PDT (History)
11 users (show)

See Also:


Attachments
Screenshot (13.47 KB, image/png)
2011-08-23 16:16 PDT, Matt Lilek
no flags Details
[PATCH] Suggested fix (9.27 KB, patch)
2011-08-24 08:41 PDT, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Remove unnecessary adjustment term (9.03 KB, patch)
2011-08-24 09:52 PDT, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Remove unnecessary path clipping (8.96 KB, patch)
2011-08-24 10:04 PDT, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff
[PATCH] Patch for landing (EWS check) (8.97 KB, patch)
2011-08-25 03:06 PDT, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] For EWS (8.95 KB, patch)
2011-08-25 03:10 PDT, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] For EWS (bug reopened) (8.95 KB, patch)
2011-08-25 03:17 PDT, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Lilek 2011-08-23 16:15:21 PDT
The new little directional arrow on the yellow box that contains the name, ID, class and dimensions of a DOM node is very poorly drawn.

1) The bottom left portion should be shifted over by 1px so the first pixel doesn't draw on top of the box's border.
2) The tip is obnoxious.  Far too large.
3) The bottom right side draws on top of the box's border, as well as an extra pixel with it too.
4) The bottom right side needs to be shifted to avoid the same problem as (1).

Why was this even changed?  Just because callout arrows are in vogue doesn't mean every last UI element on every platform needs it.  It looks kind of ridiculous.
Comment 1 Matt Lilek 2011-08-23 16:16:02 PDT
Created attachment 104926 [details]
Screenshot
Comment 2 Pavel Feldman 2011-08-24 00:29:24 PDT
There were three requests / problems this change was addressing:

a. Numerous users requested that different colors are used for padding/margin/etc.
b. Title was rendered with plain monospace (different from elements panel), no color coding was used
c. Title box was aligned with the margin box and for small elements it resulted in the confusion: "does it overlap margin"?

(In reply to comment #0)
> The new little directional arrow on the yellow box that contains the name, ID, class and dimensions of a DOM node is very poorly drawn.
> 1) The bottom left portion should be shifted over by 1px so the first pixel doesn't draw on top of the box's border.

+1, definitely requires fixing.

> 2) The tip is obnoxious.  Far too large.

+1, Mac OS port problem, we are using smaller fonts on Mac, should be reflected in the title box.

> 3) The bottom right side draws on top of the box's border, as well as an extra pixel with it too.

+1, will fix.


> 4) The bottom right side needs to be shifted to avoid the same problem as (1).

+1, will fix.
> 
> Why was this even changed?  Just because callout arrows are in vogue doesn't mean every last UI element on every platform needs it.  It looks kind of ridiculous.

The reason behind the change is (c) from above. If you have an idea on how to make it more transparent / make arrow less rediculous, please let us know.
Comment 3 Alexander Pavlov (apavlov) 2011-08-24 08:17:07 PDT
(In reply to comment #2)
> c. Title box was aligned with the margin box and for small elements it resulted in the confusion: "does it overlap margin"?

> > Why was this even changed?  Just because callout arrows are in vogue doesn't mean every last UI element on every platform needs it.  It looks kind of ridiculous.
> 
> The reason behind the change is (c) from above. If you have an idea on how to make it more transparent / make arrow less rediculous, please let us know.

Another data point: in a few places across the Web Inspector UI, we use a popover which is exactly a callout with an arrow, having a similar appearance, so this concept is familiar to our users.

In addition to the point (c) from Pavel, some people (especially when the info box was just introduced) claimed that they were unable to see the [border of an] adjoining element above/below the selected one.
Comment 4 Alexander Pavlov (apavlov) 2011-08-24 08:41:01 PDT
Created attachment 105003 [details]
[PATCH] Suggested fix
Comment 5 Alexander Pavlov (apavlov) 2011-08-24 09:52:38 PDT
Created attachment 105010 [details]
[PATCH] Remove unnecessary adjustment term
Comment 6 Alexander Pavlov (apavlov) 2011-08-24 10:04:46 PDT
Created attachment 105011 [details]
[PATCH] Remove unnecessary path clipping
Comment 7 Pavel Feldman 2011-08-25 00:03:24 PDT
Comment on attachment 105011 [details]
[PATCH] Remove unnecessary path clipping

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

> Source/WebCore/inspector/DOMNodeHighlighter.cpp:336
> +        for (int i = 0; i < 8; ++i)

Translating canvas 0.5, 0.5 would effectively do the same thing, but in a more elegant manner.
Comment 8 Alexander Pavlov (apavlov) 2011-08-25 02:53:09 PDT
Committed r93768: <http://trac.webkit.org/changeset/93768>
Comment 9 Alexander Pavlov (apavlov) 2011-08-25 03:06:47 PDT
Created attachment 105153 [details]
[PATCH] Patch for landing (EWS check)
Comment 10 Alexander Pavlov (apavlov) 2011-08-25 03:10:54 PDT
Created attachment 105156 [details]
[PATCH] For EWS
Comment 11 Alexander Pavlov (apavlov) 2011-08-25 03:12:21 PDT
Rolled out by r93770
Comment 12 Alexander Pavlov (apavlov) 2011-08-25 03:17:29 PDT
Created attachment 105158 [details]
[PATCH] For EWS (bug reopened)
Comment 13 Alexander Pavlov (apavlov) 2011-08-25 03:31:09 PDT
Committed r93772: <http://trac.webkit.org/changeset/93772>
Comment 14 Alexander Pavlov (apavlov) 2011-08-25 03:33:14 PDT
(In reply to comment #7)
> (From update of attachment 105011 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=105011&action=review
> 
> > Source/WebCore/inspector/DOMNodeHighlighter.cpp:336
> > +        for (int i = 0; i < 8; ++i)
> 
> Translating canvas 0.5, 0.5 would effectively do the same thing, but in a more elegant manner.

Landed a variation of patch 105011 with this suggested change applied.