Skip to content

LIMS-2015: Update d3-*, csv-file-validator and plotly.js libraries#1060

Open
ndg63276 wants to merge 2 commits intomasterfrom
improvement/LIMS-2015/update-js-libraries
Open

LIMS-2015: Update d3-*, csv-file-validator and plotly.js libraries#1060
ndg63276 wants to merge 2 commits intomasterfrom
improvement/LIMS-2015/update-js-libraries

Conversation

@ndg63276
Copy link
Copy Markdown
Collaborator

@ndg63276 ndg63276 commented Apr 8, 2026

JIRA ticket: LIMS-2015

Summary:

Upgrade some javascript libraries by a major version number

  • d3-scale, d3-scale-chromatic, d3-selection
  • csv-file-validator
  • plotly.js

Changes:

  • Update libraries in package.json and package-lock.json
  • Update usage of d3-select to use arrow functions and remove let self = this syntax
  • Remove pointless if clause in onCellClicked
  • Bring in some csv-file-validator changes from LIMS-2037: Remove manual check for duplicate acronyms #1034
  • csv-file-validator now passes errors as an object called inValidData rather than an array called inValidMessages
  • Add a log message whenever plotly.js is used, to establish whether it can be safely removed in future

To test:

d3-

  • Go to any mx proposal, go to any shipment, eg /shipments/sid/76923
  • Click Add Container, set Container Type as Puck
  • Check when you hover over a puck position, a circle appears to highlight it
  • Create some samples, check they go green in the puck drawing
  • Create the puck and view it, check when you hover over a puck position, a circle appears again
  • Go back to the shipment and click Add Container again, but set the Container Type to be CrystalQuickX
  • Fill in a unique barcode, container name and select an imager
  • Check clicking on a well in the plate drawing updates the header for the lower section to eg "Sample Location 192"
  • Check the well goes green when you select a protein and give a name
  • Repeat for a few wells then click Add Container.
  • Click to view the container, check the wells with samples are highlighted, and clicking on a well highlights it in blue

csv-file-validator

  • Go to an I15-1 proposal, eg cm37261
  • Go to Phases from the main menu, then click on a Phase
  • Click "Add new simple sample"
  • Choose "File upload for multiple samples"
  • Select this file duplicate_acronym.csv, check an error appears about a duplicate acronym on row 3
  • Select this file commas_in_comment.csv, check an error appears about having commas in the comment (the automatic message is a bit stilted so it is re-written)
  • Select this file empty_file.csv, check an error appears to point out the file is empty
  • Select this file valid_file.csv, check no errors occur, click "Add Sample" and check it uploads as expected

Plotly.js

  • I'm not sure if/where plotly is used (seems to have been EM in the past), so I have copied a suitable plotly input file over another file
  • Go to /dc/visit/cm44137-1/id/22240221, click the Auto Processing bar, select fast_dp (if not already) and click "Logs & Files"
  • Click the View button next to "iotbx-merging-stats.json"
  • Check a multiplicity plot appears, and all the plotly buttons are functional

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant