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

Sorting still not what a human expects: needs to sort by *inferred* number, not just by string. #424

Open
fragalysis-reporter opened this issue Jul 29, 2020 · 9 comments
Assignees
Labels
idea New idea submitted by user from feedback form

Comments

@fragalysis-reporter
Copy link
Collaborator

screenshot

@fragalysis-reporter fragalysis-reporter added the idea New idea submitted by user from feedback form label Jul 29, 2020
@boriskovar-m2ms
Copy link
Collaborator

While browsing live system I found out that this names varies in their format. Somewhere it's just X0107 with some suffix X0107:MAK-UNK-6435E6C2-8 somewhere it's ATAD2A-X1712_1, somewhere it's X0904_1 and X0904_2 where I assume that X0904_1 should go before X0904_2, somewhere it's NUDT7A_CRUDE-X1183_2 so there is a wide variety of patterns with variety of separators. Yes it can be done by searching for X and then trying to construct number and after _ (if exists) there will be secondary sorting criterion but it may has significant influence on sorting performance if many molecules are present on the selected site/sites. There is a risk that after implementing this it will become unusable. There are three options:

  1. Always parse the number/s on the fly when sorting is invoked
  2. When the data comes to front end I will parse the names and store the numbers which may slow down already slow loading process
  3. Number/s will be extracted at the server side and sent alongside the other data which we are already receiving from the backend

ak-m2ms pushed a commit that referenced this issue Sep 30, 2020
@ak-m2ms
Copy link
Collaborator

ak-m2ms commented Oct 6, 2020

Solution in branch #424

@boriskovar-m2ms
Copy link
Collaborator

The current behavior is that seemingly for random molecule the L and P is selected. See picture bellow:
IncorrectBehavior

The default and desired behavior for default selection when arriving on the page from landing page through selecting target is that first site is selected and L and P for the very first molecule are selected. Like on the picture bellow:
CorrectBehavior

Bonus point: please sort the molecule sites by id ascending.

@boriskovar-m2ms
Copy link
Collaborator

The same bug is still present. To be more precise: The desired behavior is that L and P are selected for very first molecule that appears in the list in the UI.
IncorrectBehavior3

@boriskovar-m2ms
Copy link
Collaborator

Please disregard the previous post. It's seems that mistake was made on my side and feature works as intended.

@boriskovar-m2ms
Copy link
Collaborator

Little bit of info about the sorting:
We expect the molecule name to be in the format of (aaaaaaa)Xdddd(dddd)(aaaaaaaaa) where 'a' is a character, X is delimiter or better to say it's prefix of the number part, 'd' is a digit, '' is a prefix of second sorting criterion and everything in between the parentheses is optional. 'Xdddd' is forming first sorting criterion and '(_dddd)' is second sorting criterion so X0001_01 goes before X0001_02.

@teriraj
Copy link
Collaborator

teriraj commented Oct 12, 2020

sorting works properly.

@phraenquex
Copy link
Collaborator

Sorting works properly, thanks!

There's a new bug, though: changing sort order (in the "Left filter") now takes so long that firefox tells me "a web page is slowing down your browser" - literally minutes. I'll have to raise a new ticket.

@phraenquex
Copy link
Collaborator

After reviewing with Rachael: we'll raise a new ticket about the sort/filter modal, and won't move this to production until that one is fixed too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea New idea submitted by user from feedback form
Projects
Archived in project
Development

No branches or pull requests

5 participants