Hi Dan,
You've touched on something that I'd really like to get into Wagtail, but haven't had chance as yet...
Currently we have a hooks system where any app can define a module wagtail_hooks.py to extend Wagtail admin behaviour, such as adding menu items:
from wagtail.wagtailadmin import hooks
from wagtail.wagtailadmin.menu import MenuItem
def add_comments_menu_item(request, menu_items):
menu_items.append(
MenuItem('Comments', reverse('comments_index'), classnames='icon icon-user', order=100)
)
hooks.register('construct_main_menu', add_comments_menu_item)
At the moment there aren't a huge number of hook types defined, and I'd like to take this a lot further. A hook for inserting hallo.js plugins would be a really neat one to add, not just for adding non-core extensions, but also tidying up the existing code. Ideally the 'bundled' apps - wagtailimages, wagtaildocs and so on - will make use of this mechanism too, to the point where wagtailadmin itself doesn't contain any hard-coded references to thse apps.
Will see if I can fit in implementing a hook for hallo.js in the next week or so!
- Matt