var-dump icon indicating copy to clipboard operation
var-dump copied to clipboard

Feature request - Add fold/unfold

Open B0bbyD0llar opened this issue 2 years ago • 1 comments

Hello,

Nice would be the following functionality:

Fold and unfold objects, arrays in the UI to get better overview.

B0bbyD0llar avatar May 03 '22 14:05 B0bbyD0llar

Thanks for your suggestion. The component in charge of render that is chevere/var-dump, I've moved the issue there.

rodber avatar May 03 '22 21:05 rodber

Ref. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details

rodber avatar May 28 '24 11:05 rodber

I've made significative progress in this request. Here's my hide/show thing:

image

This stuff is 100% HTML based, zero JS required. Also it docks on the left for better consistency.

https://github.com/chevere/var-dump/assets/20590102/595b6265-17ac-4574-a8e5-f04bd807bd0e

rodber avatar May 28 '24 17:05 rodber

Looks great. Nice work so far.

B0bbyD0llar avatar May 28 '24 17:05 B0bbyD0llar

Perhaps it would be a useful addition if the entries were automatically collapsed from the third level onwards. In my opinion, this would considerably simplify navigation in large amounts of data.

B0bbyD0llar avatar May 28 '24 17:05 B0bbyD0llar

Sure the entries will be collapsed by default.

rodber avatar May 28 '24 18:05 rodber

🎉 Folding is now included in the 1.1 branch.

rodber avatar Jun 02 '24 12:06 rodber