Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable: Sorting icons feel wrong #3732

Closed

Conversation

web-swpl
Copy link

Replaced the sorting icons with the following:

  • For ascending order pi-sort-amount-up
  • For descending order pi-sort-amount-down

This way, the arrow and the bars properly reflect the sort order:

  • In ascending order the arrow points (up) towards the biggest bar and starts at the smallest
  • In descending order the arrow points (down) towards the smallest bar and starts at the biggest
  • The order of the bars doesn't change between states, giving better consistency
  • The way the arrow points up or down mimics its mnemonic association
  • The arrow points either up or down, which mirrors the unsorted state's icon

Fixes #3730

@vercel
Copy link

vercel bot commented Mar 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
primevue ⬜️ Ignored (Inspect) Mar 10, 2023 at 1:44PM (UTC)

@tugcekucukoglu
Copy link
Member

Thank you for your contribution. We don't think it is a bug.

@web-swpl
Copy link
Author

web-swpl commented Mar 17, 2023

I don't know what to say, this (current state) feels very confusing (same icon, but with horizontal-line symmetry):

default_datatable_sorticons

While this (what this PR changes) is crystal clear:

new_datatable_sorticons

(both images display the icons in the following order: neutral, desc, asc)

@Jufralice
Copy link

Hello,

I also do believe that this is wrong. Thank you @web-swpl for pointing that out.
Your points on having the arrows points up or down to mimics their mnemonic association and to mirrors the unsorted state's icon, totally makes sense in a UI/design context.

But I think that if we would want once for all to get rid of the confusion that we still may have when displaying a arrow pointing up, we should uses these icons:

ASC: pi-sort-amount-down-alt
DESC: pi-sort-amount-down
=> the arrow pointing down (in the directly of the reading convention (from top to bottom)) in both cases.
This maybe make a bit less sense in a design context, but I think it make more sense in a logical/intuitive/meaning context.

I tried to demonstrate my purposes in this ticket (which point the same bug): #3978

But would you not like my solution, @web-swpl 's solution is still way better than what we currently have.

@Voltra
Copy link

Voltra commented Nov 13, 2023

According to current snapshot of the docs for 3.40.1 this is fixed but in the wrong order... strange

https://primevue.org/datatable/#sort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants