Closed Bug 1686241 Opened 3 years ago Closed 3 years ago

Investigate not selecting a node when clicking on its expand/collapse arrow

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(firefox87 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: nchevobbe, Assigned: jdescottes)

Details

Attachments

(2 files)

At the moment, when expanding a node, we also select the node, which triggers a few updates on the panel (depending which sidepanel is open).
On heavy pages, this can cause jank and make navigation frustrating (See Bug 1686240).

We could try to not select the node if the user only clicks on the expand arrow.
For what it's worth, it looks like what Chrome and Safari is doing.

Priority: -- → P3

Let's move this forward, testing on youtube, it makes the experience nicer when using the mouse to expand containers.
Allows to explore the tree without having to wait for seconds everytime a container gets selected.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

The existing helper expandContainerByClick is modified to support the "altKey" option and reused in all tests that try to click on markup-view container expand-icons.
A similar collapseContainerByClick is also added for symmetry. Both methods will become identical once we stop selecting the node on expand and they will be merged.

Depends on D103051.

Other browser devtools do not select the node on expand. Selecting the node can be quite slow when if many CSS rules apply to it.
This should allow exploring the tree of complex pages with less slowdowns.
An existing test is updated to assert the selected state of the node container before/after expanding it.

Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2089c69e453b
[devtools] Use shared test helpers to toggle markup-view containers r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/5facb25bb1e5
[devtools] Stop selecting the node front when expanding the markup view container r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: