tabulated-list sort icon is reversed

classic Classic list List threaded Threaded
36 messages Options
12
Reply | Threaded
Open this post in threaded view
|

tabulated-list sort icon is reversed

Philippe Vaucher
Hello,

The sort icon in tabulated-list are opposite of what they should.

This is visible in `package-list-packages` when sorting the "Package" column, when they are alphabetically sorted the icon is like "\/" when it should be like "/\"

I tried to figure out where/how this icon is display, but after a while I got frustrated and thought it'd be easier to ask here.

If you point me to the right place I can do the patch, but as I suspect the fix is trivial it's probably simpler for the one that knows where to look to do the patch.

Thanks,
Philippe
Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Eli Zaretskii
> From: Philippe Vaucher <[hidden email]>
> Date: Sat, 28 Jul 2018 20:14:28 +0200
>
> The sort icon in tabulated-list are opposite of what they should.

They show the direction in which the key's value increases.

> I tried to figure out where/how this icon is display, but after a while I got frustrated and thought it'd be easier to
> ask here.

See tabulated-list-init-header.

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Philippe Vaucher
> The sort icon in tabulated-list are opposite of what they should.

They show the direction in which the key's value increases.

Right, thanks for the explanation.

I think it's counter-intuitive. It's the first time I see this way of representing the sorting. Usually, the triangle is used as a representation of the position of where the largest element is.

See https://ux.stackexchange.com/a/38654 for a better explanation.

Here are examples to illustrate what I'm saying:


Given that this issue is not a mistake but intended behavior it's difficult to decide what is the right path here. Maybe that the paradigm Emacs uses is the one that most Emacs users expect, so it's actually the right one? I'm pretty sure that most people used to GUIs with columns would think the arrows are oriented the wrong way, but I might be mistaken.

What do you reckon should be done, switch the direction or let it as it is now?

Philippe
Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Eli Zaretskii
> From: Philippe Vaucher <[hidden email]>
> Date: Sun, 29 Jul 2018 00:00:34 +0200
> Cc: Emacs developers <[hidden email]>
>
> What do you reckon should be done, switch the direction or let it as it is now?

Not sure.  I'd like others to chime in with their opinions.

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Robert Pluim
Eli Zaretskii <[hidden email]> writes:

>> From: Philippe Vaucher <[hidden email]>
>> Date: Sun, 29 Jul 2018 00:00:34 +0200
>> Cc: Emacs developers <[hidden email]>
>>
>> What do you reckon should be done, switch the direction or let it as it is now?
>
> Not sure.  I'd like others to chime in with their opinions.

I think it looks correct the way it is now, ie indicating the
direction of increase.

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Joost Kremers-3
In reply to this post by Eli Zaretskii

On Sun, Jul 29 2018, Eli Zaretskii wrote:
>> From: Philippe Vaucher <[hidden email]>
>> Date: Sun, 29 Jul 2018 00:00:34 +0200
>> Cc: Emacs developers <[hidden email]>
>>
>> What do you reckon should be done, switch the direction or let
>> it as it is now?
>
> Not sure.  I'd like others to chime in with their opinions.

Perhaps it should be noted that Emacs is not alone in using the
arrow heads this way. The file manager on my Elementary OS system
(Patheon) uses ▼ (i.e., a down-pointing triangle) to indicate
sorting A-Z and 0-9, the Rhythmbox music player does as well, and
the same goes for the image viewer Geeqie (e.g., in its Exif
metadata window).

Could be a GNU/Linux vs. Windows / MacOS thing, I don't know. I
find Emacs' current way of doing things more intuitive, but that's
just me. I don't think you're ever gonna reach consensus on this
one.

But I must also say that I generally only look at these indicators
to see which column is sorted, not to find out how it's sorted,
because I find it's quicker (for me) to just look at a few items.

Just my €0.02, though.

--
Joost Kremers
Life has its moments

Reply | Threaded
Open this post in threaded view
|

RE: tabulated-list sort icon is reversed

Drew Adams
> Perhaps it should be noted that Emacs is not alone in using the
> arrow heads this way. The file manager on my Elementary OS system
> (Patheon) uses ▼ (i.e., a down-pointing triangle) to indicate
> sorting A-Z and 0-9, the Rhythmbox music player does as well, and
> the same goes for the image viewer Geeqie (e.g., in its Exif
> metadata window).
>
> Could be a GNU/Linux vs. Windows / MacOS thing, I don't know. I
> find Emacs' current way of doing things more intuitive, but that's
> just me. I don't think you're ever gonna reach consensus on this
> one.

It's the case that MS Windows does it the other way around:
^ means values are currently sorted from low to high (going
down the column). IOW, the triangle _reflects_ the current
sort order - it is a depiction, in a way, of the sorted values.

To me, that makes more sense. But I agree with this statement:

> But I must also say that I generally only look at these indicators
> to see which column is sorted, not to find out how it's sorted,
> because I find it's quicker (for me) to just look at a few items.

Still, for some kinds of data looking quickly at the topmost few
values might not be as quick as looking at the column symbol,
once you are used to its meaning.

If this is mainly (only?) a platform thing then maybe Emacs
should do something different for different platforms - dunno.

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Robert Pluim
Drew Adams <[hidden email]> writes:

>> Perhaps it should be noted that Emacs is not alone in using the
>> arrow heads this way. The file manager on my Elementary OS system
>> (Patheon) uses ▼ (i.e., a down-pointing triangle) to indicate
>> sorting A-Z and 0-9, the Rhythmbox music player does as well, and
>> the same goes for the image viewer Geeqie (e.g., in its Exif
>> metadata window).
>>
>> Could be a GNU/Linux vs. Windows / MacOS thing, I don't know. I
>> find Emacs' current way of doing things more intuitive, but that's
>> just me. I don't think you're ever gonna reach consensus on this
>> one.
>
> It's the case that MS Windows does it the other way around:
> ^ means values are currently sorted from low to high (going
> down the column). IOW, the triangle _reflects_ the current
> sort order - it is a depiction, in a way, of the sorted values.
>
> To me, that makes more sense. But I agree with this statement:

To me it doesnʼt. It explains why Iʼm always confused and end up
having to click at least twice when using Windows.

>> But I must also say that I generally only look at these indicators
>> to see which column is sorted, not to find out how it's sorted,
>> because I find it's quicker (for me) to just look at a few items.
>
> Still, for some kinds of data looking quickly at the topmost few
> values might not be as quick as looking at the column symbol,
> once you are used to its meaning.
>
> If this is mainly (only?) a platform thing then maybe Emacs
> should do something different for different platforms - dunno.

Please no. One of the fine properties of Emacs is that it generally
doesnʼt vary much between platforms.

Robert

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Eli Zaretskii
> From: Robert Pluim <[hidden email]>
> Cc: Joost Kremers <[hidden email]>,  Eli Zaretskii <[hidden email]>,  Philippe Vaucher <[hidden email]>,  [hidden email]
> Date: Mon, 30 Jul 2018 17:17:00 +0200
>
> > If this is mainly (only?) a platform thing then maybe Emacs
> > should do something different for different platforms - dunno.
>
> Please no. One of the fine properties of Emacs is that it generally
> doesnʼt vary much between platforms.

Agreed.  At least by default the behavior should be the same.

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Stefan Monnier
In reply to this post by Eli Zaretskii
>> What do you reckon should be done, switch the direction or let it as
>> it is now?
> Not sure.  I'd like others to chime in with their opinions.

If you want my opinion on the color of this shed, I'd prefer for the
color to be circular.

More seriously, I hate those arrows exactly because I never know what
they mean.  I think it's just like the "split window
vertically/horizontally" issue: it's a bad UI and the right solution is
to choose neither of those options.

I'm afraid that while I figured out the problem, I don't have any solution
to offer :-(

Maybe we should just not display the direction of the ordering at all:
just put a bullet or something to indicate which column is sorted and
let the user look at the data if she wants to know how this column
is sorted.


        Stefan


Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Clément Pit-Claudel
On 2018-07-30 13:33, Stefan Monnier wrote:
> I'm afraid that while I figured out the problem, I don't have any solution
> to offer :-(

The trick used on old macs was pretty good: instead of a solid triangle (which can mean "pyramid" or "arrow"), use increasingly narrow or increasingly wide layers:

This means "sorted small to large":

   _
  ___
 _____
_______


This means "sorted large to small":

_______
 _____
  ___
   _

Alternatively, we can just write which comparison operator we used: ≤ or ≥.  When the sorting indicator is ≤, each element in the list is ≤ to the next one, and conversely with ≥.

Or we can use a horizontal symbol with increasing or decreasing bars: ▂▅▉ means increasing, ▉▅▂ means decreasing.

Apologies for the ASCII art.

Clément.

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Philippe Vaucher
The trick used on old macs was pretty good: instead of a solid triangle (which can mean "pyramid" or "arrow"), use increasingly narrow or increasingly wide layers:

This means "sorted small to large":

   _
  ___
 _____
_______


This means "sorted large to small":

_______
 _____
  ___
   _

I think that would be the best solution indeed.

Would the ones in favor of "not changing" (Robert Pluim, Joost Kremers) be ok with such a change or do they still find it counter-intuitive?

I also agree that no matter what is chosen, it'd behave the same on all platforms.

Philippe

 
Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Philippe Vaucher
In reply to this post by Stefan Monnier

More seriously, I hate those arrows exactly because I never know what
they mean.  I think it's just like the "split window
vertically/horizontally" issue: it's a bad UI and the right solution is
to choose neither of those options.

There actually is an icon that is unambiguous: the "a-z" or "z-a" one:


I'd be happy with that or Clément's stacked layers' solution.

Philippe

 
Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Philippe Vaucher
There actually is an icon that is unambiguous: the "a-z" or "z-a" one:

My point being that the arrow direction is still ambiguous, but the "a-z" part disambiguates it.

Still, I prefer the length-increasing stacked layers solution.

Philippe 
Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Stefan Monnier
In reply to this post by Philippe Vaucher
> There actually is an icon that is unambiguous: the "a-z" or "z-a" one:

I'd actually prefer it to be 0-9 rather a-z (for non-latin-script
users), but yes, this is a fairly clear choice.  The main downside is
that when scaled to the size of a normal character it can be
nigh-on illegible (I like my font to be "just big enough to be
legible", in order to maximize the amount of text displayed, so
two-chars stacked within the space of a normal char will be illegible
almost by definition).


        Stefan

Reply | Threaded
Open this post in threaded view
|

RE: tabulated-list sort icon is reversed

Drew Adams
> > There actually is an icon that is unambiguous: the "a-z" or "z-a" one:
>
> I'd actually prefer it to be 0-9 rather a-z (for non-latin-script
> users), but yes, this is a fairly clear choice.  

1. Neither is great, IMO. The icon should express low-to-high or small-to-large in a _general_ way, and not suggest either an alphabetic or a numeric order.

What do you do with a date column whose values might be any ISO date format? Assuming that the actual sorting is by date (not its representation), neither a-z nor 0-9 suggests what's happening.

2.  Personally, I don't see the difference between this proposal:

   _
  ___
 _____
_______

and a triangle with vertex on top (like ^). The same ambiguity arises:
Does it represent the current sort order (low-to-high / small-to-large)?
Or does it represent the new sort order you'll get if you use that button?

IIUC, the MS Windows approach (for column-sort indicators) is to reflect the current sort order, the same way that a bold or underlined column header indicates that the column is selected (current).

And apparently other, non-Windows contexts take the approach that the icon represents the new order you'll get if you click the icon.

How does the proposed sequence of lines of increasing/decreasing length solve the problem of ambiguity?

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Stefan Monnier
> and a triangle with vertex on top (like ^). The same ambiguity arises:
> Does it represent the current sort order (low-to-high / small-to-large)?
> Or does it represent the new sort order you'll get if you use that button?

You can click on any column to cause it to be sorted, so it wouldn't
make much sense for that triangle to be a button (i.e. why have
a button in that one column and not in all others?).

> And apparently other, non-Windows contexts take the approach that the
> icon represents the new order you'll get if you click the icon.

I don't think so.


        Stefan


Reply | Threaded
Open this post in threaded view
|

RE: tabulated-list sort icon is reversed

Drew Adams
> > and a triangle with vertex on top (like ^). The same ambiguity arises:
> > Does it represent the current sort order (low-to-high / small-to-large)?
> > Or does it represent the new sort order you'll get if you use that button?
>
> You can click on any column to cause it to be sorted, so it wouldn't
> make much sense for that triangle to be a button (i.e. why have
> a button in that one column and not in all others?).

Emacs seems to (at least in some cases) add such a triangle icon to the column header, after its text. And yes, it is shown only in the header of the current column.

I meant the same thing you mean: click the column header (not necessarily the icon in the header) to toggle the sort direction.

> > And apparently other, non-Windows contexts take the approach that the
> > icon represents the new order you'll get if you click the icon.
>
> I don't think so.

Read "click the column header" anywhere, not just on the icon.

I thought this discussion had pointed out that for some people the icon orientation reflects (and should reflect) the new sort direction you will get, whereas for others the icon orientation should reflect the current sort direction.

At least on MS Windows, in `Buffer Menu', it seems:

* For numerical sorting (e.g. column Size) ) the icon orientation reflects the current sort direction, in the sense that if the small end (vertex) is on top then the first row is the smallest/lowest value etc.

* But for alphabetical sorting (e.g. column Mode) the icon orientation is reversed: when the small end is on the bottom (not the top) sorting is alphabetical (A before Z). You can say that the icon orientation reflects not the current sort order but the new sort order you'll get if you click the header to toggle the order.

So it seems not even to be consistent.

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Joost Kremers-2

On Tue, Jul 31 2018, Drew Adams wrote:
> I thought this discussion had pointed out that for some people
> the icon orientation reflects (and should reflect) the new sort
> direction you will get, whereas for others the icon orientation
> should reflect the current sort direction.

My understanding of the discussion is that for some, a downward
pointing triangle indicates an ascending sort order, while for
others it indicates a descending sort order.

The idea that the icon is a button that indicates what happens
when you click it has also been mentioned, but since it's only the
sorted column that has such an indicator, this seems unlikely.
(There are systems such as at <http://wals.info/feature>, which
have two greyed-out triangles indicating that you can sort a
column, and one single triangle for the sorted column. For me,
that sorted column triangle points in the wrong direction, BTW...)



--
Joost Kremers
Life has its moments

Reply | Threaded
Open this post in threaded view
|

Re: tabulated-list sort icon is reversed

Richard Stallman
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > My understanding of the discussion is that for some, a downward
  > pointing triangle indicates an ascending sort order, while for
  > others it indicates a descending sort order.

Can anyone suggest an icon whose meaning would be clear?
Perhaps < and >?
Those two characters turned 90 degrees?

--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)



12