[buddypress-trac] [BuddyPress] #5051: Ajax pagination should be less markup-dependent (was: Ajax pagination)

buddypress-trac noreply at wordpress.org
Fri Jun 21 18:27:17 UTC 2013


#5051: Ajax pagination should be less markup-dependent
-------------------------+-----------------------------
 Reporter:  henrywright  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Core         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+-----------------------------
Changes (by boonebgorges):

 * milestone:  Awaiting Review => Future Release


Comment:

 There are probably a few specific things we can do to make the AJAX a bit
 more independent of the markup - for instance, I see some places where
 we're doing `parent().parent()` etc to figure out the current content
 type. However, we can never really make it markup-independent. For one
 thing, we're fetching the entire template content, which means we have to
 have a reliable parent element whose `.html()` we can swap out. For
 another, we're forced to use event delegation for pagination (for a couple
 different reasons), which means that we have to specify CSS selectors both
 for the parent element ('#buddypress', in the case of bp-legacy) and the
 target elements (such as the pagination elements).

 Making the situation even more complicated is that if we made some of the
 necessary changes (such as adding relevant selectors to the pagination
 links themselves, rather than doing `.parent()` traversal; see
 buddypress.js line 739), we're likely to break existing themes that are
 using our JS but overriding the directory templates with their own markup.

 All that said, I have a couple ideas about how this might be done, but in
 the meantime patches are very welcome.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5051#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list