Skip to content

Check out from the Aliquots list; Lab Checkouts tile; in-page confirm dialog - #204

Merged
olsonjp merged 1 commit into
mainfrom
checkout-from-list-and-manager-tile
Nov 11, 2026
Merged

olsonjp merged 1 commit into
mainfrom
checkout-from-list-and-manager-tile

Conversation

@olsonjp

@olsonjp olsonjp commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Follow-up to #202 and #203 for #192. This is not a lab-feedback issue. It comes from the design review of the checkout workflow.

What it does

  • Check out on the Aliquots list. Stored rows get a Check out button next to the open-in-new-tab icon. It asks for confirmation, checks the aliquot out as the signed-in user, and returns to the same list view (search, sort and filters kept). In Use and Exhausted rows have no button.
  • Lab Checkouts tile on the Dashboard, for lab managers and admins only, such as "3 aliquots · 2 people". It links to the Aliquots list with checked_out_by=all: everyone's checked-out aliquots, grouped by person (username, then newest first), with Checked Out By and Checked Out columns and a "Checked out by anyone" chip. A column sort overrides the grouping. Members cannot use all; it is ignored for them.
  • In-page confirmation dialog replacing the browser's confirm() popup, which felt like an error. Same message text and the same two clicks, in a dialog styled like the app (dark mode included, Esc or the backdrop cancels), with a button that names the action. It is one shared script, static/krill/js/confirm-dialog.js: add data-confirm="..." to a form. Converted: Check out (list and the aliquot's own page), Done (Dashboard), and Apply on the no-owner report. The other native confirms (revoke permission, report retry and duplicate, alert and issue acknowledge and resolve) are left as they are.

Behaviour changes to know about

  • Check out only works on a Stored aliquot. The handler used to accept any aliquot, so a stale list could let a second person take over someone else's checkout. Now a non-stored aliquot is left alone. Both existing checkout tests still pass.
  • The checkout handler honours next for same-site addresses, using Dashboard: checked-out card with Create child and Done #203's safe_next. Without it, it still goes to the aliquot page.
  • .btn-plain (used by Done) moved from home.html into the shared stylesheet so the list button matches.

Not changed

The "tube" wording in the Samples and Aliquots list hints is older than this work and is left alone.

Verification

  • 21 new tests in sample/tests/test_checkout_from_list.py (button on stored rows only, return to the list, foreign next ignored, the stale-checkout guard, box position freed, the all filter and its member restriction and grouping, the tile and its counts, the confirm markup and escaping) and one in reports/test_checked_out_no_owner.py. Full suite: 641 tests, OK. No migrations.
  • Not tested automatically: the dialog's behaviour (opening, cancelling, confirming, Esc). The tests check the markup only. The script parses (checked with macOS's JavaScript engine; Node is not installed here).
  • I cannot see the browser. The author has looked at the list row layout and the dialog, and the formatting was adjusted from their feedback (button border and height, icon alignment, dialog centring). The tile and the all list have not been looked at.

🤖 Generated with Claude Code

… dialog

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@olsonjp
olsonjp merged commit e83e589 into main Nov 11, 2026
1 check passed
@olsonjp
olsonjp deleted the checkout-from-list-and-manager-tile branch November 11, 2026 16:21
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