[buddypress-trac] [BuddyPress Trac] #3653: Clicking on "All Members" tab not working after a search.

buddypress-trac noreply at wordpress.org
Fri Sep 30 13:09:36 UTC 2016

#3653: Clicking on "All Members" tab not working after a search.
 Reporter:  gingram815               |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Members                  |     Version:  1.5
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |
Changes (by lakrisgubben):

 * cc: alexander.berthelsen@… (added)


 This was a tricky one. ;)

 I think that only half of this problem still exists, if you have a search
 in your querystring and then click on all members the search won't be
 passed through to that tab switching (since
 legacy/js/buddypress.js#L897 will set search_term to an empty string
 because the searchbox input'll be empty) . But if you do the search by
 typing in the search box it'll be passed through to the tab switching.

 It seems to me that the current behaviour for when you've manually typed a
 search, i.e. If you've searched for something and then click on all
 members the search is passed through to the ajax request for all members
 (so that the request is actually "all members/my friends that also match
 the search") is the intended behaviour. At least looking at the code in
 legacy/js/buddypress.js#L897 which passes the value of the search field
 along to the ajax handler for the tab switching. I find this kind of
 intuitive since the search box lives above the tabs, the tabs are kind of
 a way to filter the search even more... But I agree that it's not totally
 obvious that this is the case.

 Another problem is that if you've come to the members listing with a
 search in the querystring, i.e. /members/?members_search=search that'll at
 first load the page with that search, but if you switch tabs the search
 doesn't follow along since it's only added as a placeholder to the
 searchbox, not as the value (and to make things even more confusing, if
 you go to /members/?s=search it'll also do a search, but not add a
 placeholder) which makes for a kind of disjointed experience since it
 differs depending on if you've typed the search manually or made the
 search by following a link. This could easily be fixed by adding the value
 of the members_search querystring to the searchbox as a value instead of a
 placeholder. It wouldn't fix the use of ?s= as querystring but at least
 would make it a bit more coherent.

 The big point here I think is deciding on if the search should be passed
 through to the tab switching, but in the meantime might be worth to just
 add the value of the query string to the searchbox input field (i.e.
 legacy/buddypress/common/search/dir-search-form.php) so that they at least
 behave in a coherent way... If that'd be interesting I'd be happy to make
 a patch for it. :)

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

More information about the buddypress-trac mailing list