-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: qrcode text size limit #6140
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.
I don't think this is the complete fix for the issue. This PR only prevents the cell to not show too many chars for QR code while they are possible to store in QR code standard. A QR code can store up to 7089 digits or 4296 characters and the current approach is limiting down to 62 characters.
Currently we're using version 4 in qrCodeOptions
which is pretty small. That's the reason why we cannot store too many chars. There're options we can configure the version (See here - we can bump the version to allow more characters).
Therefore, I think the better approach would be dynamically setting version
in qrCodeOptions
based on the length of the data in the cell, i.e. qrValue?.value.length
. The more characters the data has, the higher version it requires. I'll leave you to do the math.
I couldn't find anyway to calculate the char and version connectionlength vs version relation looks like
|
@sreehari2003 Just skimmed through the docs a bit, |
is this qr is scannable ? i tried scanning some large text encoded qr and phone is not able to scan it but small qr is working , I have updated the pr |
Yes. It'll link to search engine with the given text. By the way, as you may have noticed the CI/CD failed, since the version is dynamic now, please update the |
i checked the code but I don't see anywhere in the code where version is depended on , this is my first time working withe test cases |
@sreehari2003 Previously the version was hardcoded to |
Change Summary
Change type
Provide summary of changes.
reduced the text limit on qrcode
Anything for maintainers to be made aware of
final output