Description
On the page RecentChanges pages which have been changed recently are listed.
Problem 1: Pages which contain a CamelCase part are displayed with a space at the word boundary (e.g. Camel Case).
While this may improve the readability on this special page, it is asymmetric as this is not done anywhere else (as far as I know). Further on, users that copy the displayed page name from RecentChanges, will not find the real page or may non-working WikiLinks.
Problem 2: Extra spaces are inserted into the edit comments, too. But following another pattern.
I have no idea what purpose this behavior may have solved. Whenever I saw it it just messes things up.
Steps to reproduce
Problem 1:
Create a CamelCase page
Look up RecentChanges
Problem 2:
Edit a page with a edit comment like "WikiSandBox/SubPage137 edited." or "'meinezeichnung.tdraw'"
The edit comment is displayed as "WikiSandBox/SubPage1 37 edited." or "'meinezeichnung.tdra w'"
Example
1 [...]
2 <table>
3 <tr class="rcdaybreak"><td colspan="6"><strong>2010-08-10</strong> <a href="/testwiki/action/bookmark/Aktuelle%C3%84nderungen?action=bookmark&time=1281482418531746" rel="nofollow">Lesezeichen setzen</a></td></tr>
4 <tr>
5 <td class="rcicon1"><a href="/testwiki/action/diff/MeineStartSeite/Seite755?action=diff" rel="nofollow"><img alt="[DIFF]" height="16" src="/moin_static193/modernized/img/moin-diff.png" title="[DIFF]" width="16" /></a></td>
6 <td class="rcpagelink"><a href="/testwiki/MeineStartSeite/Seite755">Meine Start Seite/Seite755</a></td>
7 <td class="rctime">vor 0m</td>
8 <td class="rcicon2"><a href="/testwiki/action/info/MeineStartSeite/Seite755?action=info" rel="nofollow"><img alt="[INFO]" height="16" src="/moin_static193/modernized/img/moin-info.png" title="[INFO]" width="16" /></a></td>
9 <td class="rceditor"><span title="root"><a href="/testwiki/root" title="root">root</a></span></td>
10 <td class="rccomment"></td>
11 </tr>
12
13 <tr>
14 <td class="rcicon1"><a href="/testwiki/action/diff/MeineStartSeite?action=diff" rel="nofollow"><img alt="[DIFF]" height="16" src="/moin_static193/modernized/img/moin-diff.png" title="[DIFF]" width="16" /></a></td>
15 <td class="rcpagelink"><a href="/testwiki/MeineStartSeite">MeineStartSeite</a></td>
16 <td class="rctime">vor 0m</td>
17 <td class="rcicon2"><a href="/testwiki/action/info/MeineStartSeite?action=info" rel="nofollow"><img alt="[INFO]" height="16" src="/moin_static193/modernized/img/moin-info.png" title="[INFO]" width="16" /></a></td>
18 <td class="rceditor"><span title="root"><a href="/testwiki/root" title="root">root</a></span> [1-6]</td>
19 <td class="rccomment"><tt>#02</tt> 'meinezeichnung.tdra w'<br><tt>#03</tt> Dateianhang 'meinezeichnung.tdra w' wurde gelöscht.<br><tt>#04</tt> mydrawing.tdraw deleted.<br><tt>#05</tt> WikiSandBox/SubPage1 37 edited.</td>
20
21 </tr>
22 <tr>
23 <td class="rcicon1"><a href="/testwiki/action/diff/MeineStartSeite/Seite767?action=diff" rel="nofollow"><img alt="[GELÖSCHT]" height="16" src="/moin_static193/modernized/img/moin-deleted.png" title="[GELÖSCHT]" width="16" /></a></td>
24 <td class="rcpagelink"><a class="nonexistent" href="/testwiki/MeineStartSeite/Seite767">Meine Start Seite/Seite767</a></td>
25 <td class="rctime">13:14</td>
26 <td class="rcicon2"><a href="/testwiki/action/info/MeineStartSeite/Seite767?action=info" rel="nofollow"><img alt="[INFO]" height="16" src="/moin_static193/modernized/img/moin-info.png" title="[INFO]" width="16" /></a></td>
27 <td class="rceditor"><span title="">anonym</span> [1]<br><span title="root"><a href="/testwiki/root" title="root">root</a></span> [2]</td>
28 <td class="rccomment"><tt>#02</tt> Umbenannt von 'MeineStartSeite/Sei te766'. </td>
29 </tr>
Component selection
- general
Details
This wiki.
Workaround
Discussion
It is intended that comments get a space inserted for a linebreak. And if CamelCase are shown with a blank between the words this depends on your user settings. Check off in General: "Add spaces to displayed wiki names". Copying the URL works for me.
- For the part about copying: I did not mean to copy the URL ("Copy link address"), I meant a simple text copy like selecting the text with the mouse pointer and hitting CTRL+C.
- The option "Add spaces to displayed wiki names" is turned off for my account (in my local wiki, german language). Nevertheless some extra spaces get added.
- To see a difference I turned it on, and indeed a lot more spaces get added.
One example I just tried (with the WikiName spaces option off):
page name: "MeineStartSeite/Seite755", displayed name on RecentChanges: "Meine Start Seite/Seite755"
page name: "MeineStartSeite", displayed name on RecentChanges: "MeineStartSeite"
This behavior exists on this wiki, too. See the entries for WikiSandBox/SubPage137 . Maybe it can only be observed for sub pages.
I still don't understand how extra spaces like in the auto-generated comment "Umbenannt von 'MeineStartSeite/Sei te766'." should be helpful for linebreaks (text is german). The spaces are not in the edit-log, they get inserted only on the RecentChanges page. The spaces are not inserted before or after a linebreak. See this raw html example (line 19 and 28):
you just need to look in any browser how bad long words destroy the complete layout
Okay. So the behavior on RecentChanges (and nowhere else) is:
- In comments long words get an extra space after every 20 continuous chars.
Page names get extra spaces in CamelWords when their length exceeds 15 chars, even with "Add spaces to displayed wiki names" turned off.
This should be a feature request rather than a bug.
As stated above, the purpose of inserting blanks into long wiki names and comment-words is to prevent one exceptionally long page name or comment-word from forcing the browser to display the page with a horizontal scroll bar, thereby creating an undesirable page layout.
The downside is blanks are sometimes inserted into unwanted places (GSoC2010 becomes GSo C2010).
The upside is Moin's tabular RecentChanges looks better than some alternatives: http://www.mediawiki.org/wiki/Special:RecentChanges
- Looking around for alternatives, I found:
­ (soft hyphen) may work on most browsers for long comment-words, but may not be desirable on long page names. See http://www.cs.tut.fi/~jkorpela/shytest.html to test your browser.
​ (zero-width space) may work on most browsers for long page names. See http://en.wikipedia.org/wiki/Zero-width_space to test your browser.
- A more eye pleasing algorithm for long page names may be to first insert a zero-width space after every "/" and then, for segments over the length limit, insert zero-width spaces between words.
The patch below is a Mercurial diff against the 1.9.3 tip as of 2010-08-18. Zero-width space characters are inserted into long page names. Soft hyphens are inserted in long words within comments.
recentchanges.diff updated 2010-08-22 - eliminated DOS line endings, moved test_recentchanges to /macro/_tests.
If you do not have Mercurial installed and want to apply or test the fix against your 1.9.3 installation:
Download the Page.py, wikiutil.py, and RecentChanges.py files attached to this page.
- Copy Page.py and wikiutil.py to ../MoinMoin/
Copy RecentChanges.py to ../MoinMoin/macro/
If your wiki has IE6 users, then add the following to the end of msie.css for every theme in use (../htdocs/<themename>/css/)
/* IE6 support for zero width spaces on RecentChanges page */ td.rcpagelink { font-family: "Lucida Sans Unicode", "Arial Unicode MS", "Arial Unicode"; }
Browsers tested:
- Current versions of IE8, Firefox, Opera, Chrome, Safari on W/7
- Current versions of Konqueror and Firefox on Ubuntu 10.04
- IE7, Firefox 2.0.0.4, and Safari 3.0 on W/XP
- IE6 and Firefox 1.0.7 on W/ME
Failures noted:
- Firefox 1.x and 2.x do not support the soft-hyphen. As a result, words over 20 characters in length in comments will not word wrap.
Firefox 3.x has a current bug (https://bugzilla.mozilla.org/show_bug.cgi?id=418975). As a result, if the first word in a comment is over 20 characters, the first word will not word wrap. The impact of this bug is minor because the comment is the right-most column.
IE6 requires a special font for support of zero-width spaces. Contrary to http://dunae.ca/2009/better-web-typography-with-spaces-and-hyphens/ which lists several fonts that worked, only two of the fonts were installed on my test system -- Lucida Sans Unicode and Lucida Sans. The only font that worked was Lucida Sans Unicode. Other fonts displayed the zero-width space as a small square box.
Plan
- Priority:
- Assigned to:
- Status: