pyapp-kit / superqt

Missing widgets and components for Qt-python
https://pyapp-kit.github.io/superqt/
BSD 3-Clause "New" or "Revised" License
210 stars 38 forks source link

Add TreeViz widget to allow for expandable tree like metadata structures #12

Closed evamaxfield closed 1 year ago

evamaxfield commented 3 years ago

Create a widget that when given a TreeLike structure (Dict, xml.etree.ElementTree, anything else?) display a collapsed view of the structure and allow click on the branches to expand.

Much like existing ome-types tree viewer but generalized to all TreeLike structures. image

Didn't get around to it last week but going to try to dedicate some time to it this week. Sorry about that. If I could self assign the issue, I would :joy:


Original discussion from zulip:

@JacksonMaxfield

@Talley Lambert I am tempted to port your OMETree widget to some other repo as a more generalized "given a tree like structure (etree.ElementTree or Dict), add widget component" so that we can just toss CZI and LIF metadata in there too. Any thoughts as to where this should go? Is this a stupid idea / someone else has already done that?

This: https://github.com/tlambert03/ome-types/blob/9954ae63c162ce91d516167009590bcc20a77174/src/ome_types/widgets.py#L21

@tlambert03

yeah, I agree, it's a very generic component... how about our new superqt repo? https://github.com/napari/superqt the goal there is to collect things that have no dependencies but "some qt backend" in the environment... so it seems well suited. We'll just want to modify some of the method names and stuff to try to make it feel as native as possible

is that something you'd want to help out with?

@JacksonMaxfield

Yea that's what I was thinking as well. Figured superqt would be the way to go.

Happy to help on that. I may have some time tonight even!

tlambert03 commented 3 years ago

assigned! :) thanks @JacksonMaxfield

andy-sweet commented 1 year ago

@tlambert03 : is there still an appetite for this? As part of the metadata plugin I've been working on, it feels like this could deliver a lot of value to napari, plugins, and others without too much effort (e.g. by using this to show some of the contents of Layer.metadata).

@evamaxfield : are you actively working on this? did you make any progress that I or others could help finish?

evamaxfield commented 1 year ago

I have not made any progress on this at all. Please free to take it!

tlambert03 commented 1 year ago

@tlambert03 : is there still an appetite for this?

sure! i think it's a natural fit for superqt