I added a little hack to the Recent Changes page on test.wikipedia.org. Not the nice one we talked about, but it could be expanded to that. Please tell me what you think.
Note: I only had to patch Skin.php for that; it should show on all pages that use the Recent Changes function, though. As a pure display component, it shouldn't interfere with other new toys like "hide the bots" ;-)
Magnus
On Mon, 2002-12-16 at 02:16, Magnus Manske wrote:
I added a little hack to the Recent Changes page on test.wikipedia.org. Not the nice one we talked about, but it could be expanded to that. Please tell me what you think.
It's a nice start, thanks!
This makes the issue of entries for older revisions linking to the current revision stand out more, though.
-- brion vibber (brion @ pobox.com)
On Mon, 2002-12-16 at 11:16, Magnus Manske wrote:
Note: I only had to patch Skin.php for that; it should show on all pages that use the Recent Changes function, though. As a pure display component, it shouldn't interfere with other new toys like "hide the bots" ;-)
The current version still lists the same diff/history link for every change; it seems to make more sense to list these links just once, i.e. at the top of a change, and also to remove the other redundancy below the change:
* (diff | hist) A crappy page (5 changes) ** 07:26 by 209.162.23.113 ** 07:22 by 209.162.23.113 - minor edit ** 07:20 by 209.162.23.113 (ook) ** 07:17 by 209.162.23.113 (oop) ** 07:15 by 209.162.23.113 - new page
Even better, of course, would be to show the correct diff links for the individual changes.
The format certainly has its advantages, such as being a simple bulleted list and thus generally rendered very fast, instead of a very large table. From a usability perspective, I still think "diff" and "hist" are pretty ugly.
Is this already checked in? It doesn't seem to be. Should we perhaps create an experimental tag on CVS for stuff like that?
Regards,
Erik
Got the "toggle" thingy running with just a few lines of JavaScript. Please test on all browsers.
Oh, the file at test.wikipedia.org is the only copy, so maybe we should store that somewhere ;-)
Magnus
Erik Moeller wrote:
On Mon, 2002-12-16 at 11:16, Magnus Manske wrote:
Note: I only had to patch Skin.php for that; it should show on all pages that use the Recent Changes function, though. As a pure display component, it shouldn't interfere with other new toys like "hide the bots" ;-)
The current version still lists the same diff/history link for every change; it seems to make more sense to list these links just once, i.e. at the top of a change, and also to remove the other redundancy below the change:
- (diff | hist) A crappy page (5 changes)
** 07:26 by 209.162.23.113 ** 07:22 by 209.162.23.113 - minor edit ** 07:20 by 209.162.23.113 (ook) ** 07:17 by 209.162.23.113 (oop) ** 07:15 by 209.162.23.113 - new page
Even better, of course, would be to show the correct diff links for the individual changes.
The format certainly has its advantages, such as being a simple bulleted list and thus generally rendered very fast, instead of a very large table. From a usability perspective, I still think "diff" and "hist" are pretty ugly.
Is this already checked in? It doesn't seem to be. Should we perhaps create an experimental tag on CVS for stuff like that?
Regards,
Erik
On Mon, 2002-12-16 at 03:00, Magnus Manske wrote:
Got the "toggle" thingy running with just a few lines of JavaScript. Please test on all browsers.
Nice!
Great on Mozilla 1.0.1 (but the + is kind of a small mouse target)
Lists are expanded by default in JavaScript-less lynx; the +s show up as selectable, though useless, links, which is potentially distracting.
Opera 6.1/Linux doesn't seem to work... the lists are hidden, and clicking the + signs doesn't seem to do anything. :(
Oh, the file at test.wikipedia.org is the only copy, so maybe we should store that somewhere ;-)
Just to make sure it doesn't get lost, I've made and attached a diff.
-- brion vibber (brion @ pobox.com)
--- /home/brion/src/wiki/phpwiki/newcodebase/Skin.php Sat Dec 7 12:31:14 2002 +++ Skin.php Mon Dec 16 10:58:52 2002 @@ -48,7 +48,23 @@ $wgOut->addLink( "stylesheet", "", "{$wgStyleSheetPath}/{$ss}" ); }
- function getHeadScripts() { return ""; } + function getHeadScripts() + { + $r = "" ; + $r .= " +<SCRIPT> +function toggleVisibility( _levelId) { + var thisLevel = document.getElementById( _levelId ); + if ( thisLevel.style.display == 'none' ) { + thisLevel.style.display = 'block'; + } else { + thisLevel.style.display = 'none'; + } + } +</SCRIPT> + " ; + return $r; + }
function getUserStyles() { @@ -1014,6 +1030,8 @@
function beginRecentChangesList() { + $rccc = 0 ; + $this->rcc = array() ; $this->lastdate = ""; return ""; } @@ -1034,7 +1052,8 @@
function endRecentChangesList() { - $s = "</ul>\n"; + $s = $this->recentChangesBlock() ; + $s .= "</ul>\n"; return $s; }
@@ -1100,15 +1119,51 @@ return $ret; }
+ var $rcc ; # Recent Changes Cache for better display + var $rccc ; # Recent Changes Cache Counter for visibility toggle + + function recentChangesBlock () + { + $r = "" ; + if ( count ( $this->rcc ) == 0 ) return "" ; + $k = array_keys ( $this->rcc ) ; + foreach ( $k AS $x ) + { + $a = $this->rcc[$x] ; + if ( count ( $a ) < 2 ) + { + $y = array_shift ( $a ) ; + $r .= "{$y}\n" ; + } + else + { + $noc = count ( $a ) ; + $rci = "RCI{$this->rccc}" ; + $tl = "<a href='javascript:toggleVisibility(\"{$rci}\")'>+</a>" ; + $r .= "<li>{$tl} {$x} ({$noc} changes)</li>\n" ; + $r .= "<div id='{$rci}' style='display:none'>" ; + $r .= "<ul>\n" ; + foreach ( $a AS $y ) + $r .= "{$y}\n" ; + $r .= "</ul></div>\n" ; + $this->rccc++ ; + } + } + return $r ; + } + function recentChangesLine( $ts, $u, $ut, $ns, $ttl, $c, $isminor, $isnew, $watched = false) { global $wgTitle, $wgLang, $wgUser;
$d = $wgLang->date( $ts, true); $s = ""; + $ret = "" ; if ( $d != $this->lastdate ) { - if ( "" != $this->lastdate ) { $s .= "</ul>\n"; } - $s .= "<h4>{$d}</h4>\n<ul>"; + $ret = $this->recentChangesBlock () ; + $this->rcc = array() ; + if ( "" != $this->lastdate ) { $ret .= "</ul>\n"; } + $ret .= "<h4>{$d}</h4>\n<ul>"; $this->lastdate = $d; } $h = $wgLang->time( $ts, true ); @@ -1151,7 +1206,11 @@ } $s .= "</li>\n";
- return $s; + $xt = $clink ; + if ( !isset ( $this->rcc[$xt] ) ) $this->rcc[$xt] = array() ; + array_push ( $this->rcc[$xt] , $s ) ; + + return $ret; }
function imageHistoryLine( $iscur, $ts, $img, $u, $ut, $size, $c )
Brion Vibber wrote:
Great on Mozilla 1.0.1 (but the + is kind of a small mouse target)
Yes, I'll try to make an icon that changes to "-" soon.
Lists are expanded by default in JavaScript-less lynx; the +s show up as selectable, though useless, links, which is potentially distracting.
Opera 6.1/Linux doesn't seem to work... the lists are hidden, and clicking the + signs doesn't seem to do anything. :(
Opera doesn't work at all, because it can't change the layout of a loaded page. I can get it to hide/show, but there's a blank space where the writing would be in hidden mode. Weird.
IE works great as well. I guess we'll have to detect the browser and enable the JavaScript thingy for Mozilla/Netscape/IE only, if we want to make it default (which IMHO would be nice). Otherwise, a user setting would do.
Magnus
On Mon, 2002-12-16 at 17:00, Magnus Manske wrote:
IE works great as well. I guess we'll have to detect the browser and enable the JavaScript thingy for Mozilla/Netscape/IE only, if we want to make it default (which IMHO would be nice).
We should only consider using it when the redundancy problems are addressed. The current view suggests a dynamic history view (i.e. diff would point to differences between two specific revisions, links would point to selected revisions) but does not provide it, instead all diff/title links for an expanded view point to the same location. So either this functionality should be added or the view changed to remove the redundant information; otherwise we have a serious usability problem.
Regards,
Erik
wikitech-l@lists.wikimedia.org