ipywidgets: Button Icons/FontAwesome regression no longer supports fa-spin
since this was added: https://github.com/jupyter-widgets/ipywidgets/blob/master/ipywidgets/widgets/widget_button.py#L65-L73
we are no longer able to pass in additional fa classes to specify fa-spin or fa-lg etc.
I really liked my spinning gear icon button before this change…
i.e.
from ipywidgets import Button
Button(description='Running...', icon='fa-gear fa-spin fa-lg')
it will error on the add of the DOMTokenList due to the spaces in the string https://github.com/jupyter-widgets/ipywidgets/blob/master/packages/controls/src/widget_button.ts#L91
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (11 by maintainers)
PR opened https://github.com/jupyter-widgets/ipywidgets/pull/2685
@kebwi Please note that this PR does not add support for multiple icons in a Button. It is only fixing the regression that appeared in 6.0, allowing:
Which I understand is the original issue here. Maybe we could open another issue for multiple icons support?
I’ll try to have a look at this issue tomorrow
I think it would be great if someone put in a PR adding back in support for multiple icons, probably by just changing the one line that Vidar points out above (I give several different ways to prepend
fa-to each thing in the list above).Setting as a good first issue.
I was just wishing yesterday for multiple icons on a button and found this discussion. The implication is that it used to work and such behavior was explicitly removed? Why not leave it in and let the user decide if they find multiple icons useful? I could use it frankly.
Thanks.