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

Allow toggling of sort state by clicking on column name/text itself #1537

Open
corneliusroemer opened this issue Oct 16, 2024 · 3 comments
Open
Labels
package: nextclade_web t:feat Type: request of a new feature, functionality, enchancement

Comments

@corneliusroemer
Copy link
Member

Good feature suggestion by @tsibley in a PR comment:

I can't seem to sort by emerging subclade, why is that @ivan-aksamentov?

It's literally because the text doesn't wrap, which forces the sort asc/desc icons out of view. If I make the text wrap, you can see/use them.

image

It's conventional to allow clicking the column name/text itself to toggle thru sort state (asc, desc, none), which would at least restore functionality if not the indicators.

Originally posted by @tsibley in nextstrain/nextclade_data#228 (comment)

@corneliusroemer corneliusroemer added package: nextclade_web t:feat Type: request of a new feature, functionality, enchancement labels Oct 16, 2024
@corneliusroemer corneliusroemer changed the title > I can't seem to sort by emerging subclade, why is that @ivan-aksamentov? Allow toggling of sort state by clicking on column name/text itself Oct 16, 2024
@tsibley
Copy link
Member

tsibley commented Oct 16, 2024

Could also adjust layout of those column headings to ensure the indicators are always visible (i.e. force tighter wrapping).

@ivan-aksamentov
Copy link
Member

ivan-aksamentov commented Oct 16, 2024

I think this can be added fairly easily, just never got time to open the editor at this file specifically :)

One reason why hasn't been implemented immediately is because I tried to preserve stable property of sorting - you can sort by one criterion and then by another one and the equivalent elements will stay in place. This allows for more informative viz in my opinion, and a good UX practice for sortable tables. I mostly take inspiration from popular spreadsheet software, e.g. Excel. When you click on label you cannot pick direction right away - I wasn't sure if it affects the idea or not. But even if it breaks my UX idea, if Cornelius did not need stable sort, then I think it's fair to say that most users also would not miss it.

Another thing is that I'd like to replace this table with a more general alignment viewer widget sometimes (it would combine arbitrary columns with a more performant and featureful sequence view). That's on my mid term TODO list. The old code is a bit dated and messy.

@ivan-aksamentov
Copy link
Member

ivan-aksamentov commented Oct 16, 2024

Could also adjust layout of those column headings to ensure the indicators are always visible (i.e. force tighter wrapping).

Another option is to put arrows above and below the label, rather than on the right side. Some tables also have the arrows which only appear on hover, as an overlay - this way we would not need to reserve extra space for them. (looking at the text you can see that the space is a bit of a struggle)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: nextclade_web t:feat Type: request of a new feature, functionality, enchancement
Projects
None yet
Development

No branches or pull requests

3 participants