json-lite icon indicating copy to clipboard operation
json-lite copied to clipboard

Show id or name when node is collapsed

Open dsbecker opened this issue 9 years ago • 3 comments

If a node has an id, name, or other useful property, it would be helpful to show that in the summary when the node is collapsed (and maybe even when expanded). Something like this maybe:

{ ▶ id = MyClass, 7 properties, 75 KB }

That would make it much easier to collapse large files and still find what you're looking for.

Thanks!

dsbecker avatar Jan 12 '17 23:01 dsbecker

I like the idea but proper implementation is tricky.

Just adding this to summary is not ideal because this is not searchable with ctrl+F. Adding extra dom nodes would break select-copy json when collapsed.

will think about it

lauriro avatar Jan 14 '17 17:01 lauriro

Current git version shows object first properties when collapsed, it is up to backend to put most useful stuff to beginning of object.

I will think about it some other night again

lauriro avatar Jan 19 '17 22:01 lauriro

FYI, here's how IntelliJ IDEA does it (and what inspired this request): image

dsbecker avatar Jan 27 '17 20:01 dsbecker