[buddypress-trac] [BuddyPress Trac] #5911: Improve user feedback in Group's invite screen.

buddypress-trac noreply at wordpress.org
Tue Sep 30 01:28:49 UTC 2014

#5911: Improve user feedback in Group's invite screen.
 Reporter:  imath        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  2.2
Component:  Theme        |     Version:  2.0
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |

Comment (by boonebgorges):

 > If you click right away on the send invites button: it's ok, but if you
 click on checkbox B, then the template reloads and the li element for A is
 not there anymore.

 > I think we could store in a js var the 'response', then create an event
 to trigger from bp_filter_request() if it's an invite request and we could
 eventually catch this event and prepend the js var into the friends list.

 Since we're currently rendering the entire template part on the server and
 sending the HTML as an AJAX response, it would be nice to fix the problem
 there, and not in JS.

 I'd need to look more deeply into the template-building logic, but I think
 it should be possible to check the following when generating the markup
 for each user on each refresh:

 - Have we recorded an unsent, unconfirmed invitation from the logged-in
 user? If so, make sure there's an `<li>` for the user
 - Are there any other invites/requests in the system for this user that
 predate our unsent invite? If so, add a message to the template: "Sending
 an invitation to this user will automatically..."
 - Have we just unchecked a box? If so, be sure only to delete the
 invitation in the system that has the logged-in user as the inviter, *not*
 all invitations. (And if we have logic that prevents ore than one
 invitation from being sent to a single user for a given group, we should
 remove it - there's no reason I can think of why it shouldn't be possible
 for someone to receive more than one invite to a group from different

 I think it will probably take some juggling of our core template functions
 (like `bp_group_has_invites()`) to get this to work right, but I think
 that's OK. I don't see any insurmountable difficulties. What do you think?

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5911#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list