Repository navigation
feat(labels): a label's QR can hold the code alone - #564
Open
Brandon2255p wants to merge 1 commit into
Open
Brandon2255p wants to merge 1 commit into
Brandon2255p wants to merge 1 commit into
Conversation
A label's QR holds `<public-url>/l/<code>`, so a long domain makes a dense QR: 29 modules a side for a tailnet name, 33 for a longer domain. The print screen now asks what the QR holds: the link (the default, any phone camera opens it) or the code alone, 21 modules, the smallest QR there is. Only Kept's scanner reads that one; shared/scan.ts already takes a bare code as a Kept label, so labels of both kinds keep working. The choice is remembered on this browser, like the stock, and shown only for stocks that print a QR. The sheet, its preview and the phone PNGs all follow it. Five strings, in every catalogue.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This branch has not been deployed
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.
What and why
A label's QR holds
<public-url>/l/<code>, so a long public URL makes a dense QR: 29 modules a side for a typical<machine>.<tailnet>.ts.netaddress, 33 for a longer domain. On small label stocks that is harder to print and to scan.The print screen now asks what the QR holds, under the stock picker, for stocks that print a QR:
shared/scan.tsalready takes a bare code as a Kept label, so labels of both kinds keep working, and nothing changes on the server.The choice is remembered on this browser, like the stock (
kept.labels.qr), and followed by the sheet, its preview and the phone PNGs (qrValue()incomponents/labels/qr.ts). The QR keeps its size on the label: fewer modules, each one larger.Five new strings, in every catalogue.
Checks
bash scripts/ci-local.sh --fastpasses (lint, catalogues, typecheck, unit, eval). Not run:dbande2e(no Docker on this machine); the change is web-only.components/labels/qr.test.ts(the value per choice, the code alone is a version 1 QR and the link is larger, the scanner reads the code as a label, the choice is remembered and redraws, and is followed when storage is blocked)ChoiceCards