Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing info about allowed icons #6

Open
deeplook opened this issue Mar 14, 2019 · 7 comments
Open

Missing info about allowed icons #6

deeplook opened this issue Mar 14, 2019 · 7 comments

Comments

@deeplook
Copy link

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. ;)

@martinRenou
Copy link
Collaborator

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 :)

@ibayer
Copy link

ibayer commented Nov 29, 2019

@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?

@martinRenou
Copy link
Collaborator

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.

@ibayer
Copy link

ibayer commented Nov 29, 2019

Thanks for the pointers!
I'll take a closer look. SVG isn't a hard requirement, most image formats will do.

@ibayer
Copy link

ibayer commented Dec 18, 2019

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?

@martinRenou
Copy link
Collaborator

martinRenou commented Dec 18, 2019

Yes, I want to do that on Friday :)

@martinRenou
Copy link
Collaborator

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants