RESOLVED FIXED 222429
Web Inspector: Jump from Layout panel to grid container element
https://bugs.webkit.org/show_bug.cgi?id=222429
Summary Web Inspector: Jump from Layout panel to grid container element
Razvan Caliman
Reported 2021-02-25 11:05:11 PST
Remove current behavior from label and let it just toggle the checkbox. Add an arrow icon next to the color swatch on hover over the row (see CSS Variables). Clicking on the arrow should jump to element in context in the DOM tree of the Elements Tab
Attachments
Patch (5.03 KB, patch)
2021-03-08 08:12 PST, Razvan Caliman
no flags
[Image] With patch applied (30.09 KB, image/jpeg)
2021-03-08 08:20 PST, Razvan Caliman
no flags
[Video] Behavior with patch applied (12.27 MB, video/quicktime)
2021-03-08 08:21 PST, Razvan Caliman
no flags
Patch (3.70 KB, patch)
2021-03-08 10:08 PST, Razvan Caliman
no flags
Radar WebKit Bug Importer
Comment 1 2021-02-25 11:05:29 PST
Razvan Caliman
Comment 2 2021-03-08 08:12:06 PST
Razvan Caliman
Comment 3 2021-03-08 08:20:21 PST
Created attachment 422568 [details] [Image] With patch applied
Razvan Caliman
Comment 4 2021-03-08 08:21:09 PST
Created attachment 422570 [details] [Video] Behavior with patch applied
Devin Rousso
Comment 5 2021-03-08 09:51:27 PST
Comment on attachment 422567 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422567&action=review > Source/WebInspectorUI/UserInterface/Views/CSSGridSection.css:55 > + opacity: 0; Why not `display: none;`? > Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js:136 > + buttonElement.title = WI.UIString("Click to inspect element"); This should be named something like "Reveal in DOM Tree" (you can use `WI.repeatedUIString.revealInDOMTree()`) to match the naming convention of the `title` of other `WI.createGoToArrowButton`.
Razvan Caliman
Comment 6 2021-03-08 10:03:44 PST
Comment on attachment 422567 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422567&action=review >> Source/WebInspectorUI/UserInterface/Views/CSSGridSection.css:55 >> + opacity: 0; > > Why not `display: none;`? Long node display names are truncated in such a way that the color swatch is still visible and the far end. If we force a relayout on hover with `display: none` -> `display: inline-block`, this will shift the truncation point and the position of the color swatch element. See the homepage of https://stripe.com for really long node display names. I originally used `visibility: hidden`, but I got some strange side-effects on scroll resulting in misplaced elements. I didn't investigate, but it's probably a compound problem of scroll + visibility + flex container and whatever else contributes to layout in the ancestor tree. I stuck with `opacity: 0` because it didn't have side-effects and still used the arrow space so that the truncation point and position of the swatch were not affected on hover. >> Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js:136 >> + buttonElement.title = WI.UIString("Click to inspect element"); > > This should be named something like "Reveal in DOM Tree" (you can use `WI.repeatedUIString.revealInDOMTree()`) to match the naming convention of the `title` of other `WI.createGoToArrowButton`. Will do.
Razvan Caliman
Comment 7 2021-03-08 10:08:15 PST
Devin Rousso
Comment 8 2021-03-09 10:22:34 PST
Comment on attachment 422579 [details] Patch r=me
EWS
Comment 9 2021-03-09 10:32:12 PST
Committed r274157: <https://commits.webkit.org/r274157> All reviewed patches have been landed. Closing bug and clearing flags on attachment 422579 [details].
Note You need to log in before you can comment on or make changes to this bug.