-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add QR code to Share Modal #452
Comments
There's an effort ongoing by http://www.wikimedia.org.au/wiki/User:Gnangarra to provide stable qr coding for every wikidata item. They're thinking wall plaques, but book plates/spine labels would be a fine use case. |
@LeadSongDog Do you know what the current state of wikimedia QR project? @mekarpeles I'm defaulting to asking you to be assignee. Note, being the assignee doesn't necessarily mean you are responsible for doing the work, just responsible for gathering/providing information to address the issue. From the Wiki.
I've added labels per context: let me know your thoughts |
@guyjeangilles Some background reading: The codebase from google.code was imported to https://github.com/googlecode-mirror/qrwp The neat thing about QRpedia codes (vice regular QR codes) is that they respond to the language setting of the user's device, linking to the article in a language the user understands: this is great for GLAM applications where tourism and multiculturalism are big factors. |
I may be able to help with this issue. What is the process to move this forward? |
This comment was marked as outdated.
This comment was marked as outdated.
Hello, me and my collegue @dbouris are very interested in this one. Can someone give us more precise information and whether this feature is still considered a good addition to the project. |
Hello!! Me and my group are interested in working on this? Is this still available? |
@Ultare1717 -- it would be great if we could take the "Share" feature that we have on the books page and extend it so it also works on the Author page -- one thing we could also do is add a QR code to this share popup. Want to give this a shot? |
Assignees removed automatically after 14 days. |
@Ultare1717, let me know if you and your group are still working on this. If so, I will reassign you. |
It would also be nice (on mobile PWA/TWA -- since the url bar is hidden) to be able to copy the link to the page you're on in order to share it, from the share modal |
@jimchamp @mekarpeles |
Thanks @merwhite11! Let me know if you have any questions. |
@jimchamp Awesome. I'll read everything over and paraphrase back to you to make sure I'm understanding everything correctly. |
@jimchamp alright, I do have a few questions you could help clarify -- thanks ! Reqs:
Questions:
How QR Code Will Work:
|
Thanks @merwhite11! I think that adding the share modal to author pages is out of scope for this issue, but I have created #9141 to track that feature request. The QR code should link to the current page. Some use cases for this are:
You are correct about Mek's requirement already being handled by the "Copy URL" button. This button was added sometime after Mek made the request here. To keep things simple, clicking the QR code share option can open a new tab which only contains the QR code. One last thing: The share modal is getting very cluttered in mobile views. I think that it makes sense to split the share options into two rows for smaller screens. The implementation should be pretty straight-forward with flexbox. |
@jimchamp Thank you for the details, that simplifies things a bit! I think I'm understanding it now -- Revised reqs
|
Hi @jimchamp , I have some more questions, for whenever you get a chance ! Methods - I looked into the QRpedia recommended by @LeadSongDog and couldn’t figure out how to use it as an API. Might be totally missing something there, but here are two methods that I got working in a basic local examples
QUESTIONS
Thanks for the help |
I don't think that any JS will be needed for this. Similar to the social links, the new QR code icon should be a link to something like: I was able to generate a QR code in my local environment using this library. To install this in your local environment, do the following:
Now, you should be able to import Here's the code for the
After adding this and restarting the web container ( Hopefully this is helpful. Feel free to ask folks in Slack if you need help passing the Edit: You can add the new handler to https://github.com/internetarchive/openlibrary/blob/master/openlibrary/plugins/openlibrary/api.py |
@jimchamp Thank you Jim ! I got the icon hooked up to the get req in api.py and it's opening up the qr code image in the new tab. Thanks for paving the way. I'm working on getting the share modal to switch to 2 rows for smaller screens now. Just checking, should the QR image in the new tab have a download/print button/option? |
Let's keep it simple. People can use their browsers to download or print the image. Thanks! |
@jimchamp The I have added qrcode to requirements.txt and have been running I'm also failing the static builds, if you could advice on that -- |
After checking out your branch and installing The That's ok for now. Can you remove any unrelated code changes from your branch and open a PR? |
Many OL books are too old to have an ISBN, but it should be easy to add a QR code on each displayed A, W, and E page which encodes the URL for that page, equivalent to what is done on google books "About this book" pages. There, for instance, https://chart.googleapis.com/chart?chs=400x400&cht=qr&chl=https://books.google.com/books?id=5xUMrOol9L4C&source=qrcode generates an easily-scanned QR that links to https://books.google.com/books?id=5xUMrOol9L4C
These QR code images (or entire pages) could be printed out on plain or sticky labels for insertion as back matter. I'd love to be able to do this in my older books.
Of course, there are standalone generators that don't require the use of google's implementation. Several (in python even) are right here on github.
The text was updated successfully, but these errors were encountered: