Added a QR icon in Share Modal that opens to QR code on click #9233
+109
−11
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.
Closes #452
Feature: Adds a QR code icon to the share modal on books page. On icon click, a new tab opens with the QR code image.
Refactor: Changed styling of Share Modal so that for small -> tablet sized screens, the share modal icons appear larger and in two rows.
Technical
Installed qrcode dependency in requirements.txt
Imported qrcode and io in api.py for use in create_qrcode handler.
Testing
docker compose run --rm home make test
: passing with warningsdocker compose run --rm home pytest openlibrary/plugins/importapi/tests/test_import_validator.py
: passing with warningsdocker compose run --rm home npm run lint
: passing with deprecation warningsScreenshot
I can change the size of the icons if these are too large. I can also change the breakpoint for when to switch from large 2-row icons, to smaller single row icons. Currently I have the icons in 2 rows for everything tablet and smaller.
Stakeholders
@jimchamp
Thank you for the help!