Feature #2178
closedShow More Link at bottom of Who's Online Homepage list
Added by Matt Gold about 12 years ago. Updated about 11 years ago.
0%
Description
As the Commons becomes more popular, I'm seeing our list of recently active members on the home page reach capacity pretty often. My understanding of that section of the page is that it shows the 15 most recently active members. The problem is that the limit of 15 members in the listing may suggest that there were fewer people recently online than there actually were.
One solution (and Chris may have others) is to put a "see more" link at the bottom right corner. Please see the attached annotated screenshot for where that could go. Happy to entertain other ideas.
Files
cac-whos-online.png (485 KB) cac-whos-online.png | Matt Gold, 2012-10-11 11:38 AM | ||
whos-online-count.png (178 KB) whos-online-count.png | Dominic Giglio, 2013-07-01 02:34 PM | ||
Screen Shot 2013-07-11 at 5.22.44 PM.png (169 KB) Screen Shot 2013-07-11 at 5.22.44 PM.png | Dominic Giglio, 2013-07-11 05:29 PM | ||
Screen Shot 2013-08-23 at 4.01.02 PM.png (109 KB) Screen Shot 2013-08-23 at 4.01.02 PM.png | Matt Gold, 2013-08-23 04:01 PM |
Updated by Matt Gold about 12 years ago
- File cac-whos-online.png cac-whos-online.png added
forgot to attach the screenshot . . ..
Updated by Chris Stein about 12 years ago
That sounds good to me. When they click the link to you envision a separate page with all online people or to just do some JavaScript stuff and show more people on the same page?
Depending on how we do it we also need to think out the logic. If we are showing more on the same page we probably want to show in fixed increments that leave full rows.
I forget what test we use to determine who is online (tangent: is this a variable we want to expose to admins in cbox?) but if it is a hard line (like people who have logged in in the past 1hr) then we could also show the current number of people online and we could also just have the link be "show all" If it is fuzzy (like it just shows the last 20 people who have logged in), then there is no number and "show more" is more appropriate.
In terms placement, if we do "show more" then a link at bottom feels right. But it does present a design challenge as there isn't much room there. If we do "show all" then we could put the link on the top right across from "who's online" and maybe have something like
45 people online, show all
Or
Showing 20 of 45 people online, show all
Where "show all" is a link.
Another thought, if we show on the current page through JS then the link should also be added through JS.
Just had some thime to throw out some thoughts, not enough to edit them.
Updated by Boone Gorges about 12 years ago
Can't we just link to the Members directory, which is ordered by Last Active? (That's all "Online" is - active within the last 15 minutes or something like that.)
Updated by Chris Stein about 12 years ago
Sure, that's a valid option. I guess the question is whether we want to make an effort to better quantify and show "who's online". The members directory does show the time since members were last active and order them by that. But it doesn't make it easy to get a quick idea of who's online right now (which of course is an arbitrary number based on whatever time interval we choose).
I'm not sure at this time, with the current features in place, that it matters a great deal to our users who's online right now. If we develop some form of synchronous communication then we will need something that can better show who's online right now and which of your friends are online right now.
If this ticket is mostly about letting people know on the homepage a rough idea of how many people are currently using the site, then I think some text like "showing 15 of 30 members online, view all members", where "view all members" is a link to the members page is fine.
The Members list on the home page under Who's Online is essentially the same list. We may use this ticket to also consider whether to default that list to be ordered by Newest instead of Active so it shows different information at first.
If we want to make things more dynamic we could also add some JavaScript to constantly update the Who's Online list (right now you have to refresh the page to see an updated version). Not sure on the cost/benefit ratio on that one.
On a slight tangent, I'm going to open a ticket about changing the word "People" in the main nav to "Members". We use the word members everywhere except the main nav.
Updated by Matt Gold about 12 years ago
FWIW, I was originally thinking of linking to the member directory, but Chris brings up an interesting possibility.
Updated by Brian Foote about 12 years ago
Couldn't we just make the icons a little smaller and fit in two or three more per section at the bottom of each member column?
Updated by Brian Foote about 12 years ago
On second thought I actually hate my own idea. As you were...
Updated by Boone Gorges about 12 years ago
- Priority name changed from Normal to Low
- Severity changed from Normal to Low impact
Agreed that this is not likely to have a big impact for anyone, so I'd like to go with the easy version if possible, unless Chris you would like to have a shot at writing it :)
Updated by Matt Gold about 12 years ago
Don't mean to quibble, but I would characterize any change to the way our homepage works as at least "Normal" impact, and probably "High Impact"
Having said that, I'm all for going with the easy solution for now and thinking about other ones at a later point.
Updated by Boone Gorges about 12 years ago
Don't mean to quibble, but I would characterize any change to the way our homepage works as at least "Normal" impact, and probably "High Impact"
Disagree. This is something that few people will notice, and for those who do notice, it probably won't really affect their experience of the site in any appreciable way. That's not to say I can't think of reasons why it might be valuable to do something like this, just that, in the grand scheme of things, it will affect a very small percentage of the interactions that people have with the site, which I take as the definition of "low impact".
Updated by Matt Gold about 12 years ago
- Severity changed from Low impact to Normal
Well, I disagree with your disagreement! This is something that almost all visitors to the Commons will see, which I take as the definition of "high impact." In the interest of a peaceable kingdom, though, let's split the difference and call it "Normal."
Updated by Chris Stein about 12 years ago
With the site severity situation settled and attempts at alliterative humor aside, I'm ok with doing the simplest solution for now and we can look back on the other ideas if and when we add some features that would make more precise who's online info valuable to our people. And thanks for the offer Boone, maybe not this time but someday...
Updated by Boone Gorges almost 12 years ago
- Assignee changed from Chris Stein to Dominic Giglio
- Estimated time set to 0.50 h
Updated by Micki Kaufman over 11 years ago
Hi Dom: we're going to try to include this in the upcoming major release - can you please implement the 'see more' link on CDEV? Thanks!
Updated by Dominic Giglio over 11 years ago
I'll move this up my to do list and get a branch over to CDEV for testing as soon as I can.
Updated by Dominic Giglio over 11 years ago
- File whos-online-count.png whos-online-count.png added
Boone,
I've added the simple solution discussed above in this ticket to the CAC_BP_Whos_Online_Widget->widget()
function in the bp-nelo functions.php
file on line 167.
I've added it to the master branch because this is a 1.5 feature (I hope that was the right thing to do).
I "think" this should work as a first solution. I'm only concerned about the call to $members_template->total_member_count
. I don't have any way to login more than 15 members in my local env so I couldn't verify that was the correct attribute to use. Lets take a look on CDEV the next time you pull master on that install, or go ahead and change it to something else if you know of a better/cleaner way.
I've also attached a screenshot of my local env so everyone else can take a look and let me know what they think.
Commit: https://github.com/castiron/cac/commit/4044d553e0dd0538ccb533b9eec46ec774af7a94
Updated by Matt Gold over 11 years ago
Is there any way of including it at the bottom right corner of the gray Who's Online box, or would that be a lot more complicated? Please see my original screenshot annotation above for suggested placement
I'm also thinking that we don't need to see that "more members" link there unless there are more members online than can be displayed in the "Who's Online" box. I'm not sure what the limit is , but I think it's 15). If having it appear conditionally only when that many people are online would work, let's try that
Updated by Matt Gold over 11 years ago
Oh -- and thanks for your work on this, Dom.
Updated by Dominic Giglio over 11 years ago
I don't think it'll be a problem to move it down to the bottom corner. I'll mess around with it right now to see if it ends up being more difficult than I anticipate. And yes, you're correct. Our current limit is 15 members in that widget. The conditional display should also be simple; one if()
statement should do the trick.
Updated by Matt Gold over 11 years ago
Also: adding Chris in case he has any feedback
Updated by Boone Gorges over 11 years ago
Hey Dom - The strategy here looks good.
I wonder how useful the "showing x of y" text is. y will refer to the total number of users that BP defines as "Online" (those active in the last 15 minutes, I think). But then, when you click through to the Members directory, you'll see a list of all members - a number much larger than 7. My inclination is just to do this:
<?php if ( $members_template->total_member_count > 15 ) : ?> <a href="<?php bp_root_domain() ?>/members">View all members →</a> <?php endif; ?>
But I don't feel strongly about it.
Updated by Matt Gold over 11 years ago
I agree that it's best not to show "x of y" numbers because they could be mistakenly understood to refer to total membership numbers rather than recently active.
Updated by Dominic Giglio over 11 years ago
That's funny that you both bring these points up. Boone, I've already changed the code in my local env to almost exactly what you wrote above. Matt, I was also wondering about the possibility of misunderstanding. I will play around with different/simpler/clearer wording.
Updated by Chris Stein over 11 years ago
Sorry to chime in late. I agree that x of y is unnecessary as it's a somewhat arbitrary number based on last activity anyway. "view all members" works for me as does "view more members." The second one implies there are more people online which is what the goal was.
Is it possible to force the members page to organize the order by Last Active when they visit? I think right now it uses whatever the last ordering was by the user if they're logged in. I'm not sure what the default ordering is but it seems to be alphabetical (there's an oddity there I'll submit a ticket for).
Updated by Dominic Giglio over 11 years ago
Hey Chris,
Thanks for the feedback. It appears to not matter whether I'm logged in or not, or if I change the "Order By:" dropdown on the Members page - it always defaults to Last Active. I'm not sure if this is a setting somewhere or a BP default though.
Updated by Chris Stein over 11 years ago
Hmm, that's interesting you had that experience. I've found that if I sort it, then leave the page and come back it stays in the last sort order. I just tried it again and that was my experience.
Updated by Dominic Giglio over 11 years ago
OK,
First, Chris: I tried viewing the members page and changing the Order By: dropdown. Each time I change the ordering and refresh the same ordering comes back. I'm not sure why we're seeing different results.
Boone, Matt, I've tried to incorporate all suggestions. I am using the text Chris suggested for the link (view more members ->). I agree that it makes more sense in this situation. We are linking to more members because the widget cannot display them all. I've moved the link down to the right corner as you originally requested. I had a slew of problems getting it to float over there though. I am used to working in my personal projects which either Bootstrap or HTML5Boilerplate which provide a .clearfix
class to make working with floats dead simple. I ended up having to add that little bit of css to our custom.css file, otherwise the online widget div kept breaking right at the float which wouldn't have been a problem except it broke right at the grey background, causing a visual/visible problem. This shouldn't affect anything else since the only way it'll be used is by adding the 'clearfix' class to an element. Boone, let me know if there is a reason for me to remove this new code and I'll find a different way to accomplish it.
I've attached a screenshot so you can all see how it looks in my local env. I've pushed all the updated code to master so we can check it out on CDEV.
Boone, I went with almost exactly the code you posted above:
<?php if ( $members_template->total_member_count > $instance['max_members'] ) : ?> <div class="clearfix"> <p id="whos_online_count" class="alignright" style="margin: 15px 15px 0 0"> <a href="<?php bp_root_domain() ?>/members">view more members →</a> </p> </div> <?php endif ?>
I went with > $instance['max_members']
instead of hard coding the 15 so we can change the number in the widget admin without worrying about this new feature breaking.
As usual, let me know what you think or if something needs to be altered/improved.
Updated by Dominic Giglio over 11 years ago
Thanks Boone. Should we lower the limit on CDEV and have a couple people login so we can test it there? I could always lower it now and we could look at it / test it later. Let me know.
Updated by Boone Gorges over 11 years ago
- Status changed from Assigned to Resolved
I'm pretty happy with the way this turned out, and it's a bit late to be messing with it on cdev (my bad), so let's go with it and iterate if necessary. Thanks for your work on it, Dom.
Updated by Dominic Giglio over 11 years ago
Good I'm glad, it turned out to be a simple solution. Which is always nice because it leaves room for iterations if we decide further features are needed. I'm fine with closing this.
Updated by Matt Gold about 11 years ago
Looks like this may not have been activated in the new release.
Updated by Boone Gorges about 11 years ago
- Status changed from Resolved to Assigned
- Target version changed from 1.5 to 1.5.1
For some reason the total_member_count for the front-page query is returning 2 instead of 15+. Needs more investigation.
Updated by Dominic Giglio about 11 years ago
Since I wrote this, I'll look into why it's not working as expected.
Updated by Dominic Giglio about 11 years ago
Boone, I think I fixed the code that was causing the problem. In short, it was not passing the truthiness test to display the "view more members" link.
I basically added an accumulator variable in the while bp_members()
loop so that I could check the total number of online users according to the widget. Now I'm checking to see if it == the instance['max_members']
number and only display if it does (which would mean we are at or above the maximum number of users set in the widget admin). This should fix the problem.
Commit: https://github.com/castiron/cac/commit/6f377683c340b0f02227b7b595910daac5cdf919
Updated by Boone Gorges about 11 years ago
- Status changed from Assigned to Resolved
This looks like it should be fine, Dom. Thanks for looking at it.