In several places, I’ve seen the table sorting feature return unexpected results. Namely, wrong, but close sort order.
At least I thought it was wrong. It took several minutes to realize how it was behaving. So, my opinion is highly subjective of course.
When tables present sorting arrows, you can select either the ascending or descending arrow.
Very nice.
The behavior I was expecting was:
- Select ascending (up arrow) changes to ascending order.
- Select ascending again would keep the ascending order.
It took quite a while to realize what was actually happening. Which was it was toggling the order on and off. Again, this is quite subjective. And I’m sure this is how those sort arrows were intended to operate.
The problem I was having, I think, was that when pressed a second time (deselected); it took me forever to realize the arrow highlighting was being turned off. If I had just seen it turn off, I don’t think I would have been so confused.
Test Cases
Equipment: alcohol, bolt, dagger, chalk
This is the order seen when the page first loads. I think this is the order I added the items as well.
Test 1: Press up arrow by the Name header.
Expected: Sorted in ascending order
Actual: Sorted in acending order: alcohol, bolt, chalk, dagger
Test 2: Press down arrow by the Name header.
Expected: Switch to descending order
Actual: Sorted in descending order: dagger, chalk, bolt, alcohol
Test 3: Press down arrow by the Name header again.
Expected: Keep descending order.
Actual: Unsorted: alcohol, bolt, dagger, chalk
Note, this is the original order seen when the page first loads.