Group templates in BuddyPress 1.7

As some of you may know, a big focus in the next BuddyPress development cycle is to introduce a theme template compatibility layer. This is a much better way for a plugin to provide template files; rather than provide a whole theme we will provide very specific, very minimal templates that we inject into your current theme’s files when a page is loaded. You can find out how this works by looking at the bbPress plugin as they have already implemented it. We’ll be porting the code over.

This gives us a great opportunity to have a fresh look at UI, accessibility, and design when we are building all of the new templates. We’d love for you to help us build these, so we’ll be writing more blog posts and letting people know when we’re closer to starting this work.

As I sit in a plane drafting this post on my way to San Francisco for this weekend’s WordCamp, I’ve been thinking about this work and I believe there is a subset of templates in existing BuddyPress themes which are rarely seen or used by most people, yet represent an investment of time and effort for theme authors that they could probably better use elsewhere: the “Group Create/Edit” templates.

There are several bult-in screens when you go to the Edit Group page: details, delete, members. Almost every plugin which adds group functionality adds another screen here. Don’t misunderstand me. Frontend creation/editing for certain types of content is a great idea — look at P2, and QuickPress. I’m not suggesting we remove everything from the frontend and only put it into wp-admin (though we do want to add wp-admin screens for all content types, eventually).

I propose moving the functionality of the create/edit group screens into the Toolbar. Not adding links to the Toolbar, but the actual functionality. The Toolbar is currently as functional as a web browser’s bookmarks bar, but it could be so much more.

This would let us remove the “extra” templates. I haven’t spent too much time thinking of the technical implementation detail but via the groups extension class (perhaps a new child class*), we would let plugins register details about the settings that their extension provides. E.g description, variable name, type, onsave callback, validation callback. BuddyPress would generate the form markup automagically.

If we were cool, we could also put something QuickPress-like into the Toolbar for blog posts, too.

An example of the visual appearance that I have in mind would be something like what Automattic has done on when you press New Post in the Toolbar, but better.
The workflow would be: you press Edit Group, the middle part of the Toolbar is then stretched down, and this new area contains the group’s details to edit, then you press Save, and the panel snaps shut. I’d love to get your thoughts on this.

[*]Backwards compatibility wouldn’t be hard to resolve, but it would mean we’d need a stash of not-used-by-default template parts. I don’t think there’s a problem with that.