-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add QR code generation and scanning to UI #808
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #808 +/- ##
==========================================
+ Coverage 67.26% 67.33% +0.06%
==========================================
Files 62 62
Lines 3858 3869 +11
==========================================
+ Hits 2595 2605 +10
- Misses 1263 1264 +1
|
955216d
to
6409703
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #808 +/- ##
==========================================
+ Coverage 68.12% 68.14% +0.01%
==========================================
Files 62 62
Lines 3884 3889 +5
==========================================
+ Hits 2646 2650 +4
- Misses 1238 1239 +1
|
datalab
|
Project |
datalab
|
Branch Review |
ml-evs/qr-codes
|
Run status |
|
Run duration | 04m 33s |
Commit |
|
Committer | Matthew Evans |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
132
|
View all changes introduced in this branch ↗︎ |
1066a68
to
6875b87
Compare
78dd2c3
to
beff5ed
Compare
… resolver to work more smoothly
beff5ed
to
9ee1be2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This this is ready when you are @jdbocarsly and @BenjaminCharmes -- I have one comment we can discuss regarding configuration (but probably that can be addressed in another PR before release)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks really good! 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! excited to start using this and build on top of it
* Add clickable QRCode modal in navbar * Add qr code library * Add QRCodeModal component to formatted refcode * Add QRScanner functionality using `vue-qrcode-reader` * Add QR scanning from image * Add alert and spinner to handle camera authorisation/availaility * Add textual label to QRCode * Update default pURL resolver * Add query parameter redirect-to-ui to `/items` endpoint to allow link resolver to work more smoothly * List all QR codes in stream * Use auxiliary variable in store to map refcodes to IDs * Make sure item_id is set at top level of item response when querying by refcode * Redirect to the correct UI URL * Update config for qr code resolver and add warnings if unconfigured
Closes #803.
This PR:
{{ QR_CODE_RESOLVER_URL }}/items/<refcode>
, which can be configured. The refcode itself is always parseable from this URL, so datalab-native scanners (such as that described below) can resolve the item without needing to go via the resolver.redirect-to-ui
, where the/items
endpoint can point itself to the UI, if configured. This is the default redirect used by the purl system.Potential follow-ups: