Migrate QR code scanner to ZXing library#315
Draft
Copilot wants to merge 5 commits into
Draft
Conversation
Member
|
Don't hardcode the library just use a cdn |
Co-authored-by: jontyms <64489881+jontyms@users.noreply.github.com>
Co-authored-by: jontyms <64489881+jontyms@users.noreply.github.com>
Co-authored-by: jontyms <64489881+jontyms@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Examine if better QR code scanners exist
Migrate QR code scanner to ZXing library
Oct 5, 2025
Co-authored-by: jontyms <64489881+jontyms@users.noreply.github.com>
Contributor
Author
Changed to host ZXing library locally at Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaced the custom QR scanner library with the industry-standard ZXing library (
@zxing/library) as requested in #308. ZXing is a widely-used, well-maintained barcode scanning library that provides robust QR code detection capabilities.Changes
Library Migration
qr-scannerlibrary files fromapp/static/lib/app/static/lib/zxing.min.js(downloaded from npm package@zxing/library)Updated Files
app/templates/scanner.html: Migrated dues scanner to use ZXing'sBrowserQRCodeReaderAPIapp/templates/admin_searcher.html: Updated script reference to ZXing libraryapp/static/admin.js: Converted admin QR scanner to use ZXing APItests/test_static.py: Updated to reference the new ZXing library fileAPI Changes
The migration involved updating the QR scanner initialization and usage:
Before (old library):
After (ZXing):
Preserved Functionality
Benefits
Testing
The changes can be tested by:
Fixes #308
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.