Problem/Motivation

#2813405: Add a field to view and edit content's groups had a very small number of changes to files outside modules/gcontent_field.
We need to find new home for those changes.

Proposed resolution

Move things into entitygroupfield itself when possible.
If we need changes in the upstream Group core module for this to work, open and land a patch there.

Remaining tasks

  1. Find the missing parts.
  2. Figure out where they should live.
  3. Move/write code.
  4. Reviews.
  5. RTBC.
  6. Commit.

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#6 3151916-6.patch1.16 KBdww
#2 3151916-2.do-not-test.patch4.91 KBdww

Comments

dww created an issue. See original summary.

dww’s picture

Status: Active » Needs work
StatusFileSize
new4.91 KB

Here's everything that didn't make it into the subtree split (as a patch against group, it's not going to apply here, so do-not-test).

dww’s picture

src/Element/GroupAutocomplete.php seems like another candidate to put into Group core itself, not this module. #NeedsFollowup?

dww’s picture

And maybe src/Plugin/EntityReferenceSelection/GroupContentSelection.php too?

dww’s picture

I split off #3152324: Add a getPluginIdsByEntityType() method to src/Plugin/GroupContentEnablerManager into an issue/patch against Group core. Let's see how that goes. ;)

The rest of #2 is to alter the site-wide group settings for the per-entity-type label for the pseudo field. That seems like a fairly weird thing to do via site-wide settings. A few options to move forward:

A) Provide reasonable defaults and let folks that want to alter them translate the terms. Basically, use 'Group memberships' for user entities, and 'Groups' for everything else.

B) Use hook_form_alter() to inject our settings into the global site-wide Group settings page (much like we used to do by modifying the GroupSettingsForm class) and continue manage these labels via config settings.

C) Maybe there's some way to say we want to be able to edit this stuff via Field UI. Trying to find out.

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new1.16 KB

Here's #5A in patch form. ;) Seems to work well in local testing. Also solves the problem that we had settings but no schema for them.

dww credited larowlan.

dww’s picture

Re: #5C: There's A Module For That(tm)! https://www.drupal.org/project/base_field_override_ui

I just tried it locally, and it all works to handle this case.

So I'm strongly in favor of committing #6 as-is, and adding some documentation to recommend base_field_override_ui if anyone wants to further customize/configure the label and description for the pseudo field.

Crediting @larowlan for the pointer to this module.

Yay,
-Derek

  • dww committed aecf389 on 1.0.x
    Issue #3151916 by dww: Hard-code the label for the computed field...
dww’s picture

Status: Needs review » Fixed

#3152324: Add a getPluginIdsByEntityType() method to src/Plugin/GroupContentEnablerManager is on its own path now. Either it'll land in Group core, or we'll solve it internally.

I added a pointer to https://www.drupal.org/project/base_field_override_ui in the README.md in #3152713: Add documentation for Entity Group Field
Everything else here is resolved.
Calling this fixed.

Yay,
-Derek

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.