[buddypress-trac] [BuddyPress Trac] #8045: AJAXify parts of group membership Dashboard UI using REST API

buddypress-trac noreply at wordpress.org
Wed Jan 30 21:52:45 UTC 2019


#8045: AJAXify parts of group membership Dashboard UI using REST API
--------------------------------------+---------------------
 Reporter:  boonebgorges              |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  5.0.0
Component:  Groups                    |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |
--------------------------------------+---------------------
Changes (by imath):

 * keywords:  needs-patch => needs-patch dev-feedback


Comment:

 In [https://buddypress.trac.wordpress.org/attachment/ticket/8045/8045
 .group-admin.patch 8045.group-admin.patch] I've tested a quick way to
 manage roles using the REST endpoint for the group members within the
 single Group Administration screen.

 As you will see I haven’t changed the UI that much but using the BP REST
 API is introducing some regression when used into the single group admin
 screen:
 - it’s not possible to demote an administrator to a moderator,
 - it’s not possible to unban a user to an administrator or a moderator.

 I had to play with css and adapt the markup so that if there’s no users
 into a specific role, then the paragraph informing there a no users is
 inside a table row to avoid overcomplicating the JavaScript.

 Here's some thoughts about the BP REST API:
 - `BP_REST_Group_Members_Endpoint` should probably best named
 `BP_REST_Group_Membership_Endpoint`.
 - the ‘join’ action should probably be into a `create_item()` method.
 - there should probably be some equivalent methods to
 `groups_{action}_membership_request()` where {action} can be ‘send’,
 ‘accept’, ‘reject’, ‘delete’…
 - there should be a way to demote an administrator to a moderator or unban
 a user to an administrator or a moderator.
 - I can see high interests in being able to batch promote/demote/ban/unban
 from the endpoint.

 This first patch is not very ambitious, but before suggesting something a
 bit more ambitious, I wanted to make sure I wasn’t going into a wrong
 direction :)

 So here’s what i think it would be great to do:
 - Use Backbone collection/model/views & underscore templates to replace
 the current UI and make it usable from the front end. (I thought about
 using ReastJS but I’m not sure loading this library into the front-end
 would be a good idea as most Nouveau JavaScript’s using Backbone)
 - Use a new UI closer to the way WordPress displays the list of users into
 the Admin with tabs >  All | Admins | Mods | Members and a unique
 selectbox to manage the role.
 - Manage membership requests/invites into 2 other tabs > Requests |
 Invites,
 - Add a search feature as it can be very challenging to find a user when
 he’s at the 10th page for example.
 - Use the BP REST API to get/create/update/delete group memberships.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8045#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list