Tooling

BuddyPress integrates with a number of third-party services via Github that help us build a stable piece of software. To document what the project currently uses, I wanted to write a quick list:

  • Travis-CI
    • PHPUnit tests; Grunt build script test; code-coverage generation.
  • Codecov (new!)
    • Code coverage tracking.
  • Scrutinizer
    • Code standards review; PHPDoc review.
    • Scrutinizer is very tricky to configure well, so we’re still unconvinced if this is useful to us. Experimental.

Code coverage reports are new as of this week, and I look forward to using them to help us evaluate if new features we add have adequate test coverage.

#codeco-io, #scrutinizer, #tooling, #travis-ci

Nouveau – A BP Template Pack Story

Well a few further updates:)

Following on from our first introductory update The State of the BP Nouveau template pack we are happy to provide a little more insight into the ongoing development of this project.

Since that first update we have updated many files pushing some ~110 commits ~410 commits in total to date.

We have comprehensively re-factored and structured the directory layout and created many new include files. Styles are re-worked into a modular series of partial files representing two levels  – those that are called and compiled as the base styles and those that are unique to given TP & living in the TP directory.

The focus of the last couple of weeks has really been on template re-factoring, updating markup , improving semantics, adding or removing classes as required while working through screens updating styles. Updating visual styles also involves paying attention to  the structure and formatting of the files, looking at the nesting of rules (less depth allowed in lint rules) , attempting to ensure we have lighter files with selector specificity that’s lower and less troublesome to override and ultimately to hopefully compile css files that are a little smaller in kb.
Amongst other additions since last we wrote there have been:

  • Navigational user selected styles
    We now provide a vertical navigation selection for user object navs seen here

Nouveau Vertical Nav Menu

  • Additional styles for Navs or links exist too so we can have  a default subnav view or a tabbed look, the tabbed look  work as styles & classes  that can be dropped on most ul list links so we can use them on links such as the profile group links or the message screen links:tabbed-navsThese styles for tabbed navs work from classes to apply the styles in the same way the vertical navs function so in time we will add these to the customizer when we’ve worked out what elements benefit from the choices (apart from the obvious).

 

  • Messages gained a massive upgrade courtesy of @im4th as described in the last update further to this we have updated some of the markup for better semantics and tweaked the styling a bit for both the inbox messages listing & preview screen & single message thread views:

messages-inboxmessage-thread

  • All Nav elements in general have received a review and class tokens upgrade to try and make them a little more useful  and clear – gone is reference to ‘tabs’ unless they are specifically visually styled as such. Navs have had a round of default styling as a base line on which we can build out further styles and attention to some very simple screen widths so that we have something that will work for small mobile/tablet devices. small-screen-navs
  • On User screens we have looked at creating a more uniform approach and consistency to headings and simple explanatory text so for example on the user settings screens we have added headings and text to all screens so it’s clear exactly what your looking at, this process is replicated across all screens where required.

user-headings

  • Whats new textarea gets a tidy up of styles to compliment the work carried out by imath for both small and wide screen views.
  • General tables get a freshen up and font sizes managed for th/td cells.
  • BP Lists get attention for heading/meta font sizes & layouts for small / wide screens.
  • Update the Group Create steps screens, improves the markup and classes and pulls out the BP core steps navigation to include in nouveau template-tags file and adjusts markup.
  • Updates for mixins & scss variable files – improves color choices by variable reference, create more individual specific vars to allow changing of  more specific elements without changing all e.g $nav-hover: $dark-grey; allows $nav-hover to take a different color or var while another element can still use $dark-grey as set. Mixins get updates  for responsive text  to compliment the general font size mixin, this allows a value to be divided by a percentage on smaller breakpoints. New clearfix mixin allows clearfix rules to be added to an element fed as a param of the mixin. Add a variation of the messages box used in companion styles; this mixin allows backgrounds  and color to be passed to message element rulesets, authors can now override the defaults for border, background, color. Update our password strength warning colors for variable definitions rather than hardcoded hex.

Moving forward we have more templates to still run over and review for the best markup structure classes and of course a full and detailed review of accessibility improvements we can bring to our templates which @mercime will be tackling at a convenient moment.

@im4th is currently looking at the implementation of the template pack selector for core on this ticket :

https://buddypress.trac.wordpress.org/ticket/7157

As well as continuing to drive new and exciting functionality for bp-nouveau. (take a look at the proposal here for example: https://github.com/buddypress/next-template-packs/issues/64)

We encourage everyone to download and follow along with the development plugin, you can download from:

https://github.com/buddypress/next-template-packs/archive/master.zip

or of course checkout to your plugins local dev via git:

https://github.com/buddypress/next-template-packs.git

We have specific Template dev Chats on Thursdays @ 19:00 UTC on BP’s slack channel, please come along and provide feedback or simply follow along all and any participation is hugely welcome.

If you’re running the plugin and spot an issue or have an idea for an improvement then you can use BP’s issue tickets on the next-template-pack repo to report them:

https://github.com/buddypress/next-template-packs/issues

And last but not least please feel free to leave any comments or questions on this post and we’ll attempt to respond to them:)

 

Regards, the Template Pack Team.

 

Dev Chat Summaries for July 20 & 27, 2016

BuddyPress 2.6.2

  • Release date: TBA
  • There are currently 7 tickets in queue (3 closed. 4 open).
  • 404 errors when using HHVM on BP 2.6.1.1 (#7197) @rayisme has patch.
  • BP no longer filters wp_mail_from_name when using wp_mail() (#7024) @djpaulgibbs has patch. Might close this ticket.
  • @mentions break instagram oembeds if same username exists on site as instagram (#7084) needs patch.
  • Unit tests failing on PHP 7.0.9 (#7204) needs patch.

BP 2.7 Trac Tickets

Implement user capabilities for Activity component (#7176) @djpaulgibbs has patch. Feedback requested.

Groups: Draft, Locked or Suspended status (#6677) @dcavins has patch. Feedback requested.

Single items for the Blogs component (#6026) @im4th has patches. Feedback requested.

Hierarchical groups (#3961) @dcavins has patch. Feedback requested.

Components: BuddyPress.org Sites There are a number of tickets in Trac which need to be double-checked if the issues are still valid. If it is and you want to patch it up:
go svn co http://meta.svn.wordpress.org/sites/trunk/buddypress.org/,
create the patch, and upload the patch to the appropriate BP trac ticket.

Slack logs:
July 20: https://wordpress.slack.com/archives/buddypress/p1469041213000135
July 27: https://wordpress.slack.com/archives/buddypress/p1469646028000542

PHP 5.2, BP 2.8, and PHP support guidelines

 

After a discussion with the other project leaders, I’ve just posted guidelines for BP’s PHP version support policy. You can dig into that document for the gory details. For the purposes of this post, here’s a summary:

  • BuddyPress promises full support for all versions of PHP supported by the PHP team (currently, 5.6.x and 7.0.x), and strongly encourages that all sites run a supported version
  • BuddyPress supports certain legacy PHP versions, until the cost-benefit ratio for supporting a given version suggests that it should be dropped

Spelling out that second bullet point. At the beginning of each dev cycle, we’ll decide as a team whether to drop official support for any legacy versions for the following major version.

Currently, we’re starting the 2.7 dev cycle, which means we’re making decisions about 2.8. Here’s the decision:

BuddyPress 2.8 will require at least PHP 5.3.x.

Why now?

Thanks in part to coordination between the WordPress core team and web hosts, PHP 5.2.x use has declined significantly over the last few years. The wordpress.org stats page tells part of this story. Under the assumption that a good portion of PHP 5.2 sites are old and unmaintained (and thus, from a practical point of view, unaffected by BP updates), the wordpress.org team provided us with some more specific numbers. Here’s a recent PHP version breakdown for sites running a version of BuddyPress greater than 2.0:

Unknown - 1.08%
5.2     - 3.23%
5.3     - 12.92%
5.4     - 34.44%
5.5     - 22.38%
5.6     - 23.02%
7.0     - 2.92%

The number of sites affected by dropping support for 5.2 is quite low, well below the informal 5% threshold sometimes mentioned by members of the WordPress and BuddyPress teams.

Coupled with these numbers is the recognition that PHP 5.3 introduced features that have a meaningful effect on our ability to write a modern PHP application: namespaces, closures, guaranteed access to SPL, late static binding, and so on. As BuddyPress aims to build a major new feature – a REST API – it frees us up significantly to be able to take advantage of these and other features unavailable in PHP 5.2.

Security and best practices

Why are we not bumping requirements all the way to PHP 5.6, the oldest version still receiving security updates? As indicated by the numbers above, this change would mean forcefully obsolescing nearly three quarters of all BuddyPress sites. For many (most?) people running BuddyPress, updating PHP is emphatically not a simple task. As such, we would simply lose these users, or cause them to stay on old and unsupported versions of BuddyPress. We support WP’s ongoing, progressive efforts to work with webhosts to move sites off of old versions of PHP.

It’s likely that anyone reading this site is already running a modern version of PHP on their sites and their client sites. But just in case: you are encouraged in the strongest possible terms to run a supported version of PHP.

What comes next

We plan to make a few changes in BuddyPress that will smooth the transition and decrease the possibility of people nuking their sites. See #7195 and #7196 for more details.

In accordance with our WP…

In accordance with our WP compatibility policy, BuddyPress 2.7 will require WordPress 4.2. See https://buddypress.trac.wordpress.org/ticket/7194.

BP 2.7 Kickoff Meeting – July 13, 2016

Project Schedule

  • July 13, 2016 – Kickoff – scoping/wishlist
  • September 21, 2016 – Beta 1
  • October 5, 2016 – Release Candidate 1 (string freeze)
  • October 12, 2016 – Target release date for BuddyPress 2.7

Release Lead for BuddyPress 2.8

Slava Abakumov Slava Abakumov (twitter) has been translating BuddyPress to Russian since October 2008 (long before the very first beta) and has submitted many BuddyPress plugins to the WordPress repository. He is a doting father, developer, and project manager, who also enjoys road-cycling and roller-skating. His motto is “Be good, have fun, create things”.

Congratulations @slaffik!:)

BuddyPress Leads in the Windy City

Watch out Chicago! @johnjamesjacoby, @boonebgorges, and @djpaulgibbs will be spending some time together at an undisclosed location in the city this Monday, July 18.:)

Images of BuddyPress leads - John, Boone, and Paul.

bbPress 2.5.10

bbPress 2.5.10 was packaged and released by @johnjamesjacoby Wednesday, July 13. This was a security release so please upgrade if you haven’t already.

Navigation API in Codex

@boonebgorges has posted a new article about the new Navigation API. Check out all the examples to help you with customizations.

BP 2.7 Scoping/Wishlist

BLOGS

CORE

  • Accessibility fixes for BP Admin screens and templates @mercime
  • Widget for logged-in user Notifications used in wp-toolbar (#7183)

DOCUMENTATION

GROUPS

MEMBERS

REST API@boonebgorges and @rayisme

TEMPLATES

  • Extract & relocate core markup functions @hnla

TOOLBAR AND NOTIFICATIONS

Though not mentioned during dev chat, following are a few of many interesting tickets which you might like to contribute to or kibitz about:

  • Merge BuddyPress Followers into BuddyPress Core (#7133)
  • UI to pick Template Packs (#7157)
  • Admin UI options for all template features (#7160)
  • Add #hashtag auto-suggest (#7165)

Slack log: https://wordpress.slack.com/archives/buddypress/p1468436417003180
(Slack account is required)

#dev-chat

The state of the BP Nouveau Template Pack

On april 13 we had our first “Template Pack” chat. After 4 months of weekly meetings (on thursdays at 19:00 UTC), we thought it was time to share with you what we’ve accomplished so far.

3 years ago, the very first BuddyPress Template Pack – BP Legacy – was introduced in Totonno (1.7). It was a major improvement. Thanks to the BP Theme Compatibility, BuddyPress can use the template parts included in this Pack and inject them into the wide majority of WordPress themes. Site owners or theme designers can override these template parts to customize the appearance of community sites. And, for sure, they are doing it!

BP Legacy will remain the most compatible Template Pack BuddyPress ever made!

But after 3 years, we are feeling like it’s time we try to improve the user experience and optimize markup, Javascript, CSS, Ajax, etc.. And very quickly we all agreed that this couldn’t be done in BP Legacy without taking the risk to have an impact on all the possible overrides site owners or theme designers did and are still doing. History showed that unfortunately some of them are not necessarly taking the time to synchronise their customizations with the adjustments we sometimes have to do to our template parts…😦 .

Moving forward with BP “Nouveau”.

In french “Nouveau” means “new”. If you’re thinking i’m the one who had the idea to call a new Template Pack this way, you’re wrong :) @rayisme is the one! But i must admit i love this name!

In BP Nouveau, we’ve decided to follow these guidelines:

  • Modularity in CSS, Javascript and PHP.
  • Think forward instead of being afraid of breaking backward compatibility.
  • Build modern UIs by always taking advantage of the latest improvements WordPress or BuddyPress core are introducing.
  • Ease of customizations for site owners and at the same time advanced techniques for theme or plugin developers.

About this last point, the first drastic decision we’ve made was to remove all do_action hooks from template parts! Some of you might be surprised as these kinds of hook are ways to extend or customize. It appears that after 47 commits it actually gave birth to very interesting improvements:

  1. We first introduced new APIs such as the BP_Buttons_Group class. As you know BuddyPress uses a lot of buttons and in Legacy there are a lot of these hooks to let people add their own buttons. Thanks to this new API plugin/theme developers can choose the exact position where to output their buttons!
  2. Two new template hierarchies appeared (one for each single item object BuddyPress is using). For instance, it’s now possible to have a different activity stream layout for any member/member type or any group/group type.
  3. Template parts have been optimized. The huge groups/single/admin.php has been split so that we can now share some template parts between the Group’s create screens and the Group’s edit screen. The xProfile visibility is now a specific template part that is used by the xProfile edit screen and the signup screen. The WP Profile template we fallback on when xProfiles is not active stopped using old yim/aim/jabber fields in favor of a new loop using the wp_get_user_contact_methods() function so that potentially any new contact methods can be added. Finally The registration template has been completely revamped.
  4. New template tags have been created such as the one to generate standardized template notices and user feedbacks which can also contain “dismiss” buttons.

A BP Template Pack customizer panel.

Site owners will be able to customize their community and preview their changes thanks to the WordPress Customizer.  For instance, they can choose to use our default front pages for groups or members and they can choose between 4 layouts for the Members, Groups and Sites directory loops. Take a minute to discover this last feature in the following video.

They will also be able to reorder the Groups and Members primary navigations according to their preferences!

Improved UIs

First the notifications screens is now using Ajax and we’ve added a search functionality and the possibility to filter notifications by component actions. Of course we’ve kept the sort by date ordered DESC or ASC but it’s now located into the Date Received column header a bit like it’s the case in WordPress administration tables.

notifications

Then i invite you to watch this 3 minutes video to discover our new Group Invites and our new Private Messages UIs.

Finally we’ve started to work on a new extendable Activity Post form:)

Modularity

BP Nouveau is only loading what the BuddyPress setups it’s activated on needs. For instance if the Groups component is not active all the corresponding Javascript and PHP code won’t be loaded. SCSS files are now organized into modules.

Getting involved.

You want to help? You are very welcome. To ease our work we’ve packaged the template pack into a plugin we’ve named “next-template-packs”. It adds a new tab into the BuddyPress settings so that it’s easy to switch between BP Legacy and BP Nouveau. In a way it’s a possible interesting start for this core ticket (#7157). You’ll need the latest WordPress version and the latest BuddyPress version (trunk). Here’s the url of our github repository, we would be very pleased to receive some pull requests😉

Let’s build together the most customizable Template Pack BuddyPress ever made!

#template-pack

#id