boonebgorges / invite-anyone

Invite Anyone - Expands on BuddyPress's invitation features
http://teleogistic.net/code/buddypress/invite-anyone
29 stars 29 forks source link

Select people to invite from your friends list #145

Open Jon007 opened 7 years ago

Jon007 commented 7 years ago

The message "Select people to invite from your friends list" is not connected to an implementation of "Select people to invite from your friends list".

Actually there is only one list with either everyone or Friends, according to Settings\Invite Anyone, Limit group invitations.

  1. If is set to invite anyone there is no way to filter the list to just friends
  2. the message is fixed and does not change according to the scope
  3. when a user is checked in "Select members from the directory" on the left, the user details show and the "Select people to invite" message disappears. However the people are not yet invited, they still need to be selected and invited, so actually the message should be hidden first and then visible when the next step needs actioning.
    
        <div id="message" class="info">
            <p><?php _e('Select people to invite from your friends list.', 'invite-anyone'); ?></p>
        </div>

Instead of changing the message it would be clearer to change the UI: instead of the multi-step results, show one level of search results as the standard members loop with a checkbox by each member, then select members and Send.
boonebgorges commented 7 years ago

Thanks very much for this report and for #144, @Jon007.

The way that the invitee-selection screen works is extremely fragile, having been ported (and mangled) many years ago out of BP's more limited invitation interface. I'd love to see this whole thing rewritten in a sensible way, perhaps using some sort of declarative JS framework, with a full rethink of the way the UI works.

Jon007 commented 7 years ago

Well my idea is as per #144 to try to make it much more simple, by taking advantage of the existing now-standard searchable membership directory code, and some light customization to the UI template to add the checkboxes.

Jon007 commented 7 years ago

Umm... it looks like this is partly done in BP Nouveau - Next Generation Template Packs So maybe it would be best actually to focus on fixing BP Nouveau for the invitations of existing members, and Invite Anyone for the email functionality.

To support this we'd need to first turn off the Group - Send Invites function of Invite Anyone, either as a option or if BP Nouveau is activated, and Member Send Invites by email.

How best to do that?

aha, I just saw you already know about the new template pack as you wrote this: https://bpdevel.wordpress.com/2017/04/12/bonjour-nouveau-an-introduction-to-the-next-template-packs/ I'd love to hear your idea about how to make Invite Anyone compatible

boonebgorges commented 7 years ago

Hm, good question. I'll have to spend some time thinking about how (and whether) Invite Anyone's group invitation feature should integrate with Nouveau. At a minimum, it'll have to be aware enough of Nouveau to provide a different kind of fallback theme template. (Things like the invite-anyone-not-just-friends setting are still relevant.)

In the meantime, I don't see an obvious way to disable only the group-invitations part of IA. One easy thing is to move the bp_register_group_extension( 'BP_Invite_Anyone' ) call to an add_action() callback, so that you can remove_action() if you want to turn it off. Does that sound reasonable?

Jon007 commented 7 years ago

Things like the invite-anyone-not-just-friends setting are still relevant.

No no, BP Nouveau already allows Invite anyone not just friends.

So in the case of BP Nouveau instead of replacing the standard invite screen, just add a submenu to link through to invite by email..