Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Some icons from the styleguide not working in ModelAdmin #6379

Closed
jeffykle opened this issue Sep 9, 2020 · 6 comments · Fixed by #6402
Closed

Some icons from the styleguide not working in ModelAdmin #6379

jeffykle opened this issue Sep 9, 2020 · 6 comments · Fixed by #6402

Comments

@jeffykle
Copy link

jeffykle commented Sep 9, 2020

Issue Summary

menu_icon = 'media' or menu_icon = 'pick' display the correct icon.
menu_icon = 'thumbtack' or menu_icon = 'resubmit' do not display anything.

Technical details

Package Name Version
Django   3.1
Python   3.6.10
debug_toolbar Debug Toolbar 2.2
django_extensions Django Extensions 3.0.5
rest_framework Django REST framework 3.11.1
taggit Taggit 1.3.0
wagtail.core Wagtail core 2.10.1
@allcaps
Copy link
Member

allcaps commented Sep 9, 2020

  1. How can I reproduce this? How do you define these icons?
  2. AFAIK "thumbtack" and "resubmit" are not Wagtail icons. Do you use an icon package? Does pip freeze list wagtail-fontawesome? Which version?

@jeffykle
Copy link
Author

jeffykle commented Sep 9, 2020

I had used pip to install then later uninstall wagtailfontawesome. However these icons still appear in the styleguide
http://127.0.0.1:8000/admin/styleguide/#icons
image

class ShopItemAdmin(ThumbnailMixin, ModelAdmin):
    model = ShopItem
    menu_label = 'All Shop Items'  # ditch this to use verbose_name_plural from model
    menu_icon = 'resubmit'  # change as required
    ...

The menu item shows with the correct label, but no icon.

@jeffykle
Copy link
Author

jeffykle commented Sep 9, 2020

SVG file exists in site-packages.
site-packages\wagtail\admin\templates\wagtailadmin\icons\resubmit.svg

@zerolab
Copy link
Contributor

zerolab commented Sep 9, 2020

thumbtack and resubmit where added as purely SVG icons for the workflow work. Happy to move to an svg-only section in the styleguide to clarify that.

Note that the move to SVGs is not finished. #6107 is the tracker for the job, and still has MenuItems not ready. A PR tackling the change to MenuItems would be greatly appreciated.

@allcaps
Copy link
Member

allcaps commented Sep 10, 2020

Happy to move to an svg-only section in the styleguide to clarify that.

Is not needed. Those icons will be supported in the future. The real problem is that ModelAdmin does not support SVG yet. That is known and on the todo list #6107

MenuItems (including ModelAdminMenuItem and GroupMenuItem

We should focus on making this happen ^. Pull requests are welcome ;)

I don't think that new icons have to be backward compatible. We did not break anything that used to work. So I think this issue can be closed.

@Scotchester
Copy link
Contributor

I agree, @allcaps. I will try to take on this item very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants