nextclade icon indicating copy to clipboard operation
nextclade copied to clipboard

ENH: Allow toggling of columns through settings

Open corneliusroemer opened this issue 3 years ago • 10 comments

One thing that stops me from adding more columns despite them being useful is that we're heavily constrained in the number of columns that we can reasonably display.

One pretty straightforward way to make that constraint less strict is to allow users to customise what columns they want to see.

By default, things could stay as they are, but columns could be toggled off, and some optional (default off) extensions could be toggled on.

Another obvious setting that would be helpful would be to allow users to set the width of columns. In particular, Josette Schoenmakers has asked whether it would be possible to make the sequence name column broader to show the entire date.

A change through user settings may be easier than making columns drag/droppable as less javascript is required.

Drag/droppable columns can get ugly when things move the way people don't want to accidentally. Allowing users to tweak which columns to show and making some wider would be a great incremental improvement.

What do you think @ivan-aksamentov - do you see any implementation issues with this?

I'm not sure whether we have that option already, but it would make sense to allow setting user settings defaults in the dataset - that way we can have optimised default settings for each pathogen.

corneliusroemer avatar Sep 05 '22 09:09 corneliusroemer

Related: https://github.com/nextstrain/nextclade/issues/112

Yes, I wanted to play with it sometimes. Question of priorities. Not sure how involved that is.

Toggling the columns is probably easy, just need a way to display all that somehow.

Drag-to-resize is quite difficult with the current table implementation. And will likely end up badly.

Column width numbers in settings - simpler in terms of the table implementation, but then you need to write a form and validation for it (what if someone types "foobar", a smiley face or "-145551" there? or what if the numbers add up to something horrible), not even mentioning that that's embarrassingly bad UX.

One alternative thing I wanted to try is the new table implementation: https://tanstack.com/table, which has some of the features that we require out-of-the-box and others seem to be not too difficult to implement.

ivan-aksamentov avatar Sep 05 '22 10:09 ivan-aksamentov

Thanks @ivan-aksamentov for sharing your implementation insights!

The reason I suggested toggling is precisely because it should be pretty simple to implement.

If you're worried about validation, what about having a number of predefined radio buttons: off, narrow, medium, wide?

I agree, drag-to-resize looks like a pain, limited settings are what I'd go for.

First in terms of priority, toggling off would be the biggest one I'd think, that'd give people extra space.

Second would be allowing custom columns to come toggled off by default, e.g. we could have two Nextclade pango custom columns: Aliased, Unaliased. Aliased would come toggled on by default, unaliased off. But users can show both, neither or just unaliased.

Third would be allowing wide name columns - I don't think we really need to change other widths as it stands.

Trying out a new table implementation seems much more involved so I'd probably prefer the above. The more involved part of dataset defaults would also be usable by a new implementation, so not wasted.

corneliusroemer avatar Sep 05 '22 11:09 corneliusroemer

I think this would be a great idea. When there are two or more nearby mutations, at least one is often invisible in the mutations column. It even seems impossible, at times, to hover one's cursor over a mutation because its vertical bar is so thin as to be <1 pixel. I've actually moved my cursor one pixel at a time trying to get the nucleotide overview of a mutation and have been unable to do it.

Another idea I think would be fantastic: adding NTD, RBD, and S2 options (beginning S2 right after the RBD for sake of convenience) in the mutations view. This would space out mutations that are often jam-packed in these regions, allowing them to be more easily viewed and examined. If most users are like me, they spend most of their time looking at spike, occasionally viewing the others. I'm pretty sure NTD, RBD, and S2 view options would be #2, 3, and 4 on my list of most viewed regions if they were to be included.

ryhisner avatar Sep 05 '22 12:09 ryhisner

@corneliusroemer

Second would be allowing custom columns to come toggled off by default, e.g. we could have two Nextclade pango custom columns: Aliased, Unaliased. Aliased would come toggled on by default, unaliased off. But users can show both, neither or just unaliased.

I have no idea how that would work for dynamic columns. Their whole existence depends on input data. What is the "on/of" status and size of "Pango_lineage" for a flu? And how do I know if it even exists?

ivan-aksamentov avatar Sep 05 '22 12:09 ivan-aksamentov

@ryhisner great point with creating focused RBD/NTD/S2 views - this should be an issue of its own.

Also, as a workaround you can use the BA.2 dataset of Nextclade (click change, then scroll to second from bottom).

The user settings would have to be dynamically changed based on whatever is in the tree.json - maybe that makes it more complicated. But it doesn't seem impossible to not just make the columns shown depend on tree.json but also the user settings.

corneliusroemer avatar Sep 05 '22 12:09 corneliusroemer

+1 for this. I was teaching using Nextclade today (and it's great!). The fact that on a typical low-end monitor the genome gets pretty truncated makes things a lot less intuitive. (You can zoom out, but most won't by default). Unaliased off by default would help with this - maybe non-ACTGN too.

theosanderson avatar Feb 01 '23 14:02 theosanderson

Thanks for the feedback @theosanderson, let us know if you have any other insights from your experience in the field

Alternatively (or additionally) we could make some of the columns be embedded in a scrollable view - though that would make things potentially awkward, too much nesting of things that scroll and don't scroll.

corneliusroemer avatar Feb 01 '23 14:02 corneliusroemer

I'd also welcome this feature for two main use-cases:

  1. When on a laptop it's not uncommon that the columns scroll off to the side. It can be annoying vertical-scrolling back and forth to see all genome graph & then back for the names
  2. I sometimes want to see the entire name (esp if has date at the end), so expanding names would be nice. Other times I don't care at all what the name is (at least initially) so would like to make it very tiny and prefer to view other columns more.

emmahodcroft avatar Feb 01 '23 14:02 emmahodcroft

With the new additional column, I think an option for toggling columns has become even more necessary as the genome has really become squashed. I find myself having to stretch and unstretch my screen (in the horizontal direction) constantly now.

ryhisner avatar Feb 13 '23 11:02 ryhisner

Just get a wider monitor @ryhisner ;)

Yeah we should really tackle selection

corneliusroemer avatar Feb 13 '23 12:02 corneliusroemer