couchdb-fauxton
couchdb-fauxton copied to clipboard
Enhance folding support in JSON editor thru UI hints
This was raised recently on the users@ mailing list. Quoting:
Settings for code folding—it’d be nice (for us) to have the JSON documents folded by default. Even better would be the ability to set a preference as to how many levels should be unfolded by default, and saved in the browser’s local storage or something. That would help us a lot in navigating deeply nested JSON documents where the top levels usually have all the data we need when debugging.
Looks like Ace supports code folding already, so that's a plus.
To be clear, code folding is already working in Fauxton…but it is a pain, for big documents, to go through and manually fold everything when one could be try to quickly scan many deeply-nested documents. Even a keyboard shortcut or button to fold everything would be a great start.
What do you think about double-clicking the folding button to apply nested folding?
What do you think about double-clicking the folding button to apply nested folding?
That's definitely be a nice start and an improvement on what is there now!
With our particular data structure, we really want everything below, say, level 2 folded, and everything above that unfolded—but I know if that is a common-enough situation to try write code for.
The double-clicking would definitely be an improvement for us!
@dahjelle @popojargo ACE has some keyboard shortcuts for folding (https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts#folding) and they worked for me on Fauxton - e.g. you can fold/unfold all.
@Antonio-Maranhao Oh, fantastic! That should get documented somewhere. :-D
It's not quite as nice as having the fold level set to what what we want every time, but I think it is workable. Thank you!
I've edited the subject to match - @popojargo that sounds interesting.