|
|
Created:
5 years, 5 months ago by samli Modified:
5 years, 4 months ago CC:
apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, devtools-reviews_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org, yurys+blink_chromium.org Base URL:
svn://svn.chromium.org/blink/trunk Target Ref:
refs/heads/master Project:
blink Visibility:
Public. |
DescriptionDevtools UI: Update inspect element node description label UI
This change updates the node description label to match updated tooltip
UI. These labels have the following characteristics:
- Default to above the anchor element
- Centered above the anchor element
- Clamped to the visible viewport (no change)
- Non monospace font to improve text readibility
- Removal of "px" in dimensions
BUG=513066
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199732
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199956
Patch Set 1 #Patch Set 2 : #
Total comments: 6
Patch Set 3 : #Patch Set 4 : #
Total comments: 2
Patch Set 5 : #Patch Set 6 : #Patch Set 7 : #Messages
Total messages: 42 (7 generated)
samli@chromium.org changed reviewers: + dgozman@chromium.org, maxwalker@chromium.org, sergeyv@chromium.org
PTAL. Confirmed it looks fine on Mac/Linux since this doesn't use canvas. Screenshot: http://i.imgur.com/7YytX88.png
On 2015/07/23 06:34:11, samli wrote: > PTAL. Confirmed it looks fine on Mac/Linux since this doesn't use canvas. > > Screenshot: http://i.imgur.com/7YytX88.png I find arrow helpful when the elements is off screen, it used to point to where the actual element was.
On 2015/07/23 at 20:49:54, pfeldman wrote: > On 2015/07/23 06:34:11, samli wrote: > > PTAL. Confirmed it looks fine on Mac/Linux since this doesn't use canvas. > > > > Screenshot: http://i.imgur.com/7YytX88.png > > I find arrow helpful when the elements is off screen, it used to point to where the actual element was. +1. Would like the arrow back. Arrows are nice.
On 2015/07/24 at 00:37:39, pbakaus wrote: > On 2015/07/23 at 20:49:54, pfeldman wrote: > > On 2015/07/23 06:34:11, samli wrote: > > > PTAL. Confirmed it looks fine on Mac/Linux since this doesn't use canvas. > > > > > > Screenshot: http://i.imgur.com/7YytX88.png > > > > I find arrow helpful when the elements is off screen, it used to point to where the actual element was. > > +1. Would like the arrow back. Arrows are nice. Added arrows back in. PTAL. Screenshot: http://i.imgur.com/A5LP5op.png
Yup, arrows are helpful for the inspect-element label. LGTM
Played with this: - tooltip is now centered relative to margin box; what's the reason? It conflicts with layout editor by Sergey - we should do something; - dark tooltip dominates the visual view, while I'd like to focus on box highlight instead; - looks very nice; - hard to notice it on dark-themed site (e.g. http://dabblet.com/gist/d8bf427c2c96b2248518) - we should add something light there (in border?); - let's set cursor to default for tooltip.
https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... File Source/core/inspector/InspectorOverlayPage.html (right): https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:419: document.getElementById("element-tooltip-arrow").style.visibility = "hidden"; Migrate to "hidden" class? https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:431: elementTitle.style.top = "0px"; We usually use "0" without "px". https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:448: const pageMargin = 2; var
On 2015/07/24 at 13:52:50, dgozman wrote: > Played with this: > - tooltip is now centered relative to margin box; what's the reason? It conflicts with layout editor by Sergey - we should do something; Easier to find/clearer. Not sure how it plays with layout editor. > - dark tooltip dominates the visual view, while I'd like to focus on box highlight instead; > - looks very nice; > - hard to notice it on dark-themed site (e.g. http://dabblet.com/gist/d8bf427c2c96b2248518) - we should add something light there (in border?); Deferring to Max for updated spec. > - let's set cursor to default for tooltip. ?
https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... File Source/core/inspector/InspectorOverlayPage.html (right): https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:419: document.getElementById("element-tooltip-arrow").style.visibility = "hidden"; On 2015/07/24 at 13:57:10, dgozman wrote: > Migrate to "hidden" class? Done. https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:431: elementTitle.style.top = "0px"; On 2015/07/24 at 13:57:10, dgozman wrote: > We usually use "0" without "px". Done. https://codereview.chromium.org/1255573004/diff/20001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:448: const pageMargin = 2; On 2015/07/24 at 13:57:10, dgozman wrote: > var Done.
> Hard to notice it on dark-themed site - we should add something light there (in border? > Deferring to Max for updated spec. Added a border and slightly changed to background color to make the label stand more out on dark backgrounds, examples on a variety of backgrounds: https://goo.gl/6OBasZ. The border is 50% transparent white, so it's clearly visible on darker background while not blurring the label outline on white/light backgrounds. Sam: possible approach to make the border appear outside the element: "background-clip: padding-box". Updated spec: https://goo.gl/mksjXK.
Do we need to add this much code to achieve this?
Applied it again, posted screenshot along with the comments in the bug.
On 2015/07/27 at 17:03:42, pfeldman wrote: > Do we need to add this much code to achieve this? Looks like it's actually a reduction in JS. But more CSS.
On 2015/07/28 23:20:52, paulirish wrote: > On 2015/07/27 at 17:03:42, pfeldman wrote: > > Do we need to add this much code to achieve this? > > Looks like it's actually a reduction in JS. But more CSS. My diff tells me -74 lines of code that have been working for years, +115 lines of new code I need to review and then probably follow up with fixes to. One should have a good reason to change any code.
On 2015/07/28 at 23:38:07, pfeldman wrote: > On 2015/07/28 23:20:52, paulirish wrote: > > On 2015/07/27 at 17:03:42, pfeldman wrote: > > > Do we need to add this much code to achieve this? > > > > Looks like it's actually a reduction in JS. But more CSS. > > My diff tells me -74 lines of code that have been working for years, +115 lines of new code I need to review and then probably follow up with fixes to. One should have a good reason to change any code. I think this is reason enough. http://i.imgur.com/Mk7AZlc.png
On 2015/07/28 at 23:38:07, pfeldman wrote: > On 2015/07/28 23:20:52, paulirish wrote: > > On 2015/07/27 at 17:03:42, pfeldman wrote: > > > Do we need to add this much code to achieve this? > > > > Looks like it's actually a reduction in JS. But more CSS. > > My diff tells me -74 lines of code that have been working for years, +115 lines of new code I need to review and then probably follow up with fixes to. One should have a good reason to change any code. Actually, I think it's super reasonable. All in favor of more CSS, and less JS. This actually simplifies logic while fixing it.
> I think this is reason enough. > http://i.imgur.com/Mk7AZlc.png Well, that can be fixed with a single line change, right?
> Actually, I think it's super reasonable. All in favor of more CSS, and less JS. > This actually simplifies logic while fixing it. Sam, do you think your new code is border-friendly? I.e. it would be able to render the border as on the Max's mocks?
On 2015/07/29 at 00:57:24, pfeldman wrote: > > Actually, I think it's super reasonable. All in favor of more CSS, and less JS. > > This actually simplifies logic while fixing it. > > Sam, do you think your new code is border-friendly? I.e. it would be able to render the border as on the Max's mocks? No, not without changing the way the arrow is implemented. I just started again from scratch, attempting to modify the existing one, but canvas doesn't support multiple box shadows as used in Max's latest light mock (https://goo.gl/AjmAjR). Also, this change introduced more than just style changes, it also changed the positioning so heavy modification is required anyway. I understand the concerns, but find the CSS styling much clearer.
I've modified this to match Max's spec (https://goo.gl/AjmAjR) Screenshot: http://i.imgur.com/cd0SxBE.png
pfeldman@chromium.org changed reviewers: + pfeldman@chromium.org
Ok, if we are dropping the border, the code lgtm.
new shadow doesn't match the spec. i guess drop-shadow functions a bit differently. http://jsbin.com/duzubilife/edit?html,css,output
On 2015/07/30 at 01:35:35, paulirish wrote: > new shadow doesn't match the spec. i guess drop-shadow functions a bit differently. > > http://jsbin.com/duzubilife/edit?html,css,output The second has box-shadow and drop-shadow, so they are not actually that different. Looks like the spread is different though and you can't set in webkit. Max's mock favours the bottom shadow more, which doesn't work as well for a top arrow, so I actually prefer it like this.
> The second has box-shadow and drop-shadow, so they are not actually that different. Looks like the spread is different though and you can't set in webkit. Max's mock favours the bottom shadow more, which doesn't work as well for a top arrow, so I actually prefer it like this. My bad. Fixed up and added up-arrow variant to compare: http://jsbin.com/laloxovuya/1/edit?css,output Tried to get it to match as close as I could. Feels good. Can you update to match?
paulirish@chromium.org changed reviewers: + paulirish@chromium.org
https://codereview.chromium.org/1255573004/diff/60001/Source/core/inspector/I... File Source/core/inspector/InspectorOverlayPage.html (right): https://codereview.chromium.org/1255573004/diff/60001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:179: margin-left: 4px; I don't think we should add space in between as it appears like a descendant selector. nuke the margin here and below.
https://codereview.chromium.org/1255573004/diff/60001/Source/core/inspector/I... File Source/core/inspector/InspectorOverlayPage.html (right): https://codereview.chromium.org/1255573004/diff/60001/Source/core/inspector/I... Source/core/inspector/InspectorOverlayPage.html:179: margin-left: 4px; On 2015/07/30 at 03:32:30, paulirish wrote: > I don't think we should add space in between as it appears like a descendant selector. > nuke the margin here and below. Good point. Done.
On 2015/07/30 at 03:32:30, paulirish wrote: > I don't think we should add space in between as it appears like a descendant selector. Hadn't thought about that, good point! LGTM
lgtm
The CQ bit was checked by samli@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pfeldman@chromium.org Link to the patchset: https://codereview.chromium.org/1255573004/#ps100001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255573004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255573004/100001
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199732
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/1259413003/ by pfeldman@chromium.org. The reason for reverting is: Tried it, regresses my experience, will post more into the bug..
Screenshot: http://i.imgur.com/55xTlS1.png
The CQ bit was checked by samli@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgozman@chromium.org, maxwalker@chromium.org, pfeldman@chromium.org Link to the patchset: https://codereview.chromium.org/1255573004/#ps120001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255573004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255573004/120001
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199956
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1271343004/ by samli@chromium.org. The reason for reverting is: See crbug.com/517151. |