feat: make the batch scanner the Add Book page's default tab #98
No reviewers
Labels
No labels
bug
critical
ebook-branch
high
low
main
medium
release-blocker
security
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/fuzzy_catalog!98
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/batch-scanner-tab"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #93. Stacked on #85 and #90 (both batch-scanner fixes, merged into this branch); review the last commit. Once #85 and #90 merge, this PR's diff shrinks to that commit.
book_html/batch_scanner_panel.html.heex(wrapped in#batch-scanner-panel).batch_scanner.html.heex(its own page at/books/batch-scanner) now renders<.batch_scanner_panel />; nothing else in the scanner changed.#tab-batch),checkedby default. #76's remembered tab still wins, so a user who last picked Title Search gets Title Search.scannerActive()(panel visible): on Add Book the global key listener, the "Scanner paused" notice and the wake lock only apply while the batch tab is showing; switching tabs releases the wake lock and re-arms it on return.Tests:
batch_scanner_tab_test.exs(default tab and order, panel once inside a tabpanel, remember-tab wrapper, standalone page); #84's tab-id test updated.mix precommit: 638 tests pass. Nye's #90 jsdom XSS proofs pass against the new panel file.Browser check (Chromium, dev server): fresh storage opens on Batch Scanner; a simulated scan adds a row; a scan with focus on the tab radio counts; on Title Search typing reaches the field and scans aren't captured; reload reopens Title Search; standalone page still scans.