31

Something that changed today (perhaps Winter Bash) is causing my username to be shortened at the top of the page but only on MSO.

When the page loads, it is correct but almost instantly it gets truncated.

Before:

before

After a split second:

after

Note: Stack Overflow and Programmers does not do this.

16
  • Are you by chance using Opera?
    – Aarthi
    Dec 19, 2012 at 3:29
  • @Aarthi I am using Chrome. Dec 19, 2012 at 3:30
  • Is it the most recent version of Chrome?
    – Aarthi
    Dec 19, 2012 at 3:31
  • @Aarthi "Google Chrome is up to date." Dec 19, 2012 at 3:31
  • 14
    Blame the hats!
    – animuson StaffMod
    Dec 19, 2012 at 3:37
  • It is the Winter Bash script, although I'm not sure why it's doing the shortening it's doing.
    – Tim Stone
    Dec 19, 2012 at 4:02
  • Blame Chrome/WebKit! (Now that is even more fun.) Dec 19, 2012 at 4:13
  • Its Hats, Hats and Hats all over MSO ... :P
    – Usman
    Dec 19, 2012 at 4:56
  • ...and mad hatters ? :-) Dec 19, 2012 at 6:34
  • 7
    WinterBash is definitely the culprit here. I wrote some js to measure the exact number of available pixels, and truncate your display name accordingly. Clearly, it's not working correctly here... I'll look into it.
    – Emmett
    Dec 19, 2012 at 6:40
  • @Emmett but I have longer display name, using Chrome as well, and it doesn't happen here. Dec 19, 2012 at 8:32
  • @Emmett: I see it in Chrome on Windows 7 on a 1280x800 display. See this question (now closed as a duplicate). Dec 19, 2012 at 8:47
  • @KeithThompson The resolution doesn't seem to have anything to do with it. It is the same on all of my machines. Dec 19, 2012 at 8:48
  • I'm having trouble reproducing this.. since we're all devs here: if you're getting excessive truncation, can you please report what you're getting for these 5 values (by typing them into Chrome's console): (a) $('#portalLink').offset().left (b) $('#portalLink').outerWidth() (c) $('#portalLink').outerWidth(true) (d) $('#hlinks-nav').offset().left (e) $('#hlinks-user').outerWidth(true)
    – Emmett
    Dec 19, 2012 at 19:27
  • @Emmett This is on a different machine but same issue. The results: (a) 226 (b) 120 (c) 114 (d) 663 (e) 151 Dec 19, 2012 at 19:36

1 Answer 1

7

This should be fixed now.

To make room for the Winter Bash logo in the nav, I wrote some javascript to measure the available width for your display name, in pixels, and truncate the display name if necessary. But it didn't work correctly for lowish-rep users, or more specifically, users for whom $('#hlinks-nav') is empty.

2
  • 2
    So really, status-bydesign: earn more reps.
    – Tim Stone
    Dec 19, 2012 at 20:30
  • It wasn't a problem on Programmers and I am even lower rep on there. Dec 19, 2012 at 21:04

You must log in to answer this question.

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