BP Dev-Chat Summary: December 2, 2020

7.0.0 release tasks progress

We started the dev chat chacking our progress about our next major release tasks.

TasksOwnerProgress
BP REST API documentation updates@im4th100%
BP Survey results@im4th100%
7.0.0 Release note@vapvarun100%
7.0.0 Credits update:
โ€“ BuddyPress Trac
โ€“ BP REST GitHub repository
โ€“ย Translators

@dcavins
@im4th
@im4th

100%
100%
100%
7.0.0 Pizza Restaurant name@dcavins๐Ÿคซ
7.0.0 Announcement post@im4th20%

7.0.0 second release candidate

The main goal of this release candidate is to beta test improvements brought to the BP Nouveauโ€™s compatibility with the WordPress 5.6 new default theme โ€œTwenty Twenty-Oneโ€ (see #8395). @im4th insisted on the fact it was important to make sure text was readable in both modes : dark and light and as the 7.0.0 final release will happen one or two days after WordPress 5.6, itโ€™s important BuddyPress looks nice in Twenty Twenty-One. The initial patch attached to the ticket is using the companion stylesheet feature so that styles are only loaded for this theme or this themeโ€™s child themes.

@vapvarun said he would test the patch asap and that he would probably improve it. Thatโ€™s what he did a few days after the development meeting.

The RC2 was released very soon after.

7.0.0 release schedule update

  • 7.0.0-RC1: November 20 (string freeze).
  • 7.0.0-RC2: December 2nd
  • 7.0.0: December 9th (asap!)

We still need to finish the announcement post of the release, so we couldnโ€™t have it packaged to the scheduled date ๐Ÿ˜ž. As soon as it is ready, we will package it. Thanks in advance for your comprehension.

Open floor

Topics weโ€™ve been talking about:

  • How to find ways to get more contributors to beta test BuddyPress? @vapvarun suggested:
    • Write a todo list about tasks to achieve for next release (8.0)
    • Improve documentation about BP support for themes
    • Make template customization easier for users (WP FSE?)
  • Possible 8.0 early tasks: #7162 & working on giving more control to the user about the registration form (allowing users to select what xProfile fields to use in this form).
  • What about having a new BP Standalone theme? @johnjamesjacoby shared his wishes about it:
    • a 3 columns bp-default looking โ€œchat appโ€ theme.
    • Itโ€™s time to take advantage of all the work thatโ€™s gone into BuddyPress since the beginning, and use that to rethink what a โ€œbp-defaultโ€ looking theme would be today.
    • It should be responsive and use the BP REST API.
  • What about having a BP Specific area into WP Admin to manage every feature?

Next Dev-Chat

It will happen onย December 16 at 19:00 UTCย and of course inย #BuddyPress. If you have ideas or questions, feel free (and we are strongly encouraging you) to comment this summary to share them!

#7-0-0, #dev-chat, #summary

BuddyPress 2020 survey results

Hi everyone,

Weโ€™ve just published the BuddyPress 2020 survey results, you can check them from our official site:

Many thanks to all participants ๐Ÿ˜.

#2020

BuddyPress 7.0.0 Release Candidate 2

This is our last chance to test 7.0.0 before itโ€™s officially released! Letโ€™s do it ๐Ÿ•บ๐Ÿป

Thanks in advance for your contributions ๐Ÿฅฐ

#7-0-0, #release-candidate

BP Dev-Chat agenda December 2, 2020

Hi BuddyPress contributors!

Please join the #BuddyPress developer meeting that will happen on December 2 at 19:00 UTC (tomorrow), hereโ€™s our agenda:

  • 7.0.0 release tasks progress
  • 7.0.0 second release candidate (please have a look at this ticket #8395)
  • Open floor

Thanks in advance for your contributions ๐Ÿค.

#7-0-0, #agenda, #dev-chat

BP Dev-Chat Summary: November 18, 2020

6.4.0 โ€œPHP 8.0โ€ compatibility release

BuddyPress 6.4.0 has been released yesterday, as weโ€™ve been discussing during the development meeting, it includes fixes to PHP 8.0 deprecated notices for BP Core & BP REST. It also includes a security fix. Read more about this release.

7.0.0 release tasks progress

TasksOwnerProgress
BP REST API documentation updates@im4th100%
BP Survey results@im4th0%
7.0.0 Release note@vapvarun40%
7.0.0 Credits update:
โ€“ BuddyPress Trac
โ€“ BP REST GitHub repository
โ€“ Translators

@dcavins
@im4th
@im4th

100%
100%
0%
7.0.0 Pizza Restaurant name@dcavins๐Ÿคซ
7.0.0 Announcement post@im4th20%

@vapvarun has been working on the release note, the remaining things to write is the changelog. @johnjamesjacoby removed the link to the BP Survey on our official site, @im4th needs to write a post about the results and publish it on BuddyPress.org asap.

7.0.0 first release candidate

Weโ€™ve spent the rest of the meeting working on getting the 7.0.0-RC1release ready:

  • @dcavins reviewed the Hello Screen texts ๐Ÿ˜ (#8376).
  • @im4th worked on improving the Activity Embed block instructions (#8397) as only public activities can be embed into a post or a page.
  • @vapvarun tested #8394.
  • Finally we decided to include the feature to list the displayed Memberโ€™s Member Types into their profile header (#8394) as the poll @im4th made on Twitter got 83% votes for ๐Ÿ™Œ.

7.0.0-RC1 has been released 2 days late (November 20) according to the initial schedule. Itโ€™s an important step, BuddyPress plugin/theme authors should really test their piece of work against it so that our users can fully enjoy 7.0.0. If you find a bug, please open a ticket to report it on our Trac environment or use this support topic.

RC1 also marks theย string freezeย point of the 7.0.0 release schedule. So we will not add/edit or delete i18n strings until 7.0.0 is released. Just like what we did for 6.0.0, we will credit people who contributed to translating BuddyPress into as many languages as possible. Donโ€™t hesitate to join the effort!

Hereโ€™s 7.0.0 (development column on GlotPress) translation tops so far:

LocaleProgress
English ๐Ÿ‡ฌ๐Ÿ‡ง100%
Romanian ๐Ÿ‡ท๐Ÿ‡ด100%
French ๐Ÿ‡ซ๐Ÿ‡ท100%
Chinese ๐Ÿ‡จ๐Ÿ‡ณ99%
Czech ๐Ÿ‡จ๐Ÿ‡ฟ98%

7.0.0 release schedule update

Next Dev-Chat

It will happen onย December 4 at 19:00 UTCย and of course inย #BuddyPress. If you have ideas or questions, feel free (and we are strongly encouraging you) to comment this summary to share them!

#7-0-0, #dev-chat, #summary

BuddyPress 6.4.0 Maintenance and Security Release

Hi everyone,

More information about it here ๐Ÿ‘‡

Please upgrade ๐Ÿ™ ๐Ÿ˜‰.

#6-4-0, #release, #security

BuddyPress 7.0.0 Release Candidate

The first release candidate of BuddyPress 7.0.0 is ready for your testing!

Thanks in advance for your contributions ๐Ÿ˜

#7-0-0, #rc, #release

BP Dev Chat Agenda November 18, 2020.

Hi BuddyPress contributors!

Please join the #BuddyPress developers meeting that will happen on November 18 at 19:00 UTC (tomorrow), weโ€™ll have 1 hour to talk about:

  • 6.4.0 ยซ PHP 8.0 ยป compatibility release
  • 7.0.0 release tasks progress
  • 7.0.0 first release candidate (scheduled after the meeting ๐Ÿ˜ฑ๐Ÿ•)
  • Open floor (if we have some time left!)

Thanks in advance for your time ๐Ÿ˜.

#7-0-0, #agenda, #dev-chat

BuddyPress REST API, whatโ€™s new in 7.0.0 ?

First of all, the Developer documentation has been updated according to the latest improvements weโ€™ve brought to the BuddyPress REST API!

Members Endpoints

Whatโ€™s the friendship status of the logged in user with other(s)?

If the Friends component is active and youโ€™re wondering whatโ€™s the answer to this question, then you can get a clue thanks to a new property weโ€™ve added to the Members item schema: friendship_status_slug.

Hereโ€™s an example of use of this new property:

/**
 * Showing the `friendship_status_slug` Members Endpoint's schema property.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/members\',
			type: \'GET\',
			data: {
				context: \'view\',
				type: \'active\',
				exclude: [2]
			}
		} ).done( function( data ) {
			data.forEach( function( member ) {
				console.log( member.name + \' => \' + member.friendship_status_slug );
			} );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

As you can see in the above browserโ€™s inspector, the logged in user is :

  • not friend with admin (friendship_status_slug: 'not_friends'),
  • has requested a friendship request to Mercime that is still pending her approval (friendship_status_slug: 'pending'),
  • has received a friendship request from John that is awaiting his response (friendship_status_slug: 'awaiting_response'),
  • friend with Boone (friendship_status_slug: 'is_friend').

When was a user last active, what is his/her latest update and how many friends do he/she has ?

Thereโ€™s now a new request argument you can use to know these information : populate_extras. You simply need to set it to true to do so. The response will include these extra properties:

  1. The last_activity object which contains 2 properties:ย 
    • date: the date the user was last active,
    • timediff: a human diff string, eg: โ€œ20 minutes agoโ€.
  2. The latest_update object which contains 3 properties:
    • id: the ID of the activity,
    • raw: the content of the activity as it exists into the database.
    • rendered: the content of the activity ready for output.
  3. The total_friend_count variable which contains the number of friends of the user (integer)

Hereโ€™s an example of use of this new request argument:

/**
 * Showing the `populate_extras` Members/:user_id request argument.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/members/2\',
			type: \'GET\',
			data: {
				context: \'view\',
				populate_extras: true
			}
		} ).done( function( member ) {
			console.log( \'Last activity:\' );
			console.log( member.last_activity );
			console.log( \'Latest activity update:\' );
			console.log( member.latest_update );
			console.log( \'Total number of friends:\' );
			console.log( member.total_friend_count );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

Can I assign more than one Member Type to a member like itโ€™s now possible in BuddyPress?

Yes you can! You simply need to use a comma separated list of Member Types into the member_type request arggument when updating/creating the user.

Hereโ€™s an example for the first case:

/**
 * Showing the `member_type` request argument for the members/:user_id endpoint.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/members/2\',
			type: \'PUT\',
			data: {
				context: \'edit\',
				member_type: \'leads,developers\'
			}
		} ).done( function( member ) {
			console.log( \'Member Types\' );
			console.log( member.member_types );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

Groups Endpoints

Is there a route to get the groups the logged in user belongs to?

Yes, itโ€™s /buddypress/v1/groups/me. Querying it youโ€™ll get a list of these groups for the current user.

Hereโ€™s an example about how to use it:

/**
 * Showing the groups/me endpoint.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/groups/me\',
			type: \'GET\',
			data: {
				context: \'view\'
			}
		} ).done( function( groups ) {
			console.log( \'My Groups\' );
			groups.forEach( function( group ) {
				console.log( group.name );
			} );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

When was the last time a group was active & how many users are members of this group ?

Juste like for the Members Endpoints (GET Members & GET Member), thereโ€™s now a new request argument you can use to know these information : populate_extras. You simply need to set it to true to do so. The response will include these extra properties:

  1. total_member_count: the count of all Group members,
  2. last_activity: the date the Group was last active,
  3. last_activity_diff: the human diff time the Group was last active.

Hereโ€™s an example about how to use it:

/**
 * Showing the `populate_extras` Groups/:group_id request argument.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/groups/1\',
			type: \'GET\',
			data: {
				context: \'view\',
				populate_extras: true
			}
		} ).done( function( groups ) {
			groups.forEach( function( group ) {
				console.log( \'Last activity date:\' );
				console.log( group.last_activity );
				console.log( \'Last activity time diff:\' );
				console.log( group.last_activity_diff );
				console.log( \'Total number of group members:\' );
				console.log( group.total_member_count );
			} );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

Is it possible to append one or more Group Types to the Group Type(s) the group is assigned to ? What about removing one or more specific Group Types from the ones the group is assigned to ?

The PUT verb of the Groups/:group_id endpoint now supports 2 new request arguments to achieve this:

  • append_types : a string containing the Group Type name to append to existing groupโ€™s Group Types. To append more than one Group Type, use a comma separated list of Group Type names.
  • remove_types : a string containing the Group Type name to remove to existing groupโ€™s Group Types. To remove more than one Group Type, use a comma separated list of Group Type names.

Hereโ€™s an exemple of appending Group Types to the one that is already assigned to the group:

/**
 * Showing the groups/:group_id update method new request arguments.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/groups/1\',
			type: \'PUT\',
			data: {
				context: \'view\',
				append_types: \'team,pizzalovers\'
			}
		} ).done( function( groups ) {
			console.log( \'The initial + appended group types:\' );
			groups.forEach( function( group ) {
				console.log( group.types );
			} );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

Activity Endpoint

Is it possible to filter the list of activities on more than one action/type?

Yes, to filter the fetched activities (GET Activities) on one action/type, you need to set the type collection parameter to an array containing the corresponding action/type. For more than one action/type, include all the needed actions/types into the array used as the type collection parameter.

Hereโ€™s an example of how to achieve this:

/**
 * Showing the activity streams filtered on 2 actions/types.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/activity\',
			type: \'GET\',
			data: {
				context: \'view\',
				type: [\'activity_update\', \'friendship_created\', \'friendship_accepted\']
			}
		} ).done( function( activities ) {
			console.log( \'Updates and created friendships:\' );
			activities.forEach( function( activity ) {
				console.log( activity.id + \' => \' + activity.type );
			} );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

Do we still need to set the component request argument to groups when fetching group activities about a specified group_id request argument?

No! From now on the group_id is enough, of course you can still alternatively use a request (GET Activities) having the primary_id argument set to the ID of the group and the component argument set to groups.

Hereโ€™s an example about how you can use this request argument:

/**
 * Showing the activity streams filtered on a specific group.
 */
function test_bp_rest_api() {
	wp_enqueue_script( 'bp-api-request' );
	wp_add_inline_script(
		'bp-api-request',
		'bp.apiRequest( {
			path: \'buddypress/v1/activity\',
			type: \'GET\',
			data: {
				context: \'view\',
				group_id: 1
			}
		} ).done( function( activities ) {
			console.log( \'Group Activities:\' );
			activities.forEach( function( activity ) {
				console.log( activity.id + \' => \' + activity.component );
			} );
		} ).fail( function( error ) {
			return error;
		} );'
	);
}
add_action( 'bp_enqueue_scripts', 'test_bp_rest_api' );
Click on the image to view it in full screen

Blogs Endpoint

And last but not least, weโ€™ve added a new route to let users create a blog (POST Blog) when the Network option is allowing it, read more about it from our freshly updated Developers documentation.

PS: if you want to get all examples at once, hereโ€™s a Gist.

#7-0-0, #rest-api

BuddyPress 7.0.0-beta2

Hi everyone!

BuddyPress 7.0.0-beta2 is ready for your testing, thanks in advance for your help ๐Ÿ• ๐Ÿ˜

https://buddypress.org/2020/11/buddypress-7-0-0-beta2/

#7-0-0, #beta, #release