ipytree
ipytree copied to clipboard
Missing info about allowed icons
I would like to see some decent info in the README about which icons I can use, without looking into the code. I guess some popular icon set will be allowed, but arbitrary SVG would be also cool. ;)
Yeah I will put more love in the README and I will package it for conda. This is a side project on which I work during my spare time, it doesn't mean I will give up on this, but it means that it will improve slower than other packages.
Concerning the icons it's the same as in ipywidgets, which means font-awesome icons (icons availability depends on the font-awesome version ipywidgets is using). SVG icons are not supported (yet?), PRs welcome :)
@martinRenou Thanks for this nice library! I'm very interested in support for setting arbitrary SVG icons and willing to contribute PR if I can.
Could you give me a very rough outline of the required changes?
I'm actually not sure myself! ipytree is using jstree https://www.jstree.com, and jstree allows setting an icon from an icon file by giving a path to this file: https://www.jstree.com/api/#/?f=set_icon(obj,%20icon). I'm not sure this supports SVG but I guess it's worth giving it a shot.
The place in ipytree where the icon is set is here: https://github.com/QuantStack/ipytree/blob/master/js/lib/tree.js#L203.
Thanks for the pointers! I'll take a closer look. SVG isn't a hard requirement, most image formats will do.
Now that our custom node icon option has been merged, having it on pypi would be great. Any idea when the next release will come out?
Yes, I want to do that on Friday :)
Done, 0.1.5 is on PyPi. I went from 0.1.3 to 0.1.5 directly because I made a broken release in the middle... Please give it a try!! It will be on conda soon.