WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
177477
Web Inspector: Fix Layers tab sidebar popover.
https://bugs.webkit.org/show_bug.cgi?id=177477
Summary
Web Inspector: Fix Layers tab sidebar popover.
Ross Kirsling
Reported
2017-09-25 17:32:38 PDT
The Layers tab sidebar has a very buggy popover (inherited virtually as-is from the legacy sidebar on the Elements tab). Those bugs which are specific to this sidebar (and not to popovers at large) should be fixed here, namely: 1. When a data grid row is selected but the popover has been hidden... a. ...going to another window and back causes an empty popover to reappear in its place. b. ...going to another tab and back causes and empty popover to reappear in the upper-left corner. 2. For consistency with all other data grids in Web Inspector, clicking empty space in the data grid should not change the current selection.
Attachments
Patch
(5.99 KB, patch)
2017-09-25 17:47 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Patch
(5.22 KB, patch)
2017-09-27 11:10 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ross Kirsling
Comment 1
2017-09-25 17:47:52 PDT
Created
attachment 321782
[details]
Patch
Ross Kirsling
Comment 2
2017-09-25 17:53:19 PDT
Comment on
attachment 321782
[details]
Patch This turns out to be mostly code removal and a bit of refactoring. Specifically: - Remove focus/blur/click handlers from DataGrid. This is unlike anywhere else in Web Inspector, isn't desired, and causes issue #2. - Use willDismissPopover to dispose of popover after it has been dismissed (fixes issue #1). - Make popover setup less convoluted. Note that this patch also removes the DOM highlighting triggered by the data grid. I will add this back in a later patch -- it needs to be added to the data grid row itself, and to avoid polluting the legacy sidebar, I will create a new LayerDataGridRow for the purpose.
Ross Kirsling
Comment 3
2017-09-25 18:00:05 PDT
Note that there are some remaining issues that seem to affect popovers overall: 1. When the window is resized to force a direction change on the popover, the CSS class for the old direction isn't removed from the existing popover. 2. When moving with arrow keys, the arrow doesn't follow the target element correctly. I don't see these as specifically related to this sidebar so I'm not addressing them here.
Matt Baker
Comment 4
2017-09-26 14:45:54 PDT
(In reply to Ross Kirsling from
comment #3
)
> Note that there are some remaining issues that seem to affect popovers > overall: > > 1. When the window is resized to force a direction change on the popover, > the CSS class for the old direction isn't removed from the existing popover. > > 2. When moving with arrow keys, the arrow doesn't follow the target element > correctly.
FYI: <
https://webkit.org/b/150551
> Web Inspector: Selecting child layers with keyboard causes Compositing Reason popover to become misaligned
> I don't see these as specifically related to this sidebar so I'm not > addressing them here.
Matt Baker
Comment 5
2017-09-26 17:41:28 PDT
Comment on
attachment 321782
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=321782&action=review
> Source/WebInspectorUI/UserInterface/Views/LayerDetailsSidebarPanel.js:-91 > - this._dataGrid.element.addEventListener("click", this._dataGridClicked.bind(this), false);
I'm glad to see all this go. I think eventually we'll want to completely rethink the Layers sidebar UI. Putting important data (compositing reasons!) in popovers and forcing people to play the popover game is terrible.
> Source/WebInspectorUI/UserInterface/Views/LayerDetailsSidebarPanel.js:-151 > - _highlightSelectedNode()
I'm not clear on why this is being removed. Calling this when the node changes works fine with your other changes, as long as the highlight is removed later.
Ross Kirsling
Comment 6
2017-09-26 19:18:38 PDT
(In reply to Matt Baker from
comment #4
)
> FYI: > <
https://webkit.org/b/150551
> Web Inspector: Selecting child layers with keyboard causes Compositing Reason popover to become misaligned
Cool. I couldn't find another place in Web Inspector that had a side-facing popover, but I believe this would happen for any such case. (In reply to Matt Baker from
comment #5
)
> > Source/WebInspectorUI/UserInterface/Views/LayerDetailsSidebarPanel.js:-91 > > - this._dataGrid.element.addEventListener("click", this._dataGridClicked.bind(this), false); > > I'm glad to see all this go. I think eventually we'll want to completely > rethink the Layers sidebar UI. Putting important data (compositing reasons!) > in popovers and forcing people to play the popover game is terrible.
That's fair. Just hoping to provide an adequate UX for Day 1 -- I'm not really sure how to fundamentally restructure that information, but at least one can sort by highest-impact layers, even if you have to ask "why" for each one separately.
> > Source/WebInspectorUI/UserInterface/Views/LayerDetailsSidebarPanel.js:-151 > > - _highlightSelectedNode() > > I'm not clear on why this is being removed. Calling this when the node > changes works fine with your other changes, as long as the highlight is > removed later.
Sure, I can put this back and remove it in the following ticket.
Ross Kirsling
Comment 7
2017-09-27 11:10:42 PDT
Created
attachment 321977
[details]
Patch
Ross Kirsling
Comment 8
2017-09-27 11:11:57 PDT
Comment on
attachment 321977
[details]
Patch Reverted DOM highlight behavior. Will rework sidebar to use Table instead of DataGrid in a follow-up patch and handle DOM highlighting at that time as well.
Matt Baker
Comment 9
2017-09-27 11:30:18 PDT
Comment on
attachment 321977
[details]
Patch Nice work, r=me.
WebKit Commit Bot
Comment 10
2017-09-27 11:58:06 PDT
Comment on
attachment 321977
[details]
Patch Clearing flags on attachment: 321977 Committed
r222566
: <
http://trac.webkit.org/changeset/222566
>
WebKit Commit Bot
Comment 11
2017-09-27 11:58:08 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2017-09-27 12:16:25 PDT
<
rdar://problem/34692908
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug