moleculemaker / chemscraper-frontend

MIT License
1 stars 0 forks source link

Add sort functionality to results page #64

Closed yashdeep97 closed 7 months ago

yashdeep97 commented 7 months ago

Changes:

  1. Add sort functionality to results table based on PDF location, molecular weight, occurrences and similarity.

Approach:

  1. Add custom sort method that compares respective fields of each row and sorts the rows accordingly. If the sort field has invalid or undefined value, the row is moved to the bottom.

How to test:

  1. Changes deployed to staging
  2. Run a new job and try sorting the results table with the different options in the sort overlay.
  3. Click on "View Similar Structures" button for any molecule OR draw structure using marvinjs and then sort by similarity.
  4. Test the ascending/descending toggle button.
KastanDay commented 7 months ago

I tested this PR on the staging deployment, it works as described. I tested sorting by PDF location, molecular weight, occurrences and similarity and manually verified results.

matthewberry commented 7 months ago

I tested this PR on the staging deployment, it works as described. I tested sorting by PDF location, molecular weight, occurrences and similarity and manually verified results.

Thanks for reviewing, Kastan!

yashdeep97 commented 7 months ago

Thanks Kastan and Sara for reviewing the PR! :)