2

Top ranking (top X% this period) in the Activity tab is not displaying very first time when you are visiting to the SE site which you were not visited after the new profile page UI change.

To reproduce this, visit any site's Activity tab (you have 200+ reputation on the site) which you are not visited recently, this display issue in the main and per-site meta.

Steps to reproduce:

  • From the top bar site switcher select any site which you are not recently visited.

  • In the site, click the reputation from the top bar, it will navigate to Activity tab, there very first time inside the Reputation box the top ranking will not display.

If you are navigate to other tab and come back the Activity tab again, the ranking will be display.

Screenshot for reference:

top X% this period

  • 2
    I can reproduce this bug. If you visit your Profile tab and then click back to the Activity tab, it appears then. We'll look into why it doesn't appear initially. – Hynes Jun 28 '17 at 17:29
2

The class name was changed on the span holding the rank link, causing the JavaScript to populate it to fail to do so.

Part of what this script did was call a route to fetch the link and cache it.

The page load looks for the cached version - it just outputs it if it exists and outputs the JavaScript if not.

So - first load, JS is rendered, calls the route (which also caches the link), but fails to find the element. Second call - link is already cached to output as is.

Why this approach? Because we fetch the data from the reputation leagues - we don't want to block rendering if the leagues are slow/unresponsive/down. This allows us to load the page quickly, fetch the results if we don't have them yet (and if that fails... no harm done).


I updated the JavaScript and HTML to match.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .