djblue / portal

A clojure tool to navigate through your data.
https://djblue.github.io/portal/
MIT License
872 stars 81 forks source link

Add toggle-expand-all command to toggle folding of nested elements #186

Closed dakra closed 1 year ago

dakra commented 1 year ago

Analog to the existing toggle-expand command but toggle-expand-all also shows/hides all child elements.

PR Note: I couldn't find a function to extract all child locations from the current context, maybe there's a better/easier way than the get-child-locations function.

djblue commented 1 year ago

Hi @dakra, thanks for the PR! I think for expanding children, the incremental approach in https://github.com/djblue/portal/pull/189 is what I prefer. Still need to test out and work through some bugs, but let me know if that approach works for you.

dakra commented 1 year ago

Thanks. I'll close this PR and experiment a bit if that's enough for me or if I should make a new PR for toggle-all with the new logic.

A few observations of your PR vs mine:

Thanks again :)