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: sort icons for ascending/descending swapped? #6852

Closed
StackedCrooked opened this issue Jul 8, 2024 · 8 comments · Fixed by #6853, leoo1992/GeradorQRCode#80 or leoo1992/GeradorQRCode#85 · May be fixed by mtech-31-quemistry/quemistry_client_web#20
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@StackedCrooked
Copy link

Describe the bug

I have a question about the default sorting icon used by the DataTable component, specifically this icon:
sort-icon

This icon is labeled pi-sort-amount-down-alt in the PrimeReact Icons documentation.

The arrow points from smallest to largest, which I think means ascending order. But in this example, it seems to mean descending:
sorting

I might be misinterpreting the symbolic meaning of the arrow and the lines. If that is the case, could you please clarify?

If it's a bug, could you please confirm?

Thanks!

Reproducer

https://stackblitz.com/edit/vitejs-vite-apq6rx?file=src%2FApp.tsx

PrimeReact version

18.2.0

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

  1. Open the StackBlitz example.
  2. Click on the "Name" column and observe the icons used to indicate ascending and descending order.

Expected behavior

I expect the icons for ascending and descending order to be swapped.

(Unless I am misinterpreting the symbols. If that is the case, I would appreciate an explanation.)

@StackedCrooked StackedCrooked added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 8, 2024
@melloware
Copy link
Member

This has been raised before: primefaces/primevue#4708 Some people think its OK others think its backwards :)

@melloware melloware added question Issue contains a question about the use of PrimeReact components or the products it supports and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 8, 2024
@StackedCrooked
Copy link
Author

This has been raised before: primefaces/primevue#4708 Some people think its OK others think its backwards :)

Thanks for the quick reply. I understand that it's subjective.

If I may share my perspective, I would prefer to stick to the convention used for years by the Windows and Mac operating systems, and use triangles like this:

conventional-sorting-icons

Feel free to ignore my suggestion and proceed as you see fit. :)

Thanks again!

@melloware
Copy link
Member

At my clients we have standardized on FontAwesome version:

image

@melloware melloware added Status: Discussion Issue or pull request needs to be discussed by Core Team Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team and removed question Issue contains a question about the use of PrimeReact components or the products it supports labels Jul 8, 2024
@melloware
Copy link
Member

Because these icons are used across 4 PrimTek libs you should really open this ticket at the PrimeIcons repo and not this project individually. as a workaround you can define your own icons in the table for sorting.

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
@melloware melloware removed the Status: Discussion Issue or pull request needs to be discussed by Core Team label Jul 8, 2024
@onursenture
Copy link
Member

Because these icons are used across 4 PrimTek libs you should really open this ticket at the PrimeIcons repo and not this project individually. as a workaround you can define your own icons in the table for sorting.

Actually, I asked him to open a ticket here because I think the PrimeVue version is the right one. https://github.com/orgs/primefaces/discussions/2276#discussioncomment-9983658

@onursenture onursenture reopened this Jul 8, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 8, 2024
@onursenture onursenture removed the Resolution: Workaround Issue or pull request contains a workaround. It needs to be reviewed further by Core Team label Jul 8, 2024
@melloware
Copy link
Member

oh are we using the wrong icon @onursenture ? We are on PrimeIcons 7.0.0 already?

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 8, 2024
@onursenture
Copy link
Member

onursenture commented Jul 8, 2024

It's not about the PrimeIcons version; as I remember, these are SVGs defined somewhere. The icons that we used on PrimeVue should be referenced.

image
image

@melloware
Copy link
Member

Yep i will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment