wagtail / wagtail-generic-chooser

A toolkit for custom chooser popups in Wagtail
BSD 3-Clause "New" or "Revised" License
116 stars 25 forks source link

Snippet icon expanding outside of the "icon box" #76

Open jamesbiggs opened 1 year ago

jamesbiggs commented 1 year ago

image

After upgrading my project to wagtail 5.1, all my uses of the wagtail-generic-chooser have started to look like the above. I'm not noticing this anywhere else so I'm not sure if it's coming from the wagtail package or the wagtail-generic-chooser package. However I'm not seeing any CSS in this package so I'm thinking maybe it's coming from a change in wagtail?

If we can add a width: 95%; somewhere that would apply it to https://github.com/wagtail/wagtail-generic-chooser/blob/main/generic_chooser/templates/generic_chooser/widgets/chooser.html#L15-L17, this seems to fix the issue: image

gasman commented 1 year ago

Hi @jamesbiggs - thanks for the report.

I didn't encounter anything like this when updating this package for Wagtail 5.1 last week. Often, CSS bugs on upgrade can be a result of outdated CSS being cached from the previous version - have you tried force-refreshing the page? And if this is on a production site (running under a real webserver), did you run ./manage.py collectstatic after upgrading?

jamesbiggs commented 1 year ago

Hi @gasman, cheers for the speedy response! 😃 I've done a force-refresh and on my local just ran ./manage.py collectstatic but am still getting this. Same on the prod site, we run collectstatic in our build step, force refresh had no luck either 😢