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

Display error/warning for too large input #72

Closed
rugk opened this issue May 9, 2018 · 5 comments · Fixed by #168
Closed

Display error/warning for too large input #72

rugk opened this issue May 9, 2018 · 5 comments · Fixed by #168
Labels
enhancement New feature or request good first issue Good for newcomers usability/UX

Comments

@rugk
Copy link
Owner

rugk commented May 9, 2018

I think the size can be hardcoded… (in a const of course)

https://en.wikipedia.org/wiki/QR_code#Storage

Currently it will just show an empty area…

@rugk rugk added enhancement New feature or request good first issue Good for newcomers usability/UX labels May 9, 2018
@rugk rugk changed the title Display error/warning for large input Display error/warning for too large input May 9, 2018
@rugk rugk added the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Oct 14, 2018
@rugk rugk removed the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Oct 31, 2018
@ongspxm
Copy link
Contributor

ongspxm commented Mar 4, 2019

Im interested in working on this issue, is this still required?

@rugk
Copy link
Owner Author

rugk commented Mar 4, 2019

Yes, sure, feel free to take it on.

Some steps/requirements:

  • We need to find out, how many characters can fit into a QR code? I mean, I already linked Wikipedia, but possibly there are still other issues, e.g. the used QR code generation libs may have their own limits.
    This just needs some testing.
  • (Obviously) it should always allow the maximum number of characters, so users can use it up to the limit.
  • Show an appropriate error & the usual QR placeholder image (likely done automatically) if this happens-
  • Possibly offer a useful "solution"/"mitigation" for the user as an "action button": E.g. crop the text?
    Think of the use cases that might result in that error. Maybe you can come up with another clever idea.
  • Hide error again if length is okay again.
  • If needed, we maybe need a FAQ, but this depends on what limits there actually are and whether we need to explain something/there is any value in explaining it to the user.

Or solve it differently: Instead of hardcoding limits, use some try/catch(-like) thing to try the QR code generation and only detect an error, so you just can prevent the "broken empty image". If that is possible 🤔… Your implementation, your choice…

In the PR, just explain what you did/tried or so.

@ongspxm
Copy link
Contributor

ongspxm commented Mar 7, 2019

I am on master branch, i ran the make.sh, and got a .xdi file. But when i tried to put that into firefox, it tells me its corrupted, i assume there is a separate step to install it locally?

@rugk
Copy link
Owner Author

rugk commented Mar 7, 2019

Sorry got the late reply, seems to have missed the comment.

So important: You do not need to run the make script. That is only used for releases.

Just follow the "getting started" section of the contributing guide instead. With it, you need nothing more than Firefox to develop. ☺

(Seems I should really put that note into the contributing guide. This misunderstanding came up before.)

@ongspxm
Copy link
Contributor

ongspxm commented Mar 7, 2019

pr opened, ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers usability/UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants