wagtail-nest / wagtail-airtable

Airtable import and export support for Wagtail pages and Django models.
BSD 3-Clause "New" or "Revised" License
49 stars 15 forks source link

wagtail_airtable/wagtail_hooks.py uses deprecated classnames when creating a MenuItem #57

Closed maliahavlicek closed 7 months ago

maliahavlicek commented 10 months ago

Issue Summary

I am in the process of upgrading a project to wagtail 5.2 and updated all custom menu items in my project from classnames= to classname= but am still seeing the deprecation warning:

RemovedInWagtail60Warning: The `classnames` kwarg for MenuItem is deprecated - use `classname` instead.

Relevant Information

I have wagtail-airtable=0.6.0 installed, and when I put a breakpoint on the warning, I can see it traces back to wagtail-airtable:

image

I believe if you change Line 29 of wagtail_airtable/wagtail_hooks.py to use classname the deprecation warning will go away.

Technical details

gasman commented 7 months ago

Thanks for the report @maliahavlicek! Have now opened #64 to address this - the preferred way to set the menu item icon is icon_name="cog" rather than setting class name directly.