[buddypress-trac] [BuddyPress Trac] #6290: Avatars, an extensible UI

buddypress-trac noreply at wordpress.org
Mon Mar 23 14:16:52 UTC 2015

#6290: Avatars, an extensible UI
 Reporter:  imath                   |       Owner:
     Type:  idea                    |      Status:  new
 Priority:  normal                  |   Milestone:  2.3
Component:  API - Avatars           |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |

Comment (by boonebgorges):

 Hey imath - I have had an initial look at the patch, and it looks great.

 Regarding bp-plupload.js: This strategy looks right to me. Yes, it's a
 shame that wp-plupload is not easier to extend, but it's better to
 reproduce code in BP than to resort to fragile hacks on core code.

 I love your system for overridable Backbone templates - much more elegant
 than WP's. I'd suggest that `bp-templates/bp-attachments` is not the right
 place for them - I would expect each subdirectory of `bp-templates` to be
 a template pack, which `bp-attachments` is not. Something like `bp-
 core/attachments/templates/` or `bp-core/templates/attachments/` seems
 better to me.

 The trick you're doing in `bp_attachments_get_plupload_l10n()` is very
 clever, but I think it's unwise. We can't depend on WP to maintain
 backward compatibility with these strings - or especially with the string
 handles when run through `wp_localize_script()`. It's a bit of extra work
 for translators, but these strings should just be included in BP.

 The l10n tricks in the AJAX callbacks will have to be improved as well.
 String concatenation of the `$message_part` variety will not work. My
 initial thought here is that each `BP_Attachment` extension - like
 `BP_Attachment_Avatar` - should register user feedback strings, and AJAX
 requests should use these feedback strings to build their return values.
 It's OK to have generic fallbacks, but they should be very general: "Could
 not upload file" or whatever (with no concatenation/sprintf).

 I have not looked over the Backbone stuff in detail, but in general the
 approach looks awesome to me. I especially like that you've made it fairly
 easy for new attachment plugins to inherit significant pieces of UI.

 I'm not posting my selfie because the computer I'm currently on has all
 webcams disabled </tinfoilhat> :)

 Thanks for your work on this! I agree with slaFFik that this is huge.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6290#comment:15>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list