Repository navigation
feat(labels): a label's QR can hold the code alone (small QR) - #564
Open
Brandon2255p wants to merge 3 commits into
Open
Brandon2255p wants to merge 3 commits into
Brandon2255p wants to merge 3 commits 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.
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
- The phone PNGs' query keys carry the choice, so picking the code alone after the PNGs were made ahead makes new ones instead of sharing the old link QR (the thing's label preview and the print page). - Tests: a browser that remembered the code starts on the code before anything is picked, and a label cell draws the 21-module QR for the code alone and a larger one for the link. qr.test.ts becomes .tsx to render it. - Short IDs and labels, Printing: what each choice holds, that only Kept's scanner reads a code-only label, and that the choice is remembered on this browser; in every docs language. - A straight apostrophe in "Kept's scanner". Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
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)ChoiceCardsI have read the CLA Document and I hereby sign the CLA