Skip to content

2596y25-595---display plate id on prepool plate schematic#2693

Open
wendyyang wants to merge 16 commits intodevelopfrom
2596-y25-595---display-plate-id-on-prepool-plate-schematic
Open

2596y25-595---display plate id on prepool plate schematic#2693
wendyyang wants to merge 16 commits intodevelopfrom
2596-y25-595---display-plate-id-on-prepool-plate-schematic

Conversation

@wendyyang
Copy link
Contributor

Closes #

Changes proposed in this pull request

update the template and javascript to display plate barcode & input barcode on top of source plate

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 29.41176% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.55%. Comparing base (1b9b14c) to head (582754b).

Files with missing lines Patch % Lines
.../frontend/entrypoints/pages/multi_plate_pooling.js 0.00% 11 Missing ⚠️
app/models/presenters/presenter.rb 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2693      +/-   ##
===========================================
- Coverage    84.59%   84.55%   -0.04%     
===========================================
  Files          501      501              
  Lines        20538    20553      +15     
  Branches       377      377              
===========================================
+ Hits         17374    17379       +5     
- Misses        3161     3171      +10     
  Partials         3        3              
Flag Coverage Δ
javascript 79.65% <0.00%> (-0.06%) ⬇️
pull_request 84.55% <29.41%> (-0.05%) ⬇️
push 84.55% <29.41%> (-0.04%) ⬇️
ruby 92.55% <83.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@BenTopping BenTopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we are already populating the plate barcode but it is just invisible as its black text on black background. See caption here https://github.com/sanger/limber/blob/develop/app/frontend/entrypoints/pages/multi_plate_pooling.js#L278 (line 278).

I think it would be best to add the input barcode in that caption too - should save you having to create those new html divs.

@wendyyang wendyyang requested a review from BenTopping February 4, 2026 17:33
Copy link
Contributor

@BenTopping BenTopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me - I have not tested locally.

Do we need tests for this?

@wendyyang
Copy link
Contributor Author

wendyyang commented Feb 5, 2026

Changes look good to me - I have not tested locally.

Do we need tests for this?

I run integration suite to test it, the screenshot looks like:

Screenshot_plate

Copy link
Contributor

@BenTopping BenTopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice looks good to me.

@wendyyang
Copy link
Contributor Author

wendyyang commented Feb 11, 2026

update label using 'the LB Lib PCR-XP' and 'Cherry Pick Plate ID'.

Screenshot 2026-02-11 at 19 58 43

@wendyyang wendyyang requested a review from BenTopping February 12, 2026 09:01
Copy link
Contributor

@StephenHulme StephenHulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple comments - thanks for the screenshots, they look great!

Comment on lines 288 to 294
$('.plate-id-' + plateIndex + ' caption').html(`
<span class="barcode-label">${purpose}</span>
<span class="barcode-value">${barcode}</span>
<span class="caption-separator"></span>
<span class="barcode-label">${label}</span>
<span class="barcode-value">${inputBarcode}</span>
`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's potential for an injection attack here. Instead of using .html() with potentially user-supplied values, a better approach would be to specifiy the html tags directly and set their contents with .text() which would automatically escape any html.

Here is one (unchecked) suggested alternative:

const $caption = $('.plate-id-' + plateIndex + ' caption');
$caption.empty();
$caption
  .append($('<span>').addClass('barcode-label').text(purpose))
  .append($('<span>').addClass('barcode-value').text(barcode))
  .append($('<span>').addClass('caption-separator'))
  .append($('<span>').addClass('barcode-label').text(label))
  .append($('<span>').addClass('barcode-value').text(inputBarcode));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments. refactored.

Comment on lines 280 to 284
if (pipelineGroupName === 'ISC') {
label = 'Cherry Pick Plate ID'
} else {
label = 'Input Plate Barcode'
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tend to avoid pipeline-specific behaviour if at all possible as it can be unexpected and fragile if the pipeline name changes.
Is it reasonably possible to use a single label that applies to well to pipeline groups?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactored and moved the label to presenter

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.

Y25-595 - Display Cherry Pick Plate ID and LB Lib PCR XP Unique ID on prepool plate schematic (ISC Pipeline)

3 participants