feat: enhance QR code generation and input handling#21
Merged
nielthiart merged 1 commit intomainfrom May 31, 2025
Merged
Conversation
Contributor
nielthiart
commented
May 31, 2025
- Updated QRCodeController to use a textarea for input instead of an input field for better user experience.
- Implemented debouncing for input changes to optimize QR code generation.
- Removed unnecessary SVG sanitization functions and adjusted SVG handling in QR code rendering.
- Added default debounce delay option in QRCodeController.
- Improved error handling in the application initialization process with a more structured error message display.
- Removed inline css again.
- Updated Vite configuration to include plugins for single file output and minification, along with CSP policies for security.
- Updated QRCodeController to use a textarea for input instead of an input field for better user experience. - Implemented debouncing for input changes to optimize QR code generation. - Removed unnecessary SVG sanitization functions and adjusted SVG handling in QR code rendering. - Added default debounce delay option in QRCodeController. - Improved error handling in the application initialization process with a more structured error message display. - Removed inline css again. - Updated Vite configuration to include plugins for single file output and minification, along with CSP policies for security.
There was a problem hiding this comment.
Pull Request Overview
This PR enhances QR code generation and input handling, optimizes asset delivery through Vite configuration updates, and improves application error handling and styling.
- Replaces an input field with a textarea and adds input debouncing in QRCodeController.
- Removes SVG sanitizing functions and adjusts QR code rendering logic.
- Updates Vite configuration and package scripts to support single file output, minification, and CSP policies.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Added plugins for single file output and minification; updated CSP policy with style-src. |
| src/utils/svg-sanitizer.ts | Removed unused SVG sanitization functions. |
| src/style.css | Added global styles including layout and responsive styles. |
| src/main.ts | Improved error message rendering using DOM APIs. |
| src/core/qr-generator.ts | Updated QR generation options by disabling XML declaration. |
| src/controllers/qr-code-controller.ts | Changed input handling to use a textarea with debouncing; removed SVG sanitization. |
| package.json | Updated linting and dependency configuration. |
| index.html | Removed inline CSS and switched input field to textarea; adjusted script loading. |
| .stylelintrc.json | Added configuration for stylelint. |
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.