Page MenuHomePhabricator

Usernames in "file history" get hyphenated
Closed, DeclinedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Go to the "File history" table of a File: page
  • Look at the account name in the "User" column while adjusting browser window width

What happens?:
As the window narrows, the account-name sometimes line-breaks via inserting hyphens, meaning one can no longer cut'n'paste it. But it doesn't break at the logical place, between the account-name and the talk/contribs/block parenthetical set of links. See screenshot below. I think it's a linguistic break? It only affects some usernames, haven't figured out the pattern yet.

What should have happened instead?:
Account-name should either be made nowrap or to allow line-breaking without displaying characters that are not part of the string itself. Line-breaking at logical places should be allowed

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
Server: commons, running 1.37.0-wmf.14 (e031a17) 20:28, 14 July 2021
Browser: Firefox 89.0.2 on OS X

Demonstration: https://commons.wikimedia.org/wiki/File:Brussel_Noord_juli_2021_1.jpg where the account-name is "Smiley.toerist":

Screen Shot 2021-07-15 at 4.50.42 AM.png (118×211 px, 12 KB)

Event Timeline

Here's the HTML:

<td><a href="/wiki/User:Smiley.toerist" class="mw-userlink" title=""><bdi>Smiley.toerist</bdi></a><span style="white-space: nowrap;"> <span class="mw-usertoollinks">(<a href="/wiki/User_talk:Smiley.toerist" class="mw-usertoollinks-talk" title="">talk</a> | <a href="/wiki/Special:Contributions/Smiley.toerist" class="mw-usertoollinks-contribs" title="">contribs</a> | <a href="/wiki/Special:Block/Smiley.toerist" class="mw-usertoollinks-block" title="Special:Block/Smiley.toerist">block</a>)</span></span></td>

There is no nowrap around the account-name. There is a whitespace between the account-name and the links-set, but it is part of the nowrap , and there is a whitespacea space between the account-name and the links-set, but it's part of the nowrap along with the links.

Hi, this is a feature of your web browser and nothing that can be fixed server-side.

Account-name should either be made nowrap

Which actual underlying problem would this solve? Please provide a specific use case.

Account-name should either be made nowrap

Which actual underlying problem would this solve? Please provide a specific use case.

Again, it would allow me to cut'n'paste the username into other places I might want to use it. Say, compliling a list of users for a sock-puppetry report. I can't find any other place where account-names break in this way (for example, they don't in plain articles, even equivalently arranged username/links in a wikitable), which is why I was looking for a different hinting in the source. And I can't think of a reason that semantic/logical whitespace is commanded not to break. Given that account-names can contain hyphens, it's a needless distraction that the username appears to be a different equally-valid username.

Browser-diving, Chrome (Mac) does the same thing, even without being logged in (therefore it's not user .js bug). Safari (Mac) instead does break at the whitespace (*despite* the nowrap tag). That makes it seem like HTML subject to the "tidy-whitespace-bug" lint-error, where indeed edge whitespace within a nowrap span is subject to varying behaviors. I'm uncertain why out-of-hand rejection to addressing something that looks confusing into something that is not as confusing and that affects multiple current-release popular browsers, even if "it's a browser effect". What's the drawback?

Again, it would allow me to cut'n'paste the username into other places

Cannot reproduce in Firefox 90 on Linux. Cut and paste works as expected. Account name does not break. See the address bar where I pasted:

Screenshot from 2021-07-15 20-32-51.png (291×960 px, 81 KB)

Aklapper changed the task status from Invalid to Declined.Jul 15 2021, 6:38 PM

Given that account-names can contain hyphens, it's a needless distraction that the username appears to be a different equally-valid username.

I'd say it's a trade-off between wide tables and having to scroll on screens with smaller width versus reading (not: copying and pasting, see my previous comment) individual longer names which, I'd say, may also get end up being broken into two lines on other web sites.