General Summary as of May 17, 2017

This post covers the BuddyPress Dev Chats for May 3, 10, and 17. Information has been updated to current status.

bp-nouveau

A friendly reminder from @hnla re testing and patches for bp-nouveau.

@hnla has committed styling updates, concentrated on some issue areas with what’s new update form and user screens, in particular messaging and the bulk action filters & search form elements, hacking away at the Backbone templates to bring the markup into line with the general selector and search form visual styles & updating the JS show/hide events to work with classes rather than jQuery .hide().

@hnla: “The what’s new form could still do with some further attention on the general show/hide nature of its control actions, I removed some earlier styles & tidied up the new autocomplete input where `post in groups` is selected, however we currently have no onBlur event to hide the controls so anyone that fancies delving into backbone could help out looking at what we could do to add some fun to the what’s new form. At this stage We have clean code supporting this feature, pretty much a blank canvas for playing around with effects that might look good rather than our rather staid `onfocus` open.”

@r-a-y reviewed bp-nouveau. Fixed issues for loading Ajax on component request and updated actions now they’re button elements, comments counts, notice errors, and set up the `buddypress-wrap` class dynamically.

@netweb has kept on top of the tooling for the project, updating the style-lint config modules, updating grunt file and fixed linting issues.

@mercime has been working on #130 where consensus during dev chat was to use option 2 for the implementation.

@dcavins was added to the sitewide notices ticket #137.

At this stage we need more devs taking tickets/project cards and moving into In Progress column.

Trac Tickets

Include BP Edit Group Slug into the core (#6014) @dcavins has committed patch to trunk.

Messages: member page messages are queried for the loggedin user (#7096) @dcavins has refreshed patch. @r-a-y and @Offereins have provided feedback.

Remove/Replace `title` attributes with Tooltips usable in all devices (#7188) @mercime has examples in ticket. The choice was the second example, though  @dcavins is making a case for the third example.

Only load component action and screen code when we’re on the component’s page (#7218) @r-a-y has patch.

Use JOIN rather than Subquery on user search (#7442) @brandonliles has patch. Needs dev feedback.

Resize member avatar error with cyrillic (not latin) filename (#7484) @r-a-y has patch which relies on newer PHP functions (v5.4). It’s either that or wait for WP core to fix #WP22363 #WP24661 #WP15955. Dev feedback requested.

bp_group_has_members performs unnecessary query (#7513) @r-a-y has patch. Dev feedback requested before committing.

BuddyPress Case Studies

Thanks to all who have shared their BuddyPress use cases with the community! The growing list of published articles are available in the BuddyPress Codex for your reference. If you’re interested in sharing your own BuddyPress use case, fill up this form and we’ll get back to you ASAP.

Slack logs:
May 3: https://wordpress.slack.com/archives/C02RQBYUG/p1493838015001913
May 10: https://wordpress.slack.com/archives/C02RQBYUG/p1494442868540761
May 17: https://wordpress.slack.com/archives/C02RQBYUG/p1495047787891614
(A WordPress Slack account is required to view the logs.)

#dev-chat

A Community for Organising Sweden’s Largest Environmental NGO

Alexander Berthelsen shares his case study of the development journey through the years for Naturkontakt, Sweden’s Largest Environmental NGO, at https://buddypress.org/2017/05/naturkontakt-organising-swedens-largest-environmental-ngo/

#case-study, #developers

Largest Turkish Recipe Site Spiced Up with BuddyPress

Mustafa Uysal (Twitter: m_uysl) of Nefisyemektarifleri.com shares how they scale their BuddyPress site with ~2.2 Million users at https://buddypress.org/2017/05/largest-turkish-recipe-site-spiced-up-with-buddypress/

#case-study, #developers

Total Wellness Challenge: Fitness with BuddyPress

Tara Claeys (Twitter: design_tlc) of Design TLC, LLC kicks off our new series of BuddyPress case studies from Developers and Site Builders. Read all about it at Total Wellness Challenge: Fitness with BuddyPress

#case-study, #developers

Dev Chat Summaries for April 19 & 26, 2017

BuddyPress 2.9

  • June 7 – Beta 1
  • June 14 – Beta 2
  • June 28 – Release Candidate 1
  • July 5 – BP 2.9.0 Release Date
  • There are currently 45 tickets slated for this release (19 closed, 26 open).

bp-nouveau

@hnla updates:

  • @mercime and I have been tackling various tasks including a11y aspects for form elements.
  • Made adjustments to the message displays to improve those adding icons as separate child elements rather than hooking to the parent element to be able to hide using aria roles.
  • New buddypress-wrap class added to the main wrapper so we don’t use the same class for body as we do the inner div.
  • Improving the ease of updating search & filter wrapping elements extracting to one include file so we only need to work in three files for all elements.
  • Created a new function to manage group descriptions excerpts to change $length values if the list display is set as grid boxes, which was required to effect an equal height-ish box.
  • Improved group grid layouts to improve those for min-heights and general breakpoints.
  • Refactored action elements in list layout views for better positioning & flow, removing absolute positioning in favor of stacking to the left on larger screens.
  • General refining of elements such as title sizes, metadata, and displays. A little attention was given to single screen subnavs to try and define them better visually at small/mobile screen layouts.
  • Travis CI is now up and running for bp-nouveau. Thanks @netweb. to the project

BP Trac Tickets

Only load component action and screen code when we’re on the component’s page (#7218) @r-a-y has refreshed patch. Requests opinion on the approaches taken before proceeding.

friends_add_friend() should convert accepted arguments (#7506) @r-a-y has committed fix to trunk.

Add identifying tag parameter to bp_has_*() loop arguments. (#7503) @dcavins requested dev feedback.

When user is not logged, if he/she clicks email link to view new messages gets 404 page when should get login page (#7349) @r-a-y has committed fixes for redirection issues and improving UX. Has refreshed patch after commits. Dev feedback requested.

Use stylelint to lint SCSS & CSS replacing Ruby Gem `scss_lint` (#7028) @hnla follows up with @netweb. We need to get this in early in dev cycle to test.

Move asset template parts away from bp-legacy (#7116) @r-a-y’s proposal only applies to core functionality like emails, embed, and attachments.

bp_group_has_members performs unnecessary query (#7513) @dcavins has patch for dev feedback.

JS Enqueued On Non-BuddyPress Admin Pages (#7512) @r-a-y has looked into issue posted by @kstover and requested more information since BP’s caret.js is enqueued correctly on admin pages.

Resize member avatar error with cyrillic (not latin) filename (#7484) @r-a-y has patch for dev feedback.

Fix for profile image upload on Microsoft Edge breaks iOS Safari and Chrome (#7416) @r-a-y has patch. Needs a Mac user to test.

Take advantage of BP_Groups_Group magic methods in groups component setup (#7416) @dcavins has patch. Ready to commit. Dev feedback requested.

BP_PHPMailer needs to set the `Date` header (#7509) @r-a-y has committed fix to trunk.

Test depends on PHP EXIF support; should fail more gracefully when absent (#7432) @r-a-y has committed fix to trunk.

{{user.site_url}} token not using HTTPS when site is on SSL (#7508) @r-a-y has committed fix to trunk.

BP Use Cases from BP Developers/Site Builders

@mercime announced that guest posts from BP Developers/Site Builders will be published soon at BuddyPress.org. The first batch of informative and interesting case studies have been submitted by developers who signed up during the BuddyPress 2016 Survey.

Slack logs:
April 19: https://wordpress.slack.com/archives/C02RQBYUG/p1492628459684302
April 26: https://wordpress.slack.com/archives/C02RQBYUG/p1493233250835528

#dev-chat

Dev Chat Summaries for April 5 & 12, 2017

bp-nouveau template pack

@hnla reported on the bug and a11y fixes made on bp-nouveau to date. He has added a temporary Gruntfile.js, primarily for compiling and linting Sass files, as well as other project-specific configuration files. @mercime will be posting solutions in codepen for removing placeholders from form controls.

Many thanks to @boonebgorges for delving deeply into bp-nouveau and his post introducing the new template pack.

BP REST API

@rayisme has started work on the /members endpoint for the BP REST API locally. He raised a question at the Github repo re Members – GET – List Users Schema. @modemlooper has responded in ticket.

@rayisme noted, “We’ll definitely have the /members endpoint ready by the time BP 2.9 is done, but probably will not be merged into core. The BP REST API will stay as a plugin for at least the next few release cycles until things have been fleshed out, similar to how the WP REST API was a plugin for awhile.”

Trac Tickets

Allow bp_get_group_permalink() to produce HTML links (#7485) @dcavins has committed fix to trunk.

Update bp_group_description_excerpt() to accept a $length param (#7493) @hnla has patch. @dcavins has responded to keep the group as the first parameter.

Required xprofile fields are not validated (#7483) @hnla has confirmed issue reported in ticket. Needs patch.

groups_send_invites() should allow us to omit sending to users that have already received an invite (#7397) @rayisme will be refreshing the patch for BP 2.9.

Include BP Edit Group Slug into the core (#6014) @dcavins refreshed the patch including unit tests. New patch adds support for changing group slug via wp-admin. Dev feedback requested.

Take advantage of BP_Groups_Group magic methods in groups component setup (#7494) @dcavins has patch. Dev feedback requested.

Use JOIN rather than Subquery on user search (#7442) @brandonliles has patch. Dev feedback requested.

Harmful bp_activity indexes (#7500) @johnjamesjacoby in discussion with @brandonliles.

Deprecate the BuddyPress functions for bbPress 1.x forums (#6851) @johnjamesjacoby introduced a motion to “remove bp-forums pretty much completely, or relegate it to its own compatibility plugin like we did Wire and Status.”
@boonebgorges concurred with the compat plugin route and noted, “I’d like to stage it over maybe two releases, with large warnings in the interim release if you are running legacy forums. Maybe even block upgrade to the removing-version if we detect you are running it (like we did with the 5.3 requirement). How many of them will upgrade to BP 3.0 or 3.1, that’s another question. But it’s easy enough for us to create barriers to white screens, so we should do so.” @johnjamesjacoby: “Making this release ideal for the warning. I think the 3.0.0 release is a nice round number to cut the old legacy forum cord, too.” @boonebgorges: “So admin notices + upgrade-blocks for 2.9, and maybe some logic in 3.0 that prevents loading the full plugin if the compat plugin is not found. Someone will need to wrangle all of the necessary steps, including preparing and releasing the compat plugin.”
@johnjamesjacoby has volunteered for the tasks, “the pleasure of the pain will all be mine.”

Create administration sections for every component that’s currently lacking an interface

@johnjamesjacoby: Friends, Messages, and Notifications basically. “Preferably, I’d like to also stagger the work on those, so the expectation isn’t to have a 100% fully covered and integrated interface that covers all users and use-cases. Similar to Groups Admin (how you can’t create a new group from within wp-admin). I really also want a live-chat style Messages UI while you’re in wp-admin”
@boonebgorges: “Big +1 to more admin coverage, though we should think carefully about whether each of these BP components needs its own top-level item. (Friends may be properly a property of Users, rather than its own thing, or whatever).”
@johnjamesjacoby: “Right now, all of BuddyPress makes theme-side websites better, and that’s awesome, and it should, and always will. But once you enter wp-admin, BuddyPress doesn’t actually help WordPress itself be a better piece of software for managing users, community content, etc. We don’t need to talk about all of the detail-work right now, but I wanted to drop that vision in here now, so everyone has an idea of what I’m thinking, and we can maybe try to hit that vision hard in 3.0 and beyond. Hopefully 2.9 and Nouveau and everything else will keep the traditional BuddyPress installation type satisfied for a few years, enough time to work on REST API, wp-admin integration, maybe some GraphQL if we like that, etc.”

BP Theme Compatibility

A basic visualization of the BuddyPress Theme Compat is now available for bp-templates/bp-legacy. Use Ctl/Cmd +/- to zoom in/out, scroll up/down or click + drag right/left to navigate. Visualizations for bbPress Theme Compat and the upcoming bp-nouveau template pack are also in the works.

Slack logs:
https://wordpress.slack.com/archives/C02RQBYUG/p1491418861341587
https://wordpress.slack.com/archives/C02RQBYUG/p1492023677928317
(Slack account is required)

#dev-chat

Bonjour, Nouveau – An introduction to the next template packs

The bp-nouveau team has spent more than a year working on the new template pack. As someone who hasn’t been deeply involved in the project, I wasn’t sure how to get the kind of high-level view needed to assess why a new template pack – and Nouveau in particular – is needed. So I figured I’d do some research and write up my findings, in the form of a pitch: Here are the problems that Nouveau aims to solve, and here’s how it solves them. With Hugo’s help, I’ve done just that. I hope this’ll be a helpful tool for the larger BP community to understand and to get excited about Nouveau.

 

The state of BuddyPress templating

One of the marquee features of BuddyPress 1.2 (alongside the Activity component and single-WP support!) was the new BuddyPress Default theme. The year was 2010, a time fondly recalled by lovers of jQuery-powered animations and background gradients. BuddyPress 1.7, released in 2013, boasted theme compatibility: headers, footers, and other boilerplate was to be provided by regular WordPress themes, while BP-specific markup was provided by a set of templates bundled with BuddyPress. The templates were called bp-legacy, indicating that they were derived about 90% from the older bp-default, and with a nod toward a future where bp-legacy was, in fact, relegated to legacy status.

That future has arrived more slowly than one might have hoped. Designing and building a new set of templates that’s worth shipping means revisiting BuddyPress with a fresh set of eyes – from the perspective of both users and developers. Given what we know about the social web in 2017, and given the nature of the sites that we know are built using BuddyPress, how best can we present BP-generated content like groups and profiles? Given the last seven years’ experience customizing and maintaining BP-powered sites, what have we learned about the features of template markup, CSS, and JavaScript that strike a balance between simplicity and ease of customization?

 

Bienvenue Nouveau

The BP Nouveau project attempts to address this problem with a new template pack meant to replay bp-legacy as the new default for BuddyPress installations. Nouveau has been written from scratch, to reflect modern aesthetics and conventions. Let’s look at some notable features of Nouveau, and the thought behind them.

Developer-facing and technical improvements

  1. Modular, modern JavaScript

    The problem: bp-legacy’s monster global.js file determines nearly all front-end functionality for BuddyPress. The single file makes it extremely difficult to override or modify individual bits of functionality. And the code itself is the result of 7+ years of accreted jQuery-based spaghetti, which has proved to be somewhat fragile and difficult to maintain.Nouveau’s solution:

    1. The theme JS has been completely rewritten. Component-specific functionality is split into separate files: https://github.com/buddypress/next-template-packs/tree/master/bp-templates/bp-nouveau/js
    2. Nouveau heavily leverages Underscore.js and Backbone. Backbone, which is designed to work with data collections, is a natural match for BP interfaces like the activity stream and the message inbox. These libraries are widely used in the WordPress Dashboard, making the technology familiar to WP developers.
  2. Markup built for the contemporary web

    The problem: Most of bp-legacy’s markup predates the conventions of modern site building. HTML5 conventions and accessibility features have been tacked on rather than part of the initial design. Conventions like CSS selectors have not been consistent through the history of the project, causing conflicts with other applications.Nouveau’s solution:

    1. Markup has been rewritten to conform to semantic best practices, including proper element and selector use.
    2. Accessibility and compatibility with modern/mobile browsers is taken into account.
    3. Naming conventions are more consistent across templates.
  3. More minimal styling for better theme compatibility

    The problem: When bp-legacy was first conceived, it inherited all the highly opinionated styles of bp-default. Through a concerted effort, bp-legacy themes were “anonymized” over the course of several releases, so that fonts, form styling, and other conventions would be inherited from the WP theme. But the nature of bp-legacy’s markup and styles meant that a significant amount of additional styling was needed to fit nicely into WordPress’s default Twenty themes.Nouveau’s solution: The improved markup and styling has been written with an eye to universality. Elements are designed in such a way that they more elegantly inherit styles from the theme. This reduces the need for custom stylesheets when embedding in an existing theme, and reduces – or perhaps eliminates – the footprint of “companion stylesheets” in BuddyPress itself.

  4. More consistent and flexible PHP template functions

    The bp-legacy templates have evolved numerous techniques for adding navigation and action items that are often clever but also quite inconsistent. Some elements are invoked from directly within templates, while others are added via action hook. Some template functions make hard assumptions about the output, while others offer flexible parameters.Nouveau attempts to smooth these differences by introducing new template functions aimed at providing the greatest amount of flexibility for theme developers. Functions like bp_nouveau_activity_entry_buttons() and bp_nouveau_activity_comment_buttons() have rich function signatures and robust filters to allow for maximal control over these types of elements.

 

User-facing and front-end improvements

  1. Customizer compatibility

    The problem: bp-legacy predates the Customizer, so that any theme modifications had to be hardcoded in child themes, requiring a WP developer – or at least CSS knowledge – to make minor modifications.Nouveau’s solution: The behavior of a Nouveau-powered site can be modified extensively via the Customizer, including group/member front pages, the order of nav items, and one/two column layout selection. The integration provides a framework for more extensive Customizer functionality in future versions of BuddyPress.

    Screenshot_2017-04-05_11-13-30.png

  2. Better differentiation of content types

    The problem: bp-default and bp-legacy used mostly identical markup, styling, and design for different content types. Group directories and profiles looked exactly like member directories and profiles, and so on. This similarity leads to a tendency for confusion when new users approach BP, and it makes BP-powered sites feel less engaging and exciting by blending together fundamentally dissimilar types of content.Nouveau’s solution: Using the Customizer, site admins can select between various built-in layouts for content directories. For example, group directories might be distinguished from member directories by the former to a two-column layout but the latter to one-column.

  3. A rethought Messages component

    The problem: bp-default’s Messages interface felt like an afterthought, a tool for sending private messages that is somewhat slow and difficult to use.Nouveau’s solution: The Messages interface has been totally redesigned, leveraging Backbone and other JS technologies to feel more like a fast, highly responsive single-page app.

    Screenshot_2017-04-05_11-31-14.png

The future of Nouveau and bp-legacy

The current proposal is to merge Nouveau into BuddyPress. New installations of BP will have Nouveau activated by default. Upgrading installations of BP upgrading to will keep bp-legacy. A new admin tab will provide site admins with a UI for toggling between the two template packs.

Bp-legacy will continue to be actively maintained for at least a few more major releases. At some point in the upcoming six months, we’ll come up with a phased deprecation plan, describing a set of dates when bp-legacy will no longer receive new features, will no longer receive minor bug fixes, and so on.

#bp-nouveau