-
Notifications
You must be signed in to change notification settings - Fork 38
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
Server side QR code rendering #122
Conversation
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.
Dropping a review with some comments and questions. Also just to check: is the QR code generation now purely a backend task? What plans do we have to incorporate #113, which allows for shortlinks under the qr code?
src/client/components/UserPage/Drawer/ControlPanel/widgets/DownloadButton.tsx
Outdated
Show resolved
Hide resolved
src/client/components/UserPage/Drawer/ControlPanel/widgets/DownloadButton.tsx
Outdated
Show resolved
Hide resolved
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.
Minor changes requested as commented.
Problem
Solution
I am using jsdom as an alternative dom for node, and d3 to draw our GoGovSg logo on the generated QR code generated from the qrcode library.
TODO
After
Tests
Deploy Notes
New dependencies:
d3
: To add our Go QR code to the generated QR code.jsdom
: To render our QR code in a node environment.sharp
: A convenient tool to convert our source svg QR code to png and jpeg formats.New dev dependencies:
jsqr
: To read rendered QR code for testing.upng-js
: To parse rendered .png QR codes for testing.