I'm afraid that the UX for adding and manipulating fields for groups is pretty bad -- sorry!

Part of the problem stems from the fact that there is a big gap between the way a site builder conceptualizes this task and the way the Drupal architecture accomplishes it. Put more simply, on the one hand the site builder thinks 'My group is made up of Group nodes, Article nodes, and Tag terms, with Normal membership type', but there is no actual 'definition' of a that in Drupal, just a lot of fields on different entities.

Hence we have an architecture-first UI, which doesn't work well at all. (Anecdotally: myself and other developers were completely baffled by it at first, and if I hadn't been shown it I'm not sure I would have figured out what I was meant to do to make something a group!)

What I think we have to do is fake up the concept of 'a group type' in the UI, even if that doesn't exist materially in Drupal.

So we'd have a main admin 'Group types' page that looks like this:

OG UI proposal - admin list.png

This would need to go investigating fields to determine how they all fit together. In the example, it's found that there is a 'group' field on 'group' nodes, and that the 'group content' field on 'article' nodes points to this: hence they form part of the same group definition. Likewise, it's looked at the group membership fields on users to figure out which membership types apply.

Here's the form for editing a single group:

OG UI proposal - edit.png

The group entity type can't be changed -- that would bring the whole thing crashing down (!!). If we allow removal of group content entity types, we probably need a confirm form.

It occurs to me that complications arise when, say, we have two group types, say node types A and B, and article nodes have a group content field that refers to *both*. That would be... interesting to deal with, as deleting the article node from group A doesn't mean deleting the field, because it does double duty, but rather changing its target bundle settings... *sigh*.

Anyway, I thought I'd get the ball rolling and get people's feedback on this. Any other pitfalls I haven't spotted?

Files: 
CommentFileSizeAuthor
#10 og-field_type_context-1905364-7061900.patch1.58 KBothermachines
PASSED: [[SimpleTest]]: [MySQL] 780 pass(es).
[ View ]
#6 1905364-og-field-name-5.patch8.87 KBAmitaibu
PASSED: [[SimpleTest]]: [MySQL] 805 pass(es).
[ View ]
#5 og-settings.png50.68 KBAmitaibu
OG UI proposal - edit.png52.8 KBjoachim
OG UI proposal - admin list.png46.12 KBjoachim

Comments

> I'm afraid that the UX for adding and manipulating fields for groups is pretty bad -- sorry!

No need to be sorry, the UX sucks :/

Let's try also the UX team, maybe they can have a look in OG and give some feedback as-well.

@joachim

That's some good work you've done there. One thing that jumps out is that we've lost any reference to fields altogether. Do you think this might create a roadblock for those who require further customization (and might be new to OG)? Since there are a lot of reasons why a site builder might need to edit these fields directly, I wonder if there is some way we can maintain the simplicity of what you have here without completely disguising the architecture. Or is that a pitfall others can live with? Anyway, I'll think on it and post here if I have any ideas.

You can always add fields manually in the fields admin for the relevant entities.

And we could add help text to this group edit form to explain that this creates fields, and give links to the admin page to allow further customization.

Assigned:Unassigned» Amitaibu

For now, I've started working on allowing adding multiple group audience fields via og field settings page, by allowing to enter a field name.

Status:Active» Needs review
StatusFileSize
new50.68 KB

This page still deserves love, but the following patch makes it easier to add multiple group-audience fields.
As bonus it also changes via Ajax the description per selected field type, so it's easier to know which kind of field you attach.

og-settings.png

StatusFileSize
new8.87 KB
PASSED: [[SimpleTest]]: [MySQL] 805 pass(es).
[ View ]

Oh, and the patch...

Status:Needs review» Needs work

I've committed the patch in #6. Marking as needs-review, as some more love should be given to that page.

@Amitaibu -

I just downloaded your changes. This is a step, for sure. Not being allowed to add multiple fields was the big thing that was missing from this page, functionally. I didn't encounter any errors.

I agree with @joachim that this page needs a major overhaul, but if we're only tweaking for now: can we move the field description and field name into a wrapper with the "Fields" select? Maybe just move everything inside field_info_wrapper? This won't make a difference on some interfaces, but on mine (Rubik) the wrappers offer some visual context. Otherwise it isn't clear they have much to do with each other.

Question: It's my understanding that, traditionally, certain fields can only be added to groups, and others to group content. Is it now true that you can add any field to any type? I didn't go through them all but I tried a couple that I would have expected to generate a validation error and didn't get one. Or maybe I am imagining things!

Thnx -

> Maybe just move everything inside field_info_wrapper?

I agree - Patch please :)

> Is it now true that you can add any field to any type?

Yes, because a group can also be a group-content (think subgroups).

Status:Needs work» Needs review
StatusFileSize
new1.58 KB
PASSED: [[SimpleTest]]: [MySQL] 780 pass(es).
[ View ]

You got it.

Status:Needs review» Needs work

Committed, thanks. Back to needs-work.