Conversation
Co-authored-by: j2teamnnl <j2teamnnl@gmail.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: j2teamnnl <j2teamnnl@gmail.com>
- README: Add QR size feature (100-1000px) & smart validation - CHANGELOG: Add v2.2.0 entry with new features & bug fixes - VALIDATION: Update to blur-based validation system
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bug: Logo Cropping Breaks with QR-Scaled Resize
Logo is always cropped to fixed 200px size regardless of QR code size. When QR size is set to 1000px, the 200px logo gets upscaled to 20% (200px) causing pixelation. When QR size is 100px, the logo gets downscaled from 200px to 20px (20% of 100px) wasting resolution. The cropAndResizeImage targetSize should scale proportionally with the QR code size (e.g., canvas.width * 0.20 or a similar percentage).
js/qr-generator.js#L152-L153
qr-code-generator/js/qr-generator.js
Lines 152 to 153 in 6cb70c0
Bug: Dynamic font scaling for QR canvas text
Font size is hardcoded to 16px regardless of QR code size. When QR size is 1000px, the 16px font will appear tiny. When QR size is 100px, the 16px font will appear too large and may exceed the QR boundaries. The font size should scale with canvas.width (e.g., Math.max(12, canvas.width * 0.05) to maintain proportionality).
js/qr-generator.js#L202-L203
qr-code-generator/js/qr-generator.js
Lines 202 to 203 in 6cb70c0
Bug: Dynamic QR padding scaling issue
Padding is hardcoded to 10 pixels for both logo and text customizations. This doesn't scale with the dynamic QR code size. For a 1000px QR code, 10px padding is too small, while for a 100px QR code, 10px padding is too large. The padding should scale proportionally with the QR size (e.g., Math.max(5, canvas.width * 0.03)).
js/qr-generator.js#L159-L160
qr-code-generator/js/qr-generator.js
Lines 159 to 160 in 6cb70c0
Add QR code size editing functionality to allow users to customize the output size.
Note
Adds numeric QR size control (100–1000px) with responsive caps, switches validation to blur/Enter, and fixes PNG/PDF exports to include logo/text.
index.html(#qrSize, 100–1000px) with hints and Enter-to-apply.sizetoQRGenerator.generate(); default 300.inputtoblur(and Enter) injs/app.js; update docs inVALIDATION.md.js/qr-generator.jsto useimg.srcfor PNG/PDF so logo/text persist; adjust SVG path.css/style.cssQR caps (desktop 500px, mobile 350px, xs 280px).qr_size,qr_size_input,qr_size_hintinjs/translations.jsand supportdata-i18n-placeholderinjs/utils.js; remove hardcoded placeholder inindex.html.README.md,CHANGELOG.md, andVALIDATION.mdto reflect size control, smart validation, and export behavior.Written by Cursor Bugbot for commit 6cb70c0. This will update automatically on new commits. Configure here.