BP Dev Chat Agenda: November 13, 2019

Hi BuddyPress contributors!

This is the agenda for our next Dev Chat which will happen this Wednesday at 18:00 UTC (tomorrow!!) in #BuddyPress. Please note we’ve changed our meeting’s time to 18:00 UTC.

  1. 5.1.0
    • 5.1.0-beta was published on November 6, let’s schedule 5.1.0 release.
  2. BP Beta Tester
    • Have you tested it? Is it ready to be published on the WordPress.org plugins directory ? FYI, I’ve just released a 1.0.0-RC.
  3. 6.0.0
  4. BuddyPress.org
    • #8153 BuddyPress survey for 2019.
    • #5525 Move BP Devel (this site) to Make.BuddyPress.org

If you have anything you wish to add (or remove) to this agenda or specific items related to those listed above, please leave a comment below.

#5-0-0, #6-0-0

BuddyPress 5.1.0-beta1 + BP Beta Tester 1.0.0-beta1

The next maintenance release (5.1.0) for BuddyPress is available for testing, you can read more about it here: https://buddypress.org/2019/11/buddypress-5-1-0-beta1/

We’re also testing a new plugin to help you test future BuddyPress beta and release candidates: BP Beta Tester.

Thanks in advance for your tests ♥️

#5-0-0, #beta

Take the BuddyPress Blocks Poll

Dear BuddyPress Contributors, Developers & Users, let’s talk about BuddyPress blocks!

In 5.0.0, we introduced the BP REST API and a BuddyPress Blocks category: these two pieces are the foundation for inserting and organizing BuddyPress content within the Block Editor.

The Development Team has been talking about possible ways BuddyPress could take advantage of what the Gutenberg Project brings to WordPress. We have some ideas but we would like to know what you would use BuddyPress blocks for. Let us know your thoughts by taking this poll.

Take the BuddyPress Blocks Poll

To tease your imagination we’ve added a list of possible BuddyPress blocks, though you should feel free to add your own ideas using the last checkbox. If the checkbox entry form is too limited for explaining your idea, use the comment form below the poll to share your thoughts with us.

Thanks a lot for your contributions ♥️

#6-0-0, #poll

BP Dev Chat Summary: October 2, 2019

5.0.0 development cycle report

BuddyPress 5.0.0 was released on September 30, 2 days before this dev-chat happened.

First feedbacks

@boonebgorges was the first to share his feedback about this release. He congratulated the “5.0 team” for their amazing contributions.

@im4th sent new props to all 5.0 contributors and informed about the first results of the release in terms of downloads. The spike was reached on October 1st with 23562 downloads (~1K less than the one we had for 4.4.0). At the time of the dev-chat, no support topics were posted about issues relative to the 5.0.0 upgrade.

We unfortunately had an issue with po/mo language packs generation. Thankfully, the Meta Team fixed it very quickly and we updated our release process to make sure it won’t happen again.

What have we done well?

For @espellcaste we kept our development meetings (dev-chat) consistent (every two weeks). He also think publishing development notes during the development cycle and before the release was a good practice.

@im4th thinks having the BP REST API documentation ready before the release was a great team achievement. Developing the BP REST API from GitHub was also a great way to save some time (especially when rebasing!)

What can we improve?

We all noticed testing involvement was very low during 5.0.0 beta tests. We’ve tried to understand the reasons behind this fact:

  • lack of interest?
  • lack of time?
  • lack of visibility of our communication?
  • total confidence in our work?

It’s important we try to reach and get the involvement of early adopters, advanced users, plugin and theme developers during BuddyPress major release beta tests.

@im4th then asked if the frequency and the schedule time of meetings were suitable for all. The “every other Wednesday” seems to be fine with everyone but moving the schedule time to one hour earlier seems better.

What’s next in BuddyPress?

6.0.0 priorities

The first priority is to complete the BP REST API with the remaining endpoints (#7156).

About the Gutenberg project and to follow up with a previous conversation we had about it. We need to have a better idea about BuddyPress users needs on the BuddyPress Blocks (#8048) topic: that’s why we’ll share a poll with them. @dcavins thinks the obvious first step is to have a block version of our existing widgets: we all agreed. About the poll, as @boonebgorges pointed out we might have a very limited participation to it, so we will have to analyze the results very carefully. He also pointed out the poll was to consider as one input like any other. @im4th will work on a text about it in order to be able to explain and share the poll on this blog and on one BuddyPress forums topic.

@im4th thinks that more than blocks BuddyPress users are expecting a “BuddyPress maintained” component to manage User Media (#8022). He plans to revamp the BP Attachments plugin he started a while ago to try to have something ready for 6.0.0.

@im4th is also planning to work on migrating the way BuddyPress builds URL to use the WP Rewrites API (#4954). He thinks that as it’s a breaking change, we need to build it so that it can be “tested & deactivated” for a while.

@dcavins will take benefit of the new BP Invitations API to work on Network invitations and membership requests (#8139). He renew his wish to get our feedbacks about the road he plans to take.

After the dev-chat @im4th & @johnjamesjacoby also talked about including the BerlinDB features into BuddyPress.

How can we have more betatesters?

@im4th shared his ideas about this potential improvement we all agreed on during our 5.0.0 cycle development report:

  • A beta tester plugin just like the WordPress one, but for BuddyPress.
  • Migrate this blog into the BuddyPress.org network (#5525) and extend it to include a handbook about contributing to BuddyPress.

How can we improve the way users get help?

Unfortunately we ran short of time and decided to talk about this point during our next dev-chat.

Next dev-chat

It will happen on October 16 at 18:00 UTC in #BuddyPress. We moved our dev-chat time to one hour earlier, don’t miss it!

PS: if you have ideas or questions, feel free (and we are strongly encouraging you) to comment this summary to share them!

#5-0-0, #6-0-0

BP Dev Chat Agenda: October 2, 2019

Hi BuddyPress contributors!

This is the agenda for our next Dev Chat which will happen this Wednesday (tomorrow) at 19:00 UTC in #BuddyPress.

5.0.0 “Le Gusto” was released yesterday: thanks everyone who got involved in making it happen 😍, let’s take some time to share our thoughts about the following points.

  1. 5.0.0 development cycle report
    • First feedbacks about this new release?
    • What have we done well?
    • What can we improve?
  2. What’s next in BuddyPress?
    • 6.0.0 priorities?
    • How can we improve the way users get help?
    • How can we have more betatesters?

If you have anything you wish to add to this agenda or specific items related to those listed above, please leave a comment below.

#5-0-0, #6-0-0

bp.apiRequest(), your JavaScript Buddy to help you start using the BP REST API

In BuddyPress 5.0.0 (Release date ~ September 30, 2019), we’re introducing the BP REST API: a new way for BuddyPress developers to interact with the components of BuddyPress powered community sites.

If you’re familiar with the WordPress REST API, you should easily find out how to use the BP REST API as it extends it to provide new community oriented endpoints.

The BP REST API, just like the WP REST API, uses a cookie authentication. You need 4 things to get a response from one of the BP REST API endpoints :

  1. The rest_nonce
  2. The WP REST root URL rest_url()
  3. One of the available BuddyPress endpoint’s path, for example /buddypress/v1/members
  4. The transport method (GET, POST, PUT, DELETE, OPTIONS).

You can build everything yourself into your JS script making sure to carry points 1. & 2. from PHP using the wp_localize_script() function.

You can also add a dependency to bp-api-request when enqueueing your JS script to :

  • save some time ⏱
  • make sure it will work for all the WordPress versions BuddyPress supports (4.7 to latest) 😅

Adding a dependency to bp-api-request

wp_register_script(
    'your-plugin-js-handle', // The handle to use when enqueueing your script.
    'https://site.url/wp-content/plugins/your-plugin/js/your-JavaScript-file.js',
    array(
        'bp-api-request', // The dependency to add to use the bp.apiRequest function.
    ),
    '1.2.3', // Your plugin version.
    true     // True to load your script into the footer. False otherwise.
);

Doing so, you’ll just need to enqueue your JavaScript file at the right time and for the right context using wp_enqueue_script( 'your-plugin-js-handle' ) without having to care about the REST nonce and the WP REST root URL.

function your_plugin_enqueue_assets() {
    // Only loads the JavaScript when a user is viewing his profile.
    if ( bp_is_my_profile() ) {
        wp_enqueue_script( 'your-plugin-js-handle' );
    }
}
add_action( 'bp_enqueue_scripts', 'your_plugin_enqueue_assets' );

Using bp.apiRequest() within your JS script

The only elements you’ll have to care about are:

You’ll need to group all these elements into an object looking like the highlighted lines below:

( function( bp, $ ) {
    window.bpRestApiResponse = {};

    var helloBPApiRequest = function() {
        bp.apiRequest( {
            path: '/buddypress/v1/members/me',
            type: 'GET',
            data: {
                context: 'view',
            }
        } ).done( function( data ) {
            bpRestApiResponse = data;
        } ).fail( function( error ) {
            alert( error.message );
        } );
    };
	
    $( document ).ready( helloBPApiRequest );
    
} )( window.bp || {}, jQuery );

From there, If you log the bpRestApiResponse variable into your browser’s console when visiting your BuddyPress profile you’ll see the JSON object the BP REST API should respond to you.

Oh.. wait but how can I get all BuddyPress endpoint paths etc. ?

We wrote a complete documentation with an example of use for each endpoint. We will soon make it available on the BuddyPress.org network.

In the meantime, if you’re eager to have some fun with the BP REST API, simply replace /buddypress/v1/members/me with /buddypress/v1 into the helloBPApiRequest()function of the above example.

Logging bpRestApiResponse will now give you all available endpoints, their corresponding transport methods and arguments for your community site (The ones of your active BuddyPress components) 😉

#5-0-0

BP Dev Chat Summary, September 4

5.0.0’s schedule

  1. Second beta release: September 10.
  2. First release candidate: ~ September 16.
  3. 5.0.0 release: ~ September 30.

Issues & Feedbacks about the first beta release

Some i18n issues appeared into the BP REST API code and have since been fixed by @espellcaste. @im4th will improve the bp.apiRequest JavaScript function before beta2 (#8131).

IAmTheWebb reported that he hasn’t noticed any regression issues but also informed us he hasn’t found the time to test the new features yet. The lack of ticket report is a bit worrying as it makes us wonder if the beta1 has actually been tested by BuddyPress plugin or theme developers 🤔.

@boonebgorges explained it wasn’t easy to test the BP REST API as it required building clients. Having the BP REST API documentation site available would probably help.

The BP REST API documentation site

@johnjamesjacoby & @netweb have been working on the developer.wordpress.org needed set-up to host the BP REST API documentation site. Although we are very confident they will soon fix #4601-meta, we decided to wait until September 20 before applying our backup plan.

In case we can’t make it on developer.wordpress.org @im4th will buy a specific domain name for the staging site we used to write the documentation and we’ll make this site widely available.

BuddyPress plugin & theme developers will be able to consult The BP REST API documentation before the 5.0.0 release 💯.

Hello BuddyPress modal

BuddyPress 3.0.0 introduced this modal to replace the Welcome Screen. We use it to inform about the new features introduced in the new major releases of BuddyPress.

@im4th shared a patch on #8132 to make this modal more inline with the WordPress Administration styles. @johnjamesjacoby shared his thoughts about it on the ticket and agreed during dev-chat that matching core’s modal would be best.

@im4th is 🇫🇷 so there are probably some english mistakes in the text parts of the patch. BuddyPress contributors : don’t hesitate to find and fix them 🙏

5.0.0-beta2

We decided to package a second beta next week to remind our contributors we need their help to test our contributions. Let’s not wait for the stable release to find bugs we could have avoided during the beta period!

Next dev-chat

It will happen on September 18th at 19:00 UTC in #BuddyPress slack channel, just before the release candidate.

PS: @dcavins couldn’t attend to the dev-chat but recently shared in our Slack channel he will soon publish an overview about the changes introduced by the BP Invitations API 👌.

#5-0-0