r91966 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91965‎ | r91966 | r91967 >
Date:14:58, 12 July 2011
Author:robin
Status:reverted (Comments)
Tags:
Comment:
(bug 12205) Bidirectional names in action=credits are split and displayed incorrectly when wrapped to the next line.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/actions/CreditsAction.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -155,6 +155,8 @@
156156 RefreshLinks::deleteLinksFromNonexistent
157157 * (bug 29797) Error: "Tried to load block with invalid type" when subpages
158158 are disabled for user pages.
 159+* (bug 12205) Bidirectional names in action=credits are split and displayed
 160+ incorrectly when wrapped to the next line.
159161
160162 === API changes in 1.19 ===
161163 * BREAKING CHANGE: action=watch now requires POST and token.
Index: trunk/phase3/includes/actions/CreditsAction.php
@@ -196,7 +196,10 @@
197197 ? SpecialPage::getTitleFor( 'Contributions', $user->getName() )
198198 : $user->getUserPage();
199199
200 - return Linker::link( $page, htmlspecialchars( $real ? $real : $user->getName() ) );
 200+ return Html::rawElement( 'span',
 201+ array( 'class' => 'mw-link-nowrap' ),
 202+ Linker::link( $page, htmlspecialchars( $real ? $real : $user->getName() ) )
 203+ );
201204 }
202205
203206 /**
Index: trunk/phase3/skins/common/shared.css
@@ -775,4 +775,6 @@
776776 }
777777 div.floatright, table.floatright, div.floatleft, table.floatleft {
778778 position: relative;
779 -}
\ No newline at end of file
 779+}
 780+
 781+.mw-link-nowrap { white-space: nowrap; }
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r92011Do r91966 in a different way, per Brion: use unicode-bidi:embed; instead of w...robin21:28, 12 July 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   17:35, 12 July 2011

This feels wrong to me; long names should be able to wrap (if they're say institutional names they could get pretty long!)

Would sticking each link in a bidi embed section resolve this by keeping each RTL name separately ordered within an LTR context instead of letting the layout algo decide that they're a run of RTL text together?

#Comment by SPQRobin (talk | contribs)   18:21, 12 July 2011

They are user names, I don't see where it would contain institutional names.

Anyway, I could set a div id="mw-credits-text" around the text and do #mw-credits-text a { unicode-bidi: embed; }, that seems to work as well.

#Comment by SPQRobin (talk | contribs)   21:29, 12 July 2011

Done in r92011

#Comment by Nikerabbit (talk | contribs)   13:29, 20 July 2011

Essentially reverted by another solution.

Status & tagging log