Skip to content
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

Added custom color background, JPEG downloadable, URL validation, and… #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ayshajamjam
Copy link

These are the changes I made:

Grammar/clean up:

  1. Bit size —> Bit Size
  2. qr —> QR
  3. Fixed grammar

URL Error:

  • When user does not include a URL, the alert box just says “Error: empty input”. I wanted to make this more clear, and changed it to “Error: please input a URL”.

Screen Shot 2023-05-07 at 11 58 45 AM

Valid URL check:

  • Used JS URL object to do an error check on the validity of the user inputted email. It only creates URLS for websites beginning with http or https. Before, it allows any string input even if it is not a URL (which technically isn't a big issue).

Screen Shot 2023-05-07 at 11 57 26 AM

Background color:

  • Added black background option and custom color background option. Suppose the poster is green, but they want the background of the QR code to be yellow. This eliminates the need for users to put the transparent background QR code on a colored square manually.

Screen Shot 2023-05-07 at 11 56 29 AM

Download as JPEG:

  • Added a button to make the image downloadable as JPEG as well.

Screen Shot 2023-05-07 at 11 55 45 AM

@HughChen
Copy link
Owner

Thanks for the changes! Sorry I just now have some free time to revisit this. A few notes:

For the background color picker, this is awesome! One caveat is that I don't think users should be able to check multiple background colors simultaneously:
Screenshot 2023-05-23 at 5 28 56 PM

Instead, I think removing the white background and black background options and leaving only the custom color picker and renaming it to "Custom background color" would be better. Let me know if you have any other thoughts around this!

As for the valid URL check, I actually think it is better to not have this check since technically encoding non-URLs in QR codes is a valid use case.

Finally, downloading the JPEG looks good.

@reaperhammer
Copy link

merge when?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants