Page MenuHomePhabricator

Special ListFiles has the sorting arrow switched
Closed, ResolvedPublic

Description

http://commons.wikimedia.org/w/index.php?title=Special:ListFiles&sort=img_size&limit=50&desc=1

The arrow for sorting asc/desc should be the other way around.


Version: unspecified
Severity: minor

Details

Reference
bz18962

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:41 PM
bzimport set Reference to bz18962.

Indeed, the directions used are opposite that of in-wiki sortable table headers, which also match eg Finder's sorted file views. The small end of the arrow should match up with the low end (smaller numbers, earlier letters), while the big end of the arrow should match up with larger numbers/later letters.

Probably this needs to be fixed in the table pager class.

Visual style fix -- putting this on Trevor's plate. :)

Solution: includes\Pager.php:
Just switch the images:

					if ( $this->mDefaultDirection ) {
						# Descending
						$image = 'Arr_u.png';
						$query['asc'] = '1';
						$query['desc'] = '';
						$alt = htmlspecialchars( wfMsg( 'descending_abbrev' ) );
					} else {
						# Ascending
						$image = 'Arr_d.png';
						$query['asc'] = '';
						$query['desc'] = '1';
						$alt = htmlspecialchars( wfMsg( 'ascending_abbrev' ) );
					}

I'm not sure it's wrong. If it's descending, it shows the ascending image (click her to show ascending), and viceversa.

Ok I see what you mean with the opposite behaviour to indicate what happens after the click. That's totally not user-firendly ("Don't make me think").

It looks wrong, not what you'd expect the arrow to be like. That's what counts imo.