Closed (works as designed)
Project:
Achievements
Version:
7.x-1.5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 May 2013 at 17:14 UTC
Updated:
22 May 2013 at 18:12 UTC
Hi,
As written, the full leaderboard page at achievements/leaderboard shows the top leaders followed by the relative leaderboard. For users listed in the top leaderboard, this will result in duplicate tables for some users.
The achievements_leaderboard_block() uses the test
!isset($achievers['top'][$GLOBALS['user']->uid)
to prevent the leaderboard block from displaying the relative leaderboard if the user is in the top leaderboard.
Shouldn't the achievements_leaderboard_totals() function do the same test?
Thanks!
Dan
Comments
Comment #1
morbus iffHey Dan!
Early versions of the leaderboard page did exactly that, but I didn't like the experience. The biggest difference between the block and the page is that the page has a pager you can page through (heh). This pager is what caused the part of the experience I didn't like. Imagine you're on the first page of the (primary) leaderboard, and you see the (relative) at the bottom. Great, awesome. You hit page 2. More primary, more relative, yay. Then you hit page 3, and that's where you happen to be on the primary leaderboard. Suddenly, the relative leaderboard disappears. The page looks incomplete -- there might even be a slight shifting of the UI because the browser no longer needs to show a vertical scrollbar. You click to page 4, and the relative leaderboard is back (since you're no longer shown on the primary leaderboard), and the UI might shift again as the vertical scrollbar renders anew.
It just all felt weird, and it's a different circumstance from the blocks, which don't have the pager, and thus aren't subject to a change from page to page.
Setting to works as designed, but certainly open it back up as needed.
Comment #2
dmeigs commentedHey Morbus,
That makes sense. I knew there had to be a reason.
Thanks for the great module!
--Dan