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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

> 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.

othermachines’s picture

@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.

joachim’s picture

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.

amitaibu’s picture

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.

amitaibu’s picture

Status: Active » Needs review
FileSize
50.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

amitaibu’s picture

Oh, and the patch...

amitaibu’s picture

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.

othermachines’s picture

@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 -

amitaibu’s picture

> 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).

othermachines’s picture

Status: Needs work » Needs review
FileSize
1.58 KB

You got it.

amitaibu’s picture

Status: Needs review » Needs work

Committed, thanks. Back to needs-work.

  • amitaibu committed 5db99d0 on 8.x-1.x
    Issue #1905364 by Amitaibu | joachim: Improve the 'OG field settings' UX...
  • amitaibu committed f041451 on 8.x-1.x authored by othermachines
    Issue #1905364 follow-up by othermachines: Improve the 'OG field...