New issue
Advanced search Search tips

Issue 777458 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature



Sign in to add a comment

Expand/Collapse all support for JSON viewer

Reported by mfulto...@gmail.com, Oct 23 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36

Steps to reproduce the problem:
1. Open Developer Tools
2. Select the Network tab
3. Make a request that sends/receives JSON which includes nested arrays and/or objects
4. View the request payload and/or response preview
5. Right-click an expand/collapse down/right arrow similar to how you would when you want to right-click a DOM element to expand/collapse all elements within a given subtree structure

What is the expected behavior?
A context menu appears giving you options to expand/collapse all 

What went wrong?
No such options nor menu appears (a context menu does appear when right-clicking a JSON property but not the arrow next to it).

Did this work before? No 

Chrome version: 62.0.3202.62  Channel: stable
OS Version: 10.0
Flash Version: 

I think this would be a very helpful feature for web developers, many of which work with JSON very regularly.
 

Comment 1 by woxxom@gmail.com, Oct 23 2017

Alt-click on a collapsed arrow expands the tree recursively.
If already expanded, alt-click the arrow twice.
Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
Owner: allada@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 3 by mfulto...@gmail.com, Oct 23 2017

Sweet! I had no idea. Thank you.
Owner: l...@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/818b76921de1fe7705a75e86df758bb96434e88e

commit 818b76921de1fe7705a75e86df758bb96434e88e
Author: Erik Luo <luoe@chromium.org>
Date: Fri Dec 29 21:10:42 2017

DevTools: update Expand all context menu items

- "Expand all" > "Expand recursively"
- "Collapse all" > "Collapse children", now just collapses children
- JSON objects now get Expand/Collapse context menu items
- Expanding node in Elements now shows entire subtree including shadow/iframes

Screenshot: https://imgur.com/a/JKdke

Bug:  777458 
Change-Id: I74aa3a4a160f2d6e4b2c9db4f37c682c881c0811
Reviewed-on: https://chromium-review.googlesource.com/834766
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526390}
[modify] https://crrev.com/818b76921de1fe7705a75e86df758bb96434e88e/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
[modify] https://crrev.com/818b76921de1fe7705a75e86df758bb96434e88e/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
[modify] https://crrev.com/818b76921de1fe7705a75e86df758bb96434e88e/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
[modify] https://crrev.com/818b76921de1fe7705a75e86df758bb96434e88e/third_party/WebKit/Source/devtools/front_end/source_frame/JSONView.js
[modify] https://crrev.com/818b76921de1fe7705a75e86df758bb96434e88e/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js

Comment 6 by l...@chromium.org, Dec 31 2017

Status: Fixed (was: Assigned)

Sign in to add a comment